IBAMR  IBAMR version 0.19.
Public Member Functions | Protected Attributes | List of all members
IBTK::SCLaplaceOperator Class Reference

Class SCLaplaceOperator is a concrete LaplaceOperator which implements a globally second-order accurate side-centered finite difference discretization of a scalar elliptic operator of the form \( L = C I + \nabla \cdot D \nabla\).

#include <ibtk/SCLaplaceOperator.h>

Inheritance diagram for IBTK::SCLaplaceOperator:
Inheritance graph
[legend]

Public Member Functions

 SCLaplaceOperator (std::string object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db=nullptr, bool homogeneous_bc=true)
 Constructor for class SCLaplaceOperator initializes the operator coefficients and boundary conditions to default values. More...
 
 ~SCLaplaceOperator ()
 Destructor. More...
 
virtual void setPoissonSpecifications (const SAMRAI::solv::PoissonSpecifications &poisson_spec)
 Set the SAMRAI::solv::PoissonSpecifications object used to specify the coefficients for the scalar-valued or vector-valued Laplace operator. More...
 
virtual const SAMRAI::solv::PoissonSpecificationsgetPoissonSpecifications () const
 Get the SAMRAI::solv::PoissonSpecifications object used to specify the coefficients for the scalar-valued or vector-valued Laplace operator. More...
 
virtual void setPhysicalBcCoef (SAMRAI::solv::RobinBcCoefStrategy< NDIM > *bc_coef)
 Set the SAMRAI::solv::RobinBcCoefStrategy object used to specify physical boundary conditions. More...
 
virtual void setPhysicalBcCoefs (const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &bc_coefs)
 Set the SAMRAI::solv::RobinBcCoefStrategy objects used to specify physical boundary conditions. More...
 
virtual const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > & getPhysicalBcCoefs () const
 Get the SAMRAI::solv::RobinBcCoefStrategy object(s) used to specify physical boundary conditions. More...
 

Protected Attributes

SAMRAI::solv::PoissonSpecifications d_poisson_spec
 
std::unique_ptr< SAMRAI::solv::RobinBcCoefStrategy< NDIM > > d_default_bc_coef
 
std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > d_bc_coefs
 

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< HierarchyMathOpsd_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. More...
 
virtual bool getLoggingEnabled () const
 Determine whether logging is enabled or disabled. More...
 
virtual void printClassData (std::ostream &stream)
 Print class data to stream. More...
 

Linear operator functionality.

int d_ncomp = 0
 
SAMRAI::tbox::Pointer< SAMRAI::xfer::VariableFillPattern< NDIM > > d_fill_pattern
 
std::vector< HierarchyGhostCellInterpolation::InterpolationTransactionComponentd_transaction_comps
 
SAMRAI::tbox::Pointer< HierarchyGhostCellInterpolationd_hier_bdry_fill
 
SAMRAI::tbox::Pointer< HierarchyGhostCellInterpolationd_no_fill
 
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > d_hierarchy
 
int d_coarsest_ln = IBTK::invalid_level_number
 
int d_finest_ln = IBTK::invalid_level_number
 
std::vector< SAMRAI::tbox::Pointer< StaggeredPhysicalBoundaryHelper > > d_bc_helpers
 
std::string d_data_refine_type = "NONE"
 
bool d_use_cf_interpolation = true
 
std::string d_data_coarsen_type = "CUBIC_COARSEN"
 
std::string d_bdry_extrap_type = "LINEAR"
 
bool d_use_consistent_type_2_bdry = false
 
void apply (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &x, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &y) override
 Compute y=Ax. More...
 
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=Ax (and y=A'x). More...
 
void deallocateOperatorState () override
 Remove all hierarchy-dependent data computed by initializeOperatorState(). More...
 
 SCLaplaceOperator ()=delete
 Default constructor. More...
 
 SCLaplaceOperator (const SCLaplaceOperator &from)=delete
 Copy constructor. More...
 
SCLaplaceOperatoroperator= (const SCLaplaceOperator &that)=delete
 Assignment operator. More...
 

Constructor & Destructor Documentation

◆ SCLaplaceOperator() [1/3]

IBTK::SCLaplaceOperator::SCLaplaceOperator ( std::string  object_name,
SAMRAI::tbox::Pointer< SAMRAI::tbox::Database input_db = nullptr,
bool  homogeneous_bc = true 
)

◆ ~SCLaplaceOperator()

IBTK::SCLaplaceOperator::~SCLaplaceOperator ( )

◆ SCLaplaceOperator() [2/3]

IBTK::SCLaplaceOperator::SCLaplaceOperator ( )
privatedelete
Note
This constructor is not implemented and should not be used.

◆ SCLaplaceOperator() [3/3]

IBTK::SCLaplaceOperator::SCLaplaceOperator ( const SCLaplaceOperator from)
privatedelete
Note
This constructor is not implemented and should not be used.
Parameters
fromThe value to copy to this object.

Member Function Documentation

◆ apply()

void IBTK::SCLaplaceOperator::apply ( SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  x,
SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  y 
)
overridevirtual

Before calling this function, the form of the vectors x and y should be set properly by the user on all patch interiors on the range of levels covered by the operator. All data in these vectors should be allocated. Thus, the user is responsible for managing the storage for the vectors.

Conditions on arguments:

  • vectors must have same hierarchy
  • vectors must have same variables (except that x must have enough ghost cells for computation of Ax).
Note
In general, the vectors x and y cannot be the same.

Upon return from this function, the y vector will contain the result of the application of A to x.

initializeOperatorState must be called prior to any calls to applyOperator.

See also
initializeOperatorState
Parameters
xinput
youtput: y=Ax

Implements IBTK::GeneralOperator.

Reimplemented in IBTK::VCSCViscousOperator.

◆ initializeOperatorState()

void IBTK::SCLaplaceOperator::initializeOperatorState ( const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  in,
const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  out 
)
overridevirtual
Parameters
ininput vector
outoutput vector
See also
KrylovLinearSolver::initializeSolverState

Reimplemented from IBTK::GeneralOperator.

Reimplemented in IBTK::VCSCViscousOperator.

◆ deallocateOperatorState()

void IBTK::SCLaplaceOperator::deallocateOperatorState ( )
overridevirtual

Remove all hierarchy-dependent data set by initializeOperatorState(). It is safe to call deallocateOperatorState() even if the state is already deallocated.

See also
initializeOperatorState
KrylovLinearSolver::deallocateSolverState

Reimplemented from IBTK::GeneralOperator.

Reimplemented in IBTK::VCSCViscousOperator.

◆ operator=()

SCLaplaceOperator& IBTK::SCLaplaceOperator::operator= ( const SCLaplaceOperator that)
privatedelete
Note
This operator is not implemented and should not be used.
Parameters
thatThe value to assign to this object.
Returns
A reference to this object.

◆ setPoissonSpecifications()

virtual void IBTK::LaplaceOperator::setPoissonSpecifications ( const SAMRAI::solv::PoissonSpecifications poisson_spec)
virtualinherited

◆ getPoissonSpecifications()

virtual const SAMRAI::solv::PoissonSpecifications& IBTK::LaplaceOperator::getPoissonSpecifications ( ) const
virtualinherited

◆ setPhysicalBcCoef()

virtual void IBTK::LaplaceOperator::setPhysicalBcCoef ( SAMRAI::solv::RobinBcCoefStrategy< NDIM > *  bc_coef)
virtualinherited
Note
bc_coef may be nullptr. In this case, default boundary conditions (as supplied to the class constructor) are employed.
Parameters
bc_coefPointer to an object that can set the Robin boundary condition coefficients

◆ setPhysicalBcCoefs()

virtual void IBTK::LaplaceOperator::setPhysicalBcCoefs ( const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &  bc_coefs)
virtualinherited
Note
Any of the elements of bc_coefs may be nullptr. In this case, default boundary conditions (as supplied to the class constructor) are employed for that data depth.
Parameters
bc_coefsVector of pointers to objects that can set the Robin boundary condition coefficients

◆ getPhysicalBcCoefs()

virtual const std::vector<SAMRAI::solv::RobinBcCoefStrategy<NDIM>*>& IBTK::LaplaceOperator::getPhysicalBcCoefs ( ) const
virtualinherited

◆ modifyRhsForBcs()

void IBTK::LinearOperator::modifyRhsForBcs ( SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  y)
overridevirtualinherited

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.

Note
The operator MUST be initialized prior to calling modifyRhsForBcs.
See also
initializeOperatorState
Note
A default implementation evaluates y := y - A*0.

Reimplemented from IBTK::GeneralOperator.

◆ getName()

const std::string& IBTK::GeneralOperator::getName ( ) const
inherited

◆ getIsInitialized()

virtual bool IBTK::GeneralOperator::getIsInitialized ( ) const
virtualinherited

◆ setHomogeneousBc()

virtual void IBTK::GeneralOperator::setHomogeneousBc ( bool  homogeneous_bc)
virtualinherited

◆ getHomogeneousBc()

virtual bool IBTK::GeneralOperator::getHomogeneousBc ( ) const
virtualinherited

◆ setSolutionTime()

virtual void IBTK::GeneralOperator::setSolutionTime ( double  solution_time)
virtualinherited

◆ getSolutionTime()

virtual double IBTK::GeneralOperator::getSolutionTime ( ) const
virtualinherited

◆ setTimeInterval()

virtual void IBTK::GeneralOperator::setTimeInterval ( double  current_time,
double  new_time 
)
virtualinherited

◆ getTimeInterval()

virtual std::pair<double, double> IBTK::GeneralOperator::getTimeInterval ( ) const
virtualinherited

◆ getDt()

virtual double IBTK::GeneralOperator::getDt ( ) const
virtualinherited

◆ setHierarchyMathOps()

virtual void IBTK::GeneralOperator::setHierarchyMathOps ( SAMRAI::tbox::Pointer< HierarchyMathOps hier_math_ops)
virtualinherited

◆ getHierarchyMathOps()

virtual SAMRAI::tbox::Pointer<HierarchyMathOps> IBTK::GeneralOperator::getHierarchyMathOps ( ) const
virtualinherited

◆ applyAdd()

virtual void IBTK::GeneralOperator::applyAdd ( SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  x,
SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  y,
SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  z 
)
virtualinherited

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.

Parameters
xinput vector
yinput vector
zoutput vector, i.e., \(z=F[x]+y\)

Conditions on Parameters:

  • vectors x, y, and z must have same hierarchy
  • vectors x, y, and z must have same structure, depth, etc.

In general, the vectors x and y cannot be the same.

Note
Subclasses may require that the operator be initialized prior to calling applyAdd().
See also
initializeOperatorState
Note
A default implementation is provided which employs apply() and SAMRAI::solv::SAMRAIVectorReal::add().

Reimplemented in IBTK::PETScSNESJacobianJOWrapper, and IBTK::PETScMatLOWrapper.

◆ imposeSolBcs()

virtual void IBTK::GeneralOperator::imposeSolBcs ( SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  u)
virtualinherited

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.

Note
The operator MUST be initialized prior to calling imposeSolBcs.
See also
initializeOperatorState
Note
A default implementation does not modify the sol vector u.

◆ setLoggingEnabled()

virtual void IBTK::GeneralOperator::setLoggingEnabled ( bool  enable_logging = true)
virtualinherited

◆ getLoggingEnabled()

virtual bool IBTK::GeneralOperator::getLoggingEnabled ( ) const
virtualinherited

◆ printClassData()

virtual void IBTK::GeneralOperator::printClassData ( std::ostream &  stream)
virtualinherited

Member Data Documentation

◆ d_ncomp

int IBTK::SCLaplaceOperator::d_ncomp = 0
protected

◆ d_fill_pattern

SAMRAI::tbox::Pointer<SAMRAI::xfer::VariableFillPattern<NDIM> > IBTK::SCLaplaceOperator::d_fill_pattern
protected

◆ d_transaction_comps

std::vector<HierarchyGhostCellInterpolation::InterpolationTransactionComponent> IBTK::SCLaplaceOperator::d_transaction_comps
protected

◆ d_hier_bdry_fill

SAMRAI::tbox::Pointer<HierarchyGhostCellInterpolation> IBTK::SCLaplaceOperator::d_hier_bdry_fill
protected

◆ d_no_fill

SAMRAI::tbox::Pointer<HierarchyGhostCellInterpolation> IBTK::SCLaplaceOperator::d_no_fill
protected

◆ d_hierarchy

SAMRAI::tbox::Pointer<SAMRAI::hier::PatchHierarchy<NDIM> > IBTK::SCLaplaceOperator::d_hierarchy
protected

◆ d_coarsest_ln

int IBTK::SCLaplaceOperator::d_coarsest_ln = IBTK::invalid_level_number
protected

◆ d_finest_ln

int IBTK::SCLaplaceOperator::d_finest_ln = IBTK::invalid_level_number
protected

◆ d_bc_helpers

std::vector<SAMRAI::tbox::Pointer<StaggeredPhysicalBoundaryHelper> > IBTK::SCLaplaceOperator::d_bc_helpers
protected

◆ d_data_refine_type

std::string IBTK::SCLaplaceOperator::d_data_refine_type = "NONE"
protected

◆ d_use_cf_interpolation

bool IBTK::SCLaplaceOperator::d_use_cf_interpolation = true
protected

◆ d_data_coarsen_type

std::string IBTK::SCLaplaceOperator::d_data_coarsen_type = "CUBIC_COARSEN"
protected

◆ d_bdry_extrap_type

std::string IBTK::SCLaplaceOperator::d_bdry_extrap_type = "LINEAR"
protected

◆ d_use_consistent_type_2_bdry

bool IBTK::SCLaplaceOperator::d_use_consistent_type_2_bdry = false
protected

◆ d_poisson_spec

SAMRAI::solv::PoissonSpecifications IBTK::LaplaceOperator::d_poisson_spec
protectedinherited

◆ d_default_bc_coef

std::unique_ptr<SAMRAI::solv::RobinBcCoefStrategy<NDIM> > IBTK::LaplaceOperator::d_default_bc_coef
protectedinherited

◆ d_bc_coefs

std::vector<SAMRAI::solv::RobinBcCoefStrategy<NDIM>*> IBTK::LaplaceOperator::d_bc_coefs
protectedinherited

◆ d_object_name

const std::string IBTK::GeneralOperator::d_object_name
protectedinherited

◆ d_is_initialized

bool IBTK::GeneralOperator::d_is_initialized = false
protectedinherited

◆ d_homogeneous_bc

bool IBTK::GeneralOperator::d_homogeneous_bc
protectedinherited

◆ d_solution_time

double IBTK::GeneralOperator::d_solution_time = std::numeric_limits<double>::quiet_NaN()
protectedinherited

◆ d_current_time

double IBTK::GeneralOperator::d_current_time = std::numeric_limits<double>::quiet_NaN()
protectedinherited

◆ d_new_time

double IBTK::GeneralOperator::d_new_time = std::numeric_limits<double>::quiet_NaN()
protectedinherited

◆ d_hier_math_ops

SAMRAI::tbox::Pointer<HierarchyMathOps> IBTK::GeneralOperator::d_hier_math_ops
protectedinherited

◆ d_hier_math_ops_external

bool IBTK::GeneralOperator::d_hier_math_ops_external = false
protectedinherited

◆ d_enable_logging

bool IBTK::GeneralOperator::d_enable_logging = false
protectedinherited

The documentation for this class was generated from the following file: