|
IBAMR
IBAMR version 0.20.
|
Initialize or transform Cartesian patch-interior values with a functor. More...
#include <ibtk/CartGridPointwiseFunction.h>

Classes | |
| struct | Centering |
| struct | Values |
Public Member Functions | |
| CartGridPointwiseFunction (std::string object_name, Function function) | |
| Construct a scalar or vector function, owning the supplied functor. More... | |
| CartGridPointwiseFunction (std::string object_name, Function function, TensorStorage storage) | |
| Construct a MatrixNd function with explicit tensor storage. More... | |
| bool | isTimeDependent () const override |
| Conservatively report that the supplied function depends on time. More... | |
| void | setDataOnPatch (int data_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::Variable< NDIM >> var, SAMRAI::tbox::Pointer< SAMRAI::hier::Patch< NDIM >> patch, double data_time, bool initial_time=false, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM >> patch_level=nullptr) override |
| Apply the callback to the allocated double-precision patch data. More... | |
Private Member Functions | |
| void | applyPointwise (Data &data, const SAMRAI::hier::Box< NDIM > &box, const SAMRAI::geom::CartesianPatchGeometry< NDIM > &geometry, double time) |
| Evaluate the callback on patch-interior data of the selected centering. More... | |
Private Attributes | |
| Function | d_function |
| TensorStorage | d_tensor_storage |
Static Private Attributes | |
| static constexpr bool | s_initializes = std::is_invocable_r_v<Value, Function&, const VectorNd&, double, int, int> |
| static constexpr bool | s_transforms |
Methods to set patch interior data. | |
| virtual void | setDataOnPatchHierarchy (int data_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::Variable< NDIM >> var, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM >> hierarchy, double data_time, bool initial_time=false, int coarsest_ln=invalid_level_number, int finest_ln=invalid_level_number) |
| Evaluate the function on the patch interiors on the specified levels of the patch hierarchy using the virtual function setDataOnPatch(). More... | |
| virtual void | setDataOnPatchLevel (int data_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::Variable< NDIM >> var, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM >> patch_level, double data_time, bool initial_time=false) |
| Evaluate the function on the patch interiors on the specified level of the patch hierarchy using the virtual function setDataOnPatch(). More... | |
| std::string | d_object_name |
Data must be CellData, NodeData, SideData, FaceData, or EdgeData with dimension NDIM and scalar type double. Each object supports that centering; data indices supplied at evaluation must refer to allocated data of the corresponding type. This precondition is checked in Debug builds; Release builds use an unchecked static_cast.
Value must be double, VectorNd, VectorXd, or MatrixNd. A double callback is evaluated independently for every depth. VectorNd requires depth NDIM; VectorXd uses the complete depth vector. MatrixNd requires an explicit TensorStorage and the corresponding depth. Symmetric tensor callbacks must return symmetric matrices (checked with Eigen::isApprox()).
Function must support exactly one of these signatures. Scalar results must be convertible to double; vector/tensor results may be Value or compatible Eigen expressions:
The first signature initializes data without reading its previous contents. The second transforms initialized data in place. The inherited initial_time argument does not change which signature is invoked.
depth is the scalar depth index, or zero for whole-vector/tensor callbacks. axis is the orientation for side-, face-, and edge-centered data, or invalid_index for cell- and node-centered data. All supported centerings permit collocated values stored across their depths. Components at different staggered locations are never reconstructed into a vector or tensor.
Ghost values are neither read nor modified. Shared patch-boundary values are evaluated on each patch holding them; no synchronization is performed. Callbacks must not modify other patch values through captured references.
| IBTK::CartGridPointwiseFunction< Value, Data, Function >::CartGridPointwiseFunction | ( | std::string | object_name, |
| Function | function | ||
| ) |
| IBTK::CartGridPointwiseFunction< Value, Data, Function >::CartGridPointwiseFunction | ( | std::string | object_name, |
| Function | function, | ||
| TensorStorage | storage | ||
| ) |
|
overridevirtual |
Implements IBTK::CartGridFunction.
|
overridevirtual |
Implements IBTK::CartGridFunction.
|
private |
|
virtualinherited |
Reimplemented in IBTK::CartGridFunctionSet, IBAMR::SurfaceTensionForceFunction, IBAMR::PhaseChangeDivUSourceFunction, IBAMR::MarangoniSurfaceTensionForceFunction, IBAMR::HeavisideForcingFunction, IBAMR::INSStaggeredStochasticForcing, IBAMR::IBHierarchyIntegrator::IBEulerianSourceFunction, IBAMR::IBHierarchyIntegrator::IBEulerianForceFunction, IBAMR::CFINSForcing, and IBAMR::AdvDiffStochasticForcing.
|
virtualinherited |
Reimplemented in IBTK::CartGridFunctionSet, and IBAMR::CFINSForcing.
|
staticconstexprprivate |
|
staticconstexprprivate |
|
private |
|
private |
|
protectedinherited |