IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
|
Class FACPreconditionerStrategy provides an interface for specifying the problem-specific operations needed to implement a specific FAC preconditioner. More...
#include </home/runner/work/IBAMR/IBAMR/ibtk/include/ibtk/FACPreconditionerStrategy.h>
Public Member Functions | |
FACPreconditionerStrategy (std::string object_name, bool homogeneous_bc=false) | |
Constructor. | |
virtual | ~FACPreconditionerStrategy ()=default |
Empty virtual desctructor. | |
const std::string & | getName () const |
Return the object name. | |
virtual bool | getIsInitialized () const |
Return whether the operator is initialized. | |
virtual void | setFACPreconditioner (SAMRAI::tbox::ConstPointer< FACPreconditioner > preconditioner) |
Method to allow the FACPreconditioner object to register itself with the concrete FACPreconditionerStrategy. | |
virtual void | setHomogeneousBc (bool homogeneous_bc) |
Set whether the solver should use homogeneous boundary conditions. | |
virtual bool | getHomogeneousBc () const |
Return whether the solver 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 | setToZero (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &error, int level_num)=0 |
Zero-out the provided vector on the specified level of the patch hierarchy. | |
virtual void | restrictResidual (const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &source, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &dest, int dest_level_num)=0 |
Restrict the residual from the source vector to the destination vector on the specified level of the patch hierarchy. More... | |
virtual void | prolongError (const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &source, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &dest, int dest_level_num)=0 |
Prolong the error from the source vector to the destination vector on the specified level of the patch hierarchy. More... | |
virtual void | prolongErrorAndCorrect (const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &source, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &dest, int dest_level_num)=0 |
Prolong the error from the source vector to the destination vector on the specified level of the patch hierarchy and correct the fine-grid error. More... | |
virtual void | smoothError (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &error, const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &residual, int level_num, int num_sweeps, bool performing_pre_sweeps, bool performing_post_sweeps)=0 |
Smooth the error by the specified number of sweeps on the specified level of the patch hierarchy. | |
virtual bool | solveCoarsestLevel (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &error, const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &residual, int coarsest_level_num)=0 |
Solve the system of equations on the coarsest level of the patch hierarchy. More... | |
virtual void | computeResidual (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &residual, const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &solution, const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &rhs, int coarsest_level_num, int finest_level_num)=0 |
Compute the composite-grid residual on the specified range of levels of the patch hierarchy. | |
virtual void | initializeOperatorState (const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &solution, const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &rhs) |
Initialize any hierarchy-dependent data. | |
virtual void | deallocateOperatorState () |
Deallocate any hierarchy-dependent data initialized by initializeOperatorState(). | |
virtual void | allocateScratchData () |
Allocate scratch data. | |
virtual void | deallocateScratchData () |
Deallocate scratch data. | |
Logging functions. | |
SAMRAI::tbox::ConstPointer< IBTK::FACPreconditioner > | d_preconditioner |
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() |
virtual void | printClassData (std::ostream &stream) |
Print class data to stream. | |
virtual SAMRAI::tbox::Pointer< SAMRAI::solv::SAMRAIVectorReal< NDIM, double > > | getLevelSAMRAIVectorReal (const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &vec, int level_num) const |
Return a SAMRAIVectorReal object that corresponds to the given object but restricted to a single level of the patch hierarchy. | |
Class FACPreconditionerStrategy provides an interface for specifying the problem-specific operations needed to implement a specific FAC preconditioner.
This class is similar to the SAMRAI class SAMRAI::solv::FACOperatorStrategy, except that certain methods required by the SAMRAI::solv::FACOperatorStrategy interface have been modified (specifically, smoothError()) or removed (specifically, restrictSolution() and postprocessOneCycle()). This interface also requires the implementation of a method, prolongError(), that is optimized for the case in which the FAC preconditioner algorithm is configured not to use pre-smoothing sweeps.
|
pure virtual |
Prolong the error from the source vector to the destination vector on the specified level of the patch hierarchy.
Implemented in IBAMR::StaggeredStokesFACPreconditionerStrategy, and IBTK::PoissonFACPreconditionerStrategy.
|
pure virtual |
Prolong the error from the source vector to the destination vector on the specified level of the patch hierarchy and correct the fine-grid error.
Implemented in IBAMR::StaggeredStokesFACPreconditionerStrategy, and IBTK::PoissonFACPreconditionerStrategy.
|
pure virtual |
Restrict the residual from the source vector to the destination vector on the specified level of the patch hierarchy.
Implemented in IBAMR::StaggeredStokesFACPreconditionerStrategy, IBTK::VCSCViscousOpPointRelaxationFACOperator, and IBTK::PoissonFACPreconditionerStrategy.
|
pure virtual |
Solve the system of equations on the coarsest level of the patch hierarchy.
Implemented in IBAMR::StaggeredStokesFACPreconditionerStrategy, IBTK::SCPoissonPointRelaxationFACOperator, IBTK::CCPoissonPointRelaxationFACOperator, IBTK::CCPoissonLevelRelaxationFACOperator, and IBTK::CCPoissonBoxRelaxationFACOperator.