FPlaneAveraging< FType > Class Template Reference

AMR-Wind API: amr_wind::FPlaneAveraging< FType > Class Template Reference
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
amr_wind::FPlaneAveraging< FType > Class Template Reference

#include <FieldPlaneAveraging.H>

Inheritance diagram for amr_wind::FPlaneAveraging< FType >:
[legend]
Collaboration diagram for amr_wind::FPlaneAveraging< FType >:
[legend]

Public Member Functions

 FPlaneAveraging (const FType &field_in, const amr_wind::SimTime &time, int axis_in, bool compute_deriv=false)
 
virtual ~FPlaneAveraging ()=default
 
virtual void operator() ()
 
amrex::Real line_average_interpolated (amrex::Real x, int comp) const
 
amrex::Real line_average_cell (int ind, int comp) const
 
amrex::Real line_derivative_interpolated (amrex::Real x, int comp) const
 
amrex::Real line_derivative_of_average_cell (int ind, int comp) const
 
void output_line_average_ascii (const std::string &filename, int step, amrex::Real time)
 
void output_line_average_ascii (int step, amrex::Real time)
 
void set_precision (int p)
 
amrex::Real dx () const
 
amrex::Real xlo () const
 
int axis () const
 
int level () const
 
int ncomp () const
 
int ncell_plane () const
 
int ncell_line () const
 
int last_updated_index () const
 
const amrex::Vector< amrex::Real > & line_average () const
 
const amrex::Vector< amrex::Real > & line_deriv () const
 
void line_average (int comp, amrex::Vector< amrex::Real > &l_vec)
 
const amrex::Vector< amrex::Real > & line_centroids () const
 
const FType & field () const
 
template<typename IndexSelector >
void compute_averages (const IndexSelector &idxOp, const amrex::MultiFab &mfab)
 
void compute_line_derivatives ()
 

Protected Attributes

int m_ncomp
 
amrex::Vector< amrex::Real > m_line_average
 
amrex::Vector< amrex::Real > m_line_deriv
 line storage for the derivative of average field
 
amrex::Vector< amrex::Real > m_line_xcentroid
 
amrex::Real m_dx
 
amrex::Real m_xlo
 
int m_ncell_plane
 
int m_ncell_line
 
int m_precision = 4
 
const int m_level
 
int m_last_updated_index = -1
 
const FType & m_field
 
const SimTimem_time
 
const int m_axis
 
const bool m_comp_deriv
 

Detailed Description

template<typename FType>
class amr_wind::FPlaneAveraging< FType >

Output average of a field on planes normal to a given direction

The user can choose a direction (x, y, or z), the default value is the z-direction. The field is then averaged on planes at the cell-centers at level 0 (coarsest level) along the specified direction.

Constructor & Destructor Documentation

◆ FPlaneAveraging()

template<typename FType >
amr_wind::FPlaneAveraging< FType >::FPlaneAveraging ( const FType & field_in,
const amr_wind::SimTime & time,
int axis_in,
bool compute_deriv = false )
Parameters
field_in[in] Field to be averaged
time[in] Time instance to determine output frequencies
axis_in[in] Direction along which planes are computed
compute_deriv[in] Should the derivative of the averages be computed

◆ ~FPlaneAveraging()

template<typename FType >
virtual amr_wind::FPlaneAveraging< FType >::~FPlaneAveraging ( )
virtualdefault

Member Function Documentation

◆ axis()

template<typename FType >
int amr_wind::FPlaneAveraging< FType >::axis ( ) const
inline

◆ compute_averages()

template<typename FType >
template<typename IndexSelector >
void amr_wind::FPlaneAveraging< FType >::compute_averages ( const IndexSelector & idxOp,
const amrex::MultiFab & mfab )

fill line storage with averages

◆ compute_line_derivatives()

template<typename FType >
void amr_wind::FPlaneAveraging< FType >::compute_line_derivatives ( )

fill derivatives of line storage

◆ dx()

template<typename FType >
amrex::Real amr_wind::FPlaneAveraging< FType >::dx ( ) const
inline

◆ field()

template<typename FType >
const FType & amr_wind::FPlaneAveraging< FType >::field ( ) const
inline

◆ last_updated_index()

template<typename FType >
int amr_wind::FPlaneAveraging< FType >::last_updated_index ( ) const
inline

◆ level()

template<typename FType >
int amr_wind::FPlaneAveraging< FType >::level ( ) const
inline

◆ line_average() [1/2]

template<typename FType >
const amrex::Vector< amrex::Real > & amr_wind::FPlaneAveraging< FType >::line_average ( ) const
inline

◆ line_average() [2/2]

template<typename FType >
void amr_wind::FPlaneAveraging< FType >::line_average ( int comp,
amrex::Vector< amrex::Real > & l_vec )

◆ line_average_cell()

template<typename FType >
amrex::Real amr_wind::FPlaneAveraging< FType >::line_average_cell ( int ind,
int comp ) const

evaluate line average at specific cell for any average component

◆ line_average_interpolated()

template<typename FType >
amrex::Real amr_wind::FPlaneAveraging< FType >::line_average_interpolated ( amrex::Real x,
int comp ) const

evaluate line average at specific location for any average component

◆ line_centroids()

template<typename FType >
const amrex::Vector< amrex::Real > & amr_wind::FPlaneAveraging< FType >::line_centroids ( ) const
inline

◆ line_deriv()

template<typename FType >
const amrex::Vector< amrex::Real > & amr_wind::FPlaneAveraging< FType >::line_deriv ( ) const
inline

◆ line_derivative_interpolated()

template<typename FType >
amrex::Real amr_wind::FPlaneAveraging< FType >::line_derivative_interpolated ( amrex::Real x,
int comp ) const

evaluate line average derivative at specific location for any average component

◆ line_derivative_of_average_cell()

template<typename FType >
amrex::Real amr_wind::FPlaneAveraging< FType >::line_derivative_of_average_cell ( int ind,
int comp ) const

evaluate derivative of a line average at specific cell for any component

◆ ncell_line()

template<typename FType >
int amr_wind::FPlaneAveraging< FType >::ncell_line ( ) const
inline

◆ ncell_plane()

template<typename FType >
int amr_wind::FPlaneAveraging< FType >::ncell_plane ( ) const
inline

◆ ncomp()

template<typename FType >
int amr_wind::FPlaneAveraging< FType >::ncomp ( ) const
inline

◆ operator()()

template<typename FType >
void amr_wind::FPlaneAveraging< FType >::operator() ( )
virtual

Reimplemented in amr_wind::VelPlaneAveraging.

◆ output_line_average_ascii() [1/2]

template<typename FType >
void amr_wind::FPlaneAveraging< FType >::output_line_average_ascii ( const std::string & filename,
int step,
amrex::Real time )

◆ output_line_average_ascii() [2/2]

template<typename FType >
void amr_wind::FPlaneAveraging< FType >::output_line_average_ascii ( int step,
amrex::Real time )

◆ set_precision()

template<typename FType >
void amr_wind::FPlaneAveraging< FType >::set_precision ( int p)
inline

change precision of text file output

◆ xlo()

template<typename FType >
amrex::Real amr_wind::FPlaneAveraging< FType >::xlo ( ) const
inline

Member Data Documentation

◆ m_axis

template<typename FType >
const int amr_wind::FPlaneAveraging< FType >::m_axis
protected

◆ m_comp_deriv

template<typename FType >
const bool amr_wind::FPlaneAveraging< FType >::m_comp_deriv
protected

◆ m_dx

template<typename FType >
amrex::Real amr_wind::FPlaneAveraging< FType >::m_dx
protected

line storage for centroids of each cell along a line

◆ m_field

template<typename FType >
const FType& amr_wind::FPlaneAveraging< FType >::m_field
protected

keep track of the last time index that the operator was called

◆ m_last_updated_index

template<typename FType >
int amr_wind::FPlaneAveraging< FType >::m_last_updated_index = -1
protected

level for plane averaging for now fixed at level=0

◆ m_level

template<typename FType >
const int amr_wind::FPlaneAveraging< FType >::m_level
protected
Initial value:
=
0

precision for line plot text file

◆ m_line_average

template<typename FType >
amrex::Vector<amrex::Real> amr_wind::FPlaneAveraging< FType >::m_line_average
protected

number of average components

◆ m_line_deriv

template<typename FType >
amrex::Vector<amrex::Real> amr_wind::FPlaneAveraging< FType >::m_line_deriv
protected

line storage for the derivative of average field

line storage for the average velocity and tracer variables

◆ m_line_xcentroid

template<typename FType >
amrex::Vector<amrex::Real> amr_wind::FPlaneAveraging< FType >::m_line_xcentroid
protected

◆ m_ncell_line

template<typename FType >
int amr_wind::FPlaneAveraging< FType >::m_ncell_line
protected

number of cells in plane

◆ m_ncell_plane

template<typename FType >
int amr_wind::FPlaneAveraging< FType >::m_ncell_plane
protected

bottom of domain in axis direction

◆ m_ncomp

template<typename FType >
int amr_wind::FPlaneAveraging< FType >::m_ncomp
protected

◆ m_precision

template<typename FType >
int amr_wind::FPlaneAveraging< FType >::m_precision = 4
protected

number of cells along line

◆ m_time

template<typename FType >
const SimTime& amr_wind::FPlaneAveraging< FType >::m_time
protected

◆ m_xlo

template<typename FType >
amrex::Real amr_wind::FPlaneAveraging< FType >::m_xlo
protected

mesh spacing in axis direction


The documentation for this class was generated from the following files: