IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
|
Class GeneralOperator provides an abstract interface for the specification of general operators to compute and . More...
#include </home/runner/work/IBAMR/IBAMR/ibtk/include/ibtk/GeneralOperator.h>
Public Member Functions | |
GeneralOperator (std::string object_name, bool homogeneous_bc=false) | |
Constructor. | |
virtual | ~GeneralOperator () |
Empty virtual destructor. | |
General operator functionality. | |
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 | apply (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &x, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &y)=0 |
Compute . More... | |
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 | initializeOperatorState (const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &in, const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &out) |
Compute hierarchy dependent data required for computing y=F[x] and z=F[x]+y. More... | |
virtual void | deallocateOperatorState () |
Remove all hierarchy dependent data allocated by initializeOperatorState(). 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... | |
Logging functions. | |
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 |
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. | |
Class GeneralOperator provides an abstract interface for the specification of general operators to compute and .
|
pure virtual |
Compute .
Before calling apply(), the form of the vectors x and y should be set properly by the user on all patch interiors on the specified range of levels in the patch hierarchy. The user is responsible for all data management for the quantities associated with the vectors. In particular, patch data in these vectors must be allocated prior to calling this method.
x | input vector |
y | output vector, i.e., |
Conditions on Parameters:
In general, the vectors x and y cannot be the same.
Implemented in IBAMR::VCStaggeredStokesOperator, IBAMR::ConvectiveOperator, IBTK::VCSCViscousOperator, IBTK::SCLaplaceOperator, IBTK::PETScSNESJacobianJOWrapper, IBTK::PETScSNESFunctionGOWrapper, IBTK::PETScMFFDJacobianOperator, IBTK::PETScMatLOWrapper, and IBTK::CCLaplaceOperator.
|
virtual |
Compute .
Before calling applyAdd(), the form of the vectors x, y, and z should be set properly by the user on all patch interiors on the specified range of levels in the patch hierarchy. The user is responsible for all data management for the quantities associated with the vectors. In particular, patch data in these vectors must be allocated prior to calling this method.
x | input vector |
y | input vector |
z | output vector, i.e., |
Conditions on Parameters:
In general, the vectors x and y cannot be the same.
Reimplemented in IBTK::PETScSNESJacobianJOWrapper, and IBTK::PETScMatLOWrapper.
|
virtual |
Remove all hierarchy dependent data allocated by initializeOperatorState().
Reimplemented in IBAMR::INSStaggeredWavePropConvectiveOperator, IBAMR::INSStaggeredUpwindConvectiveOperator, IBAMR::INSStaggeredStabilizedPPMConvectiveOperator, IBAMR::INSStaggeredPPMConvectiveOperator, IBAMR::INSStaggeredCUIConvectiveOperator, IBAMR::INSStaggeredCenteredConvectiveOperator, IBAMR::INSCollocatedWavePropConvectiveOperator, IBAMR::INSCollocatedPPMConvectiveOperator, IBAMR::INSCollocatedCenteredConvectiveOperator, IBAMR::CIBStaggeredStokesOperator, IBAMR::CFUpperConvectiveOperator, IBAMR::CellConvectiveOperator, IBAMR::AdvDiffWavePropConvectiveOperator, IBTK::VCSCViscousOperator, IBTK::SCLaplaceOperator, IBTK::PETScSNESJacobianJOWrapper, IBTK::PETScSNESFunctionGOWrapper, IBTK::PETScMFFDJacobianOperator, IBTK::PETScMatLOWrapper, and IBTK::CCLaplaceOperator.
|
virtual |
Impose boudary conditions in the solution vector.
Before calling this function, the form of the vector y should be set properly by the user on all patch interiors on the range of levels covered by the operator. All data in this vector should be allocated. The user is responsible for managing the storage for the vectors.
|
virtual |
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 in IBAMR::INSStaggeredWavePropConvectiveOperator, IBAMR::INSStaggeredUpwindConvectiveOperator, IBAMR::INSStaggeredStabilizedPPMConvectiveOperator, IBAMR::INSStaggeredPPMConvectiveOperator, IBAMR::INSStaggeredCUIConvectiveOperator, IBAMR::INSStaggeredCenteredConvectiveOperator, IBAMR::INSCollocatedWavePropConvectiveOperator, IBAMR::INSCollocatedPPMConvectiveOperator, IBAMR::INSCollocatedCenteredConvectiveOperator, IBAMR::CIBStaggeredStokesOperator, IBAMR::CFUpperConvectiveOperator, IBAMR::CellConvectiveOperator, IBAMR::AdvDiffWavePropConvectiveOperator, IBTK::VCSCViscousOperator, IBTK::SCLaplaceOperator, IBTK::PETScSNESJacobianJOWrapper, IBTK::PETScSNESFunctionGOWrapper, IBTK::PETScMFFDJacobianOperator, IBTK::PETScMatLOWrapper, and IBTK::CCLaplaceOperator.
|
virtual |
Modify the RHS vector to account for boundary conditions.
Before calling this function, the form of the vector y should be set properly by the user on all patch interiors on the range of levels covered by the operator. All data in this vector should be allocated. The user is responsible for managing the storage for the vectors.
Reimplemented in IBTK::LinearOperator.