IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
Public Member Functions | List of all members
IBAMR::CIBStaggeredStokesOperator Class Reference

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 </home/runner/work/IBAMR/IBAMR/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.
 
 ~CIBStaggeredStokesOperator ()
 Destructor.
 
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().
 
- Public Member Functions inherited from IBTK::LinearOperator
 LinearOperator (std::string object_name, bool homogeneous_bc=false)
 Constructor.
 
 ~LinearOperator ()
 Empty destructor.
 
void modifyRhsForBcs (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &y) override
 Modify y to account for boundary conditions. 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::stringgetName () 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< HierarchyMathOpsgetHierarchyMathOps () 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 $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...
 
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.
 

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.
 
void setSpreadScaleFactor (const double gamma)
 Set scale factor for spread operator.
 
void setRegularizeMobilityFactor (const double delta)
 Set scale factor for regularizing mobility matrix.
 
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)
 

Additional Inherited Members

- 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< HierarchyMathOpsd_hier_math_ops
 
bool d_hier_math_ops_external = false
 
bool d_enable_logging = false
 

Detailed Description

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.

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

See also
INSStaggeredHierarchyIntegrator

Member Function Documentation

◆ initializeOperatorState()

void IBAMR::CIBStaggeredStokesOperator::initializeOperatorState ( const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  in,
const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  out 
)
overridevirtual

Compute hierarchy dependent data required for computing y=Ax.

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.

◆ setNormalizeSpreadForce()

void IBAMR::CIBStaggeredStokesOperator::setNormalizeSpreadForce ( const bool  normalize_force)

Set if the mean of the Lagrangian force is to be subtracted from the Eulerian force variable.

Note
This operation is needed for certain situations like Stokes flow with periodic BCs.

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