/home/runner/work/amr-wind/amr-wind/amr-wind/utilities/SecondMomentAveraging.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/utilities/SecondMomentAveraging.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
SecondMomentAveraging.H
Go to the documentation of this file.
1#ifndef SecondMomentAveraging_H
2#define SecondMomentAveraging_H
3
4#include <AMReX_AmrCore.H>
8
9namespace amr_wind {
10
26{
27public:
29
31
32 void operator()();
33
35 amrex::Real
36 line_average_interpolated(amrex::Real x, int comp1, int comp2) const;
38 amrex::Real line_average_interpolated(amrex::Real x, int comp) const;
40 amrex::Real line_average_cell(int ind, int comp1, int comp2) const;
42 amrex::Real line_average_cell(int ind, int comp) const;
43
44 const amrex::Vector<amrex::Real>& line_moment()
45 {
47 };
48 void line_moment(int comp, amrex::Vector<amrex::Real>& l_vec);
49
51 const std::string& filename, int step, amrex::Real time);
52 void output_line_average_ascii(int step, amrex::Real time);
53
55 void set_precision(int p) { m_precision = p; };
56
57private:
59 amrex::Vector<amrex::Real>
62 int m_precision = 4;
68
69public: // public for GPU
71 template <typename IndexSelector>
72 void compute_average(
73 const IndexSelector& idxOp,
74 const amrex::MultiFab& mfab1,
75 const amrex::MultiFab& mfab2);
76};
77
78} // namespace amr_wind
79
80#endif /* SecondMomentAveraging_H */
Definition SecondMomentAveraging.H:26
FieldPlaneAveraging & m_plane_average1
Definition SecondMomentAveraging.H:66
int m_precision
Definition SecondMomentAveraging.H:62
void compute_average(const IndexSelector &idxOp, const amrex::MultiFab &mfab1, const amrex::MultiFab &mfab2)
Definition SecondMomentAveraging.cpp:121
SecondMomentAveraging(FieldPlaneAveraging &pa1, FieldPlaneAveraging &pa2)
Definition SecondMomentAveraging.cpp:73
amrex::Vector< amrex::Real > m_second_moments_line
Definition SecondMomentAveraging.H:60
const amrex::Vector< amrex::Real > & line_moment()
Definition SecondMomentAveraging.H:44
int m_num_moments
Definition SecondMomentAveraging.H:58
void operator()()
Definition SecondMomentAveraging.cpp:92
void set_precision(int p)
Definition SecondMomentAveraging.H:55
int m_last_updated_index
Definition SecondMomentAveraging.H:63
amrex::Real line_average_interpolated(amrex::Real x, int comp1, int comp2) const
Definition SecondMomentAveraging.cpp:208
amrex::Real line_average_cell(int ind, int comp1, int comp2) const
Definition SecondMomentAveraging.cpp:262
FieldPlaneAveraging & m_plane_average2
Definition SecondMomentAveraging.H:67
void output_line_average_ascii(const std::string &filename, int step, amrex::Real time)
Definition SecondMomentAveraging.cpp:5
Definition BCInterface.cpp:7