Field operations
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
|
Functions | |
template<typename T1 , typename T2 > | |
void | amr_wind::field_ops::add (T1 &dst, const T2 &src, int srccomp, int dstcomp, int numcomp, const amrex::IntVect &nghost) |
template<typename T1 , typename T2 > | |
void | amr_wind::field_ops::add (T1 &dst, const T2 &src, int srccomp, int dstcomp, int numcomp, int nghost) |
template<typename T1 , typename T2 > | |
void | amr_wind::field_ops::divide (T1 &dst, const T2 &src, const int srccomp, const int dstcomp, const int ncomp_src, const int ncomp_dst, const amrex::IntVect &nghost) |
template<typename T1 , typename T2 > | |
void | amr_wind::field_ops::divide (T1 &dst, const T2 &src, const int srccomp, const int dstcomp, const int ncomp_src, const int ncomp_dst, const int nghost) |
template<typename T1 , typename T2 > | |
void | amr_wind::field_ops::copy (T1 &dst, const T2 &src, const int srccomp, const int dstcomp, const int numcomp, const amrex::IntVect &nghost) |
template<typename T1 , typename T2 > | |
void | amr_wind::field_ops::copy (T1 &dst, const T2 &src, int srccomp, int dstcomp, int numcomp, int nghost) |
template<typename T1 , typename T2 > | |
void | amr_wind::field_ops::saxpy (T1 &dst, const amrex::Real a, const T2 &src, const int srccomp, const int dstcomp, const int numcomp, const amrex::IntVect &nghost) |
template<typename T1 , typename T2 > | |
void | amr_wind::field_ops::saxpy (T1 &dst, const amrex::Real a, const T2 &src, const int srccomp, const int dstcomp, const int numcomp, const int nghost) |
template<typename T1 , typename T2 > | |
void | amr_wind::field_ops::xpay (T1 &dst, const amrex::Real a, const T2 &src, const int srccomp, const int dstcomp, const int numcomp, const amrex::IntVect &nghost) |
template<typename T1 , typename T2 > | |
void | amr_wind::field_ops::xpay (T1 &dst, const amrex::Real a, const T2 &src, const int srccomp, const int dstcomp, const int numcomp, const int nghost) |
template<typename T1 , typename T2 , typename T3 > | |
void | amr_wind::field_ops::lincomb (T1 &dst, const amrex::Real a, const T2 &x, const int xcomp, const amrex::Real b, const T3 &y, const int ycomp, const int dstcomp, const int numcomp, const amrex::IntVect &nghost) |
template<typename T1 , typename T2 , typename T3 > | |
void | amr_wind::field_ops::lincomb (T1 &dst, const amrex::Real a, const T2 &x, const int xcomp, const amrex::Real b, const T3 &y, const int ycomp, const int dstcomp, const int numcomp, const int nghost) |
template<typename FType > | |
void | amr_wind::field_ops::lower_bound (FType &field, const amrex::Real min_value, const int icomp=0) |
template<typename FType > | |
amrex::Real | amr_wind::field_ops::global_max_magnitude (FType &field) |
template<typename FType > | |
void | amr_wind::field_ops::normalize (FType &field) |
amrex::IndexType | amr_wind::field_impl::index_type (const FieldLoc floc) |
std::string | amr_wind::field_impl::field_name_with_state (const std::string &fname, const FieldState fstate) |
bool | amr_wind::field_impl::is_valid_field_name (const std::string &name) |
amrex::Interpolater * | amr_wind::field_impl::get_interpolation_operator (const FieldInterpolator itype) |
Detailed Description
Operators for manipulating fields and computing derived quantities.
This group documents functions that provide various operations defined on the field. These operations can be grouped into two major categories: simple linear algebra operations (e.g., saxpy), and discretization operators such as gradient, laplacian computations.
Function Documentation
◆ add() [1/2]
|
inline |
Add two fields \(y = x + y\)
- Template Parameters
-
T1 Field or ScratchField T2 Field or ScratchField
◆ add() [2/2]
|
inline |
Add two fields \(y = x + y\)
- Template Parameters
-
T1 Field or ScratchField T2 Field or ScratchField
◆ copy() [1/2]
|
inline |
Copy source field to destination field
- Template Parameters
-
T1 Field or ScratchField T2 Field or ScratchField
◆ copy() [2/2]
|
inline |
Copy source field to destination field
- Template Parameters
-
T1 Field or ScratchField T2 Field or ScratchField
◆ divide() [1/2]
|
inline |
Divide two fields \(y = y / x\)
- Template Parameters
-
T1 Field or ScratchField T2 Field or ScratchField
- Parameters
-
[out] dst Field that is updated [in] src Field to be divisor [in] srccomp Starting component index of source field [in] dstcomp Starting component index of destination field [in] ncomp_src Number of components to divide by [in] ncomp_dst Number of components to be divided [in] nghost Number of ghost cells to be updated
◆ divide() [2/2]
|
inline |
Divide two fields \(y = y / x\)
- Template Parameters
-
T1 Field or ScratchField T2 Field or ScratchField
- Parameters
-
[out] dst Field that is updated [in] src Field to be divisor [in] srccomp Starting component index of source field [in] dstcomp Starting component index of destination field [in] ncomp_src Number of components to divide by [in] ncomp_dst Number of components to be divided [in] nghost Number of ghost cells to be updated
◆ field_name_with_state()
|
inline |
Given a base field name and a state, return a unique string that identifies this state in the field repository.
◆ get_interpolation_operator()
|
inline |
Return an AMReX coarse-to-fine field interpolation object based on amr_wind::FieldInterpolator
◆ global_max_magnitude()
|
inline |
Computes the global maximum of a field from all levels
- Parameters
-
[in] field Field for global maximum magnitude
◆ index_type()
|
inline |
Convert amr_wind::FieldLoc to index type for use with AMReX objects.
◆ is_valid_field_name()
|
inline |
Check if the field is not a reserved field name
In amr_wind::FieldRepo, field with states are stored using suffixes that create a unique string to identify different states. This function checks if the user specified field name matches any of those reserved suffixes.
.
- Returns
- True if the field is not a reserved field name
◆ lincomb() [1/2]
|
inline |
Perform operation \(z = a x + b y\)
- Template Parameters
-
T1 Field or ScratchField T2 Field or ScratchField
- Parameters
-
[out] dst Field that is updated [in] a Coefficient [in] x Field to be added [in] xcomp Starting component index of x
field[in] b Coefficient [in] y Field to be added [in] ycomp Starting component index of y
field[in] dstcomp Starting component index of destination field [in] numcomp Number of components to be updated [in] nghost Number of ghost cells to be updated
◆ lincomb() [2/2]
|
inline |
Perform operation \(z = a x + b y\)
- Template Parameters
-
T1 Field or ScratchField T2 Field or ScratchField
- Parameters
-
[out] dst Field that is updated [in] a Coefficient [in] x Field to be added [in] xcomp Starting component index of x
field[in] b Coefficient [in] y Field to be added [in] ycomp Starting component index of y
field[in] dstcomp Starting component index of destination field [in] numcomp Number of components to be updated [in] nghost Number of ghost cells to be updated
◆ lower_bound()
|
inline |
Set the lower bound for a given scalar field
- Parameters
-
[in] field Field that will be clipped [in] min_value Minimum value for a given field [in] icomp Component to set the minimum bound
◆ normalize()
|
inline |
Normalizes a field using its magnitude
- Parameters
-
[in] field Field that needs to be normalized
◆ saxpy() [1/2]
|
inline |
Perform operation \(y = a x + y\)
- Template Parameters
-
T1 Field or ScratchField T2 Field or ScratchField
◆ saxpy() [2/2]
|
inline |
Perform operation \(y = a x + y\)
- Template Parameters
-
T1 Field or ScratchField T2 Field or ScratchField
◆ xpay() [1/2]
|
inline |
Perform operation \(y = x + a y\)
- Template Parameters
-
T1 Field or ScratchField T2 Field or ScratchField
◆ xpay() [2/2]
|
inline |
Perform operation \(y = x + a y\)
- Template Parameters
-
T1 Field or ScratchField T2 Field or ScratchField
Generated by 1.12.0