5#include "AMReX_MultiFab.H"
6#include "AMReX_Interpolater.H"
17 return amrex::IndexType::TheCellType();
20 return amrex::IndexType::TheNodeType();
23 return amrex::IndexType(amrex::IntVect::TheDimensionVector(0));
26 return amrex::IndexType(amrex::IntVect::TheDimensionVector(1));
29 return amrex::IndexType(amrex::IntVect::TheDimensionVector(2));
33 return amrex::IndexType::TheCellType();
48 return fname +
"__FS_Old";
51 return fname +
"__FS_NM1";
54 return fname +
"__FS_NPH";
57 return fname +
"__FS_NMH";
76 auto found = name.rfind(
"__FS_");
77 return found == std::string::npos;
84inline amrex::Interpolater*
89 return &amrex::pc_interp;
92 return &amrex::cell_cons_interp;
95 return &amrex::node_bilinear_interp;
98 return &amrex::face_divfree_interp;
101 return &amrex::face_linear_interp;
104 amrex::Abort(
"Unrecognized FieldInterpolator type");
107 return &amrex::cell_cons_interp;
bool is_valid_field_name(const std::string &name)
Definition FieldUtils.H:73
amrex::Interpolater * get_interpolation_operator(const FieldInterpolator itype)
Definition FieldUtils.H:85
amrex::IndexType index_type(const FieldLoc floc)
Definition FieldUtils.H:13
std::string field_name_with_state(const std::string &fname, const FieldState fstate)
Definition FieldUtils.H:41
FieldLoc
Definition FieldDescTypes.H:27
FieldState
Definition FieldDescTypes.H:14
FieldInterpolator
Definition FieldDescTypes.H:37
@ NODE
Node-centered (e.g., for pressure)
@ ZFACE
Face-centered in z-direction.
@ XFACE
Face-centered in x-direction (e.g., face normal velocity)
@ CELL
Cell-centered (default)
@ YFACE
Face-centered in y-direction.
@ New
Same as FieldState::NP1.
@ NP1
Latest state, also aliased to New
@ NMH
State at (n - 1/2) timestep.
@ NPH
State at (n + 1/2) (intermediate) timestep.
@ N
Previous state, also aliased to Old
@ NM1
State at (n - 1) th timestep.
@ Old
Same as FieldState::N.
@ PiecewiseConstant
Constant across cell.
@ NodeBilinear
Bilinear nodal interpolation.
@ FaceLinear
Linear face interpolation.
@ FaceDivFree
Divergence free face interpolation.
@ CellConsLinear
Linear interpolation.
Definition FieldUtils.H:8
FieldState phi_state(const FieldState fstate)
Definition FieldUtils.H:115
FieldState dof_state(const FieldState fstate)
Definition FieldUtils.H:110