IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
|
Class CellConvectiveOperator is an abstract class for an implementation of a convective differencing operator. More...
#include </home/runner/work/IBAMR/IBAMR/include/ibamr/CellConvectiveOperator.h>
Public Member Functions | |
CellConvectiveOperator (std::string object_name, SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > > Q_cell_var, int Q_min_ghost_cell_width, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, ConvectiveDifferencingType difference_form, std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > bc_coefs) | |
Class constructor. | |
~CellConvectiveOperator ()=default | |
Default destructor. | |
virtual void | interpolateToFaceOnHierarchy (int q_interp_idx, int Q_cell_idx, int u_idx, bool synch_cf_bdry=true) |
Interpolate a cell-centered field Q to a face-centered field q, possibly using the provided advection velocity field. | |
virtual void | evaluateAdvectiveFluxOnHierarchy (int q_flux_idx, int Q_cell_idx, int u_idx, const bool synch_cf_bdry=true) |
Evaluate the face-centered flux Q to a face-centered field q using the provided advection velocity field. | |
virtual void | computeAdvectiveDerivativeOnHierarchy (int N_cell_idx, int q_interp_idx, int u_idx, bool synch_cf_bdry=true) |
Compute the advective derivative N = u * grad Q on the patch hierarchy. | |
virtual void | computeConservativeDerivativeOnHierarchy (int N_cell_idx, int q_flux_idx, bool synch_cf_bdry=true) |
Compute the conservative derivative N = div(Q u) on the patch hierarchy. | |
virtual void | computeSkewSymmetricDerivativeOnHierarchy (int N_cell_idx, int q_interp_idx, int q_flux_idx, int u_idx, bool synch_cf_bdry=true) |
Compute the skew-symmetric derivative N = 0.5[u * grad Q + div(Q u)] on the patch hierarchy. | |
virtual void | interpolateToFaceOnPatch (SAMRAI::pdat::FaceData< NDIM, double > &q_interp_data, const SAMRAI::pdat::CellData< NDIM, double > &Q_cell_data, const SAMRAI::pdat::FaceData< NDIM, double > &u_data, const SAMRAI::hier::Patch< NDIM > &patch)=0 |
Interpolate a cell-centered field Q to a face-centered field q on a single grid patch. | |
virtual void | evaluateAdvectiveFluxOnPatch (SAMRAI::pdat::FaceData< NDIM, double > &q_flux_data, const SAMRAI::pdat::CellData< NDIM, double > &Q_cell_data, const SAMRAI::pdat::FaceData< NDIM, double > &u_data, const SAMRAI::hier::Patch< NDIM > &patch) |
Evaluate the face-centered flux Q to a face-centered field q using the provided advection velocity field. More... | |
void | applyConvectiveOperator (int Q_idx, int N_idx) override |
Compute N = u * grad Q or N = div(Q u). | |
Public Member Functions inherited from IBAMR::ConvectiveOperator | |
ConvectiveOperator (std::string object_name, ConvectiveDifferencingType difference_form) | |
Class constructor. | |
~ConvectiveOperator () | |
Destructor. | |
void | setAdvectionVelocity (int u_idx) |
Set the patch data index corresponding to the advection velocity to be used when computing the convective derivative. | |
int | getAdvectionVelocity () const |
Get the patch data index corresponding to the advection velocity used when computing the convective derivative. | |
void | setConvectiveDifferencingType (ConvectiveDifferencingType difference_form) |
Set the convective differencing form to be used by the operator. | |
ConvectiveDifferencingType | getConvectiveDifferencingType () const |
Get the convective differencing form used by the operator. | |
void | apply (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &x, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &y) override |
Compute . More... | |
Public Member Functions inherited from IBTK::GeneralOperator | |
GeneralOperator (std::string object_name, bool homogeneous_bc=false) | |
Constructor. | |
virtual | ~GeneralOperator () |
Empty virtual destructor. | |
const std::string & | getName () const |
Return the object name. | |
virtual bool | getIsInitialized () const |
Return whether the operator is initialized. | |
virtual void | setHomogeneousBc (bool homogeneous_bc) |
Set whether the operator should use homogeneous boundary conditions. | |
virtual bool | getHomogeneousBc () const |
Return whether the operator is using homogeneous boundary conditions. | |
virtual void | setSolutionTime (double solution_time) |
Set the time at which the solution is to be evaluated. | |
virtual double | getSolutionTime () const |
Get the time at which the solution is being evaluated. | |
virtual void | setTimeInterval (double current_time, double new_time) |
Set the current time interval. | |
virtual std::pair< double, double > | getTimeInterval () const |
Get the current time interval. | |
virtual double | getDt () const |
Get the current time step size. | |
virtual void | setHierarchyMathOps (SAMRAI::tbox::Pointer< HierarchyMathOps > hier_math_ops) |
Set the HierarchyMathOps object used by the operator. | |
virtual SAMRAI::tbox::Pointer< HierarchyMathOps > | getHierarchyMathOps () const |
Get the HierarchyMathOps object used by the operator. | |
virtual void | applyAdd (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &x, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &y, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &z) |
Compute . More... | |
virtual void | modifyRhsForBcs (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &y) |
Modify the RHS vector to account for boundary conditions. More... | |
virtual void | imposeSolBcs (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &u) |
Impose boudary conditions in the solution vector. More... | |
virtual void | setLoggingEnabled (bool enable_logging=true) |
Enable or disable logging. | |
virtual bool | getLoggingEnabled () const |
Determine whether logging is enabled or disabled. | |
virtual void | printClassData (std::ostream &stream) |
Print class data to stream. | |
General operator functionality. | |
void | initializeOperatorState (const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &in, const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &out) override |
Compute hierarchy dependent data required for computing y=F[x] and z=F[x]+y. More... | |
void | deallocateOperatorState () override |
Remove all hierarchy dependent data allocated by initializeOperatorState(). | |
Additional Inherited Members | |
Protected Attributes inherited from IBAMR::ConvectiveOperator | |
ConvectiveDifferencingType | d_difference_form |
int | d_u_idx = IBTK::invalid_index |
Protected Attributes inherited from IBTK::GeneralOperator | |
const std::string | d_object_name |
bool | d_is_initialized = false |
bool | d_homogeneous_bc |
double | d_solution_time = std::numeric_limits<double>::quiet_NaN() |
double | d_current_time = std::numeric_limits<double>::quiet_NaN() |
double | d_new_time = std::numeric_limits<double>::quiet_NaN() |
SAMRAI::tbox::Pointer< HierarchyMathOps > | d_hier_math_ops |
bool | d_hier_math_ops_external = false |
bool | d_enable_logging = false |
Class CellConvectiveOperator is an abstract class for an implementation of a convective differencing operator.
|
virtual |
Evaluate the face-centered flux Q to a face-centered field q using the provided advection velocity field.
A default implementation is provided that uses interpolateToFaceOnPatch to determine the advective fluxes.
|
overridevirtual |
Compute hierarchy dependent data required for computing y=F[x] and z=F[x]+y.
The vector arguments for apply(), applyAdd(), etc, need not match those for initializeOperatorState(). However, there must be a certain degree of similarity, including
It is safe to call initializeOperatorState() when the state is already initialized. In this case, the operator state is first deallocated and then reinitialized.
Conditions on arguments:
Call deallocateOperatorState() to remove any data allocated by this method.
in | input vector |
out | output vector |
Reimplemented from IBTK::GeneralOperator.