IBAMR  IBAMR version 0.19.
Public Member Functions | List of all members
IBAMR::CIBStaggeredStokesOperator Class Referenceabstract

Class CIBStaggeredStokesOperator is a concrete IBTK::LinearOperator which implements a staggered-grid (MAC) discretization of the incompressible Stokes operator while maintaining the constraint of rigidity for the immersed structures. More...

#include <ibamr/CIBStaggeredStokesOperator.h>

Inheritance diagram for IBAMR::CIBStaggeredStokesOperator:
Inheritance graph
[legend]

Public Member Functions

 CIBStaggeredStokesOperator (std::string object_name, SAMRAI::tbox::Pointer< IBAMR::CIBStrategy > cib_strategy, bool homogeneous_bc=true, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db=nullptr)
 Class constructor. More...
 
 ~CIBStaggeredStokesOperator ()
 Destructor. 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. More...
 
void deallocateOperatorState () override
 Remove all hierarchy dependent data allocated by initializeOperatorState(). More...
 

Linear operator functionality.

SAMRAI::tbox::Pointer< IBAMR::CIBStrategyd_cib_strategy
 
double d_scale_interp = 1.0
 
double d_scale_spread = 1.0
 
double d_reg_mob_factor = 1.0
 
bool d_normalize_spread_force = false
 
virtual void apply (Vec x, Vec y)
 
void setInterpScaleFactor (const double beta)
 Set scale factor for interp operator. More...
 
void setSpreadScaleFactor (const double gamma)
 Set scale factor for spread operator. More...
 
void setRegularizeMobilityFactor (const double delta)
 Set scale factor for regularizing mobility matrix. More...
 
void setNormalizeSpreadForce (const bool normalize_force)
 Set if the mean of the Lagrangian force is to be subtracted from the Eulerian force variable. More...
 
virtual void modifyRhsForBcs (Vec y)
 
virtual void imposeSolBcs (Vec x)
 
 CIBStaggeredStokesOperator (const CIBStaggeredStokesOperator &from)=delete
 Copy constructor. More...
 
CIBStaggeredStokesOperatoroperator= (const CIBStaggeredStokesOperator &that)=delete
 Assignment operator. More...
 

General operator functionality.

const std::string & getName () const
 Return the object name. More...
 
virtual bool getIsInitialized () const
 Return whether the operator is initialized. More...
 
virtual void setHomogeneousBc (bool homogeneous_bc)
 Set whether the operator should use homogeneous boundary conditions. More...
 
virtual bool getHomogeneousBc () const
 Return whether the operator is using homogeneous boundary conditions. More...
 
virtual void setSolutionTime (double solution_time)
 Set the time at which the solution is to be evaluated. More...
 
virtual double getSolutionTime () const
 Get the time at which the solution is being evaluated. More...
 
virtual void setTimeInterval (double current_time, double new_time)
 Set the current time interval. More...
 
virtual std::pair< double, doublegetTimeInterval () const
 Get the current time interval. More...
 
virtual double getDt () const
 Get the current time step size. More...
 
virtual void setHierarchyMathOps (SAMRAI::tbox::Pointer< HierarchyMathOps > hier_math_ops)
 Set the HierarchyMathOps object used by the operator. More...
 
virtual SAMRAI::tbox::Pointer< HierarchyMathOps > getHierarchyMathOps () const
 Get the HierarchyMathOps object used by the operator. More...
 
virtual void apply (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &x, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &y)=0
 Compute \(y=F[x]\). More...
 
virtual void applyAdd (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &x, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &y, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &z)
 Compute \(z=F[x]+y\). 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. 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...
 

Detailed Description

This class is intended to be used with an iterative (Krylov or Newton-Krylov) incompressible flow solver.

See also
INSStaggeredHierarchyIntegrator

Constructor & Destructor Documentation

◆ CIBStaggeredStokesOperator() [1/2]

IBAMR::CIBStaggeredStokesOperator::CIBStaggeredStokesOperator ( std::string  object_name,
SAMRAI::tbox::Pointer< IBAMR::CIBStrategy cib_strategy,
bool  homogeneous_bc = true,
SAMRAI::tbox::Pointer< SAMRAI::tbox::Database input_db = nullptr 
)

◆ ~CIBStaggeredStokesOperator()

IBAMR::CIBStaggeredStokesOperator::~CIBStaggeredStokesOperator ( )

◆ CIBStaggeredStokesOperator() [2/2]

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

Member Function Documentation

◆ initializeOperatorState()

void IBAMR::CIBStaggeredStokesOperator::initializeOperatorState ( const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  in,
const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  out 
)
overridevirtual
Note
CIBStaggeredStokesOperator requires a different communication pattern than StaggeredStokes operator. In particular, CIBStaggeredStokesOperator needs ghost cells to be filled in corners and (in 3D) edges.

Reimplemented from IBTK::GeneralOperator.

◆ deallocateOperatorState()

void IBAMR::CIBStaggeredStokesOperator::deallocateOperatorState ( )
overridevirtual

Reimplemented from IBTK::GeneralOperator.

◆ apply() [1/2]

virtual void IBAMR::CIBStaggeredStokesOperator::apply ( Vec  x,
Vec  y 
)
virtual

◆ setInterpScaleFactor()

void IBAMR::CIBStaggeredStokesOperator::setInterpScaleFactor ( const double  beta)

◆ setSpreadScaleFactor()

void IBAMR::CIBStaggeredStokesOperator::setSpreadScaleFactor ( const double  gamma)

◆ setRegularizeMobilityFactor()

void IBAMR::CIBStaggeredStokesOperator::setRegularizeMobilityFactor ( const double  delta)

◆ setNormalizeSpreadForce()

void IBAMR::CIBStaggeredStokesOperator::setNormalizeSpreadForce ( const bool  normalize_force)
Note
This operation is needed for certain situations like Stokes flow with periodic BCs.

◆ modifyRhsForBcs() [1/2]

virtual void IBAMR::CIBStaggeredStokesOperator::modifyRhsForBcs ( Vec  y)
virtual

◆ imposeSolBcs() [1/2]

virtual void IBAMR::CIBStaggeredStokesOperator::imposeSolBcs ( Vec  x)
virtual

◆ operator=()

CIBStaggeredStokesOperator& IBAMR::CIBStaggeredStokesOperator::operator= ( const CIBStaggeredStokesOperator 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.

◆ modifyRhsForBcs() [2/2]

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

◆ apply() [2/2]

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

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.

Parameters
xinput vector
youtput vector, i.e., \(y=F[x]\)

Conditions on Parameters:

  • vectors x and y must have same hierarchy
  • vectors x and y 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 apply().
See also
initializeOperatorState

Implemented in IBTK::PETScSNESJacobianJOWrapper, IBTK::PETScMFFDJacobianOperator, IBTK::PETScSNESFunctionGOWrapper, IBAMR::ConvectiveOperator, IBAMR::VCStaggeredStokesOperator, IBTK::PETScMatLOWrapper, IBTK::SCLaplaceOperator, IBTK::CCLaplaceOperator, and IBTK::VCSCViscousOperator.

◆ 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() [2/2]

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_cib_strategy

SAMRAI::tbox::Pointer<IBAMR::CIBStrategy> IBAMR::CIBStaggeredStokesOperator::d_cib_strategy
protected

◆ d_scale_interp

double IBAMR::CIBStaggeredStokesOperator::d_scale_interp = 1.0
protected

◆ d_scale_spread

double IBAMR::CIBStaggeredStokesOperator::d_scale_spread = 1.0
protected

◆ d_reg_mob_factor

double IBAMR::CIBStaggeredStokesOperator::d_reg_mob_factor = 1.0
protected

◆ d_normalize_spread_force

bool IBAMR::CIBStaggeredStokesOperator::d_normalize_spread_force = false
protected

◆ 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: