IBAMR  IBAMR version 0.19.
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
IBAMR::AdvDiffWavePropConvectiveOperator Class Reference

Class AdvDiffWavePropConvectiveOperator is a concrete ConvectiveOperator that implements a convective operator based on the wave propagation method. More...

#include <ibamr/AdvDiffWavePropConvectiveOperator.h>

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

Public Member Functions

 AdvDiffWavePropConvectiveOperator (std::string object_name, SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > > Q_var, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, const ConvectiveDifferencingType difference_form, std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > conc_bc_coefs)
 Class constructor. More...
 
 ~AdvDiffWavePropConvectiveOperator ()
 Destructor. More...
 
void applyConvectiveOperator (int Q_idx, int Y_idx) override
 Compute the action of the convective operator. 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=F[x] and z=F[x]+y. More...
 
void deallocateOperatorState () override
 Remove all hierarchy dependent data allocated by initializeOperatorState(). More...
 
void setAdvectionVelocity (int u_idx)
 Set the patch data index corresponding to the advection velocity to be used when computing the convective derivative. More...
 
int getAdvectionVelocity () const
 Get the patch data index corresponding to the advection velocity used when computing the convective derivative. More...
 
void setConvectiveDifferencingType (ConvectiveDifferencingType difference_form)
 Set the convective differencing form to be used by the operator. More...
 
ConvectiveDifferencingType getConvectiveDifferencingType () const
 Get the convective differencing form used by the operator. More...
 

Static Public Member Functions

static SAMRAI::tbox::Pointer< ConvectiveOperatorallocate_operator (const std::string &object_name, SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > > Q_var, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, const ConvectiveDifferencingType difference_form, const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &conc_bc_coefs)
 Static function to construct an AdvDiffWavePropConvectiveOperator. More...
 

Private Member Functions

 AdvDiffWavePropConvectiveOperator ()=delete
 Default constructor. More...
 
 AdvDiffWavePropConvectiveOperator (const AdvDiffWavePropConvectiveOperator &from)=delete
 Copy constructor. More...
 
AdvDiffWavePropConvectiveOperatoroperator= (const AdvDiffWavePropConvectiveOperator &that)=delete
 Assignment operator. More...
 

Private Attributes

SAMRAI::tbox::Pointer< SAMRAI::xfer::CoarsenAlgorithm< NDIM > > d_coarsen_alg_Q
 
std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::CoarsenSchedule< NDIM > > > d_coarsen_scheds_Q
 
SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineAlgorithm< NDIM > > d_ghostfill_alg_Q
 
SAMRAI::tbox::Pointer< SAMRAI::xfer::RefinePatchStrategy< NDIM > > d_ghostfill_strategy_Q
 
std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineSchedule< NDIM > > > d_ghostfill_scheds_Q
 
std::string d_outflow_bdry_extrap_type = "CONSTANT"
 
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
 
SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > > d_Q_var
 
int d_Q_scratch_idx = 0
 
const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > d_conc_bc_coefs
 
int d_k = 3
 
ConvectiveDifferencingType d_difference_form
 

General operator functionality.

void apply (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &x, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &y) override
 Compute \(y=F[x]\). More...
 
int d_u_idx = IBTK::invalid_index
 

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 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 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.

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...
 
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
 

Detailed Description

Class AdvDiffWavePropConvectiveOperator computes the convective derivative of a cell-centered quantity using the wave propagation method of Ketcheson and LeVeque.

Note
AdvDiffWavePropConvectiveOperator currently only works in ADVECTIVE form.
Todo:
Implement a CONSERVATIVE form for the operator. This will involve writing a new Riemann solver for the flux.

Constructor & Destructor Documentation

◆ AdvDiffWavePropConvectiveOperator() [1/3]

IBAMR::AdvDiffWavePropConvectiveOperator::AdvDiffWavePropConvectiveOperator ( std::string  object_name,
SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > >  Q_var,
SAMRAI::tbox::Pointer< SAMRAI::tbox::Database input_db,
const ConvectiveDifferencingType  difference_form,
std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * >  conc_bc_coefs 
)

◆ ~AdvDiffWavePropConvectiveOperator()

IBAMR::AdvDiffWavePropConvectiveOperator::~AdvDiffWavePropConvectiveOperator ( )

◆ AdvDiffWavePropConvectiveOperator() [2/3]

IBAMR::AdvDiffWavePropConvectiveOperator::AdvDiffWavePropConvectiveOperator ( )
privatedelete
Note
This constructor is not implemented and should not be used.

◆ AdvDiffWavePropConvectiveOperator() [3/3]

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

Member Function Documentation

◆ allocate_operator()

static SAMRAI::tbox::Pointer<ConvectiveOperator> IBAMR::AdvDiffWavePropConvectiveOperator::allocate_operator ( const std::string &  object_name,
SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > >  Q_var,
SAMRAI::tbox::Pointer< SAMRAI::tbox::Database input_db,
const ConvectiveDifferencingType  difference_form,
const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &  conc_bc_coefs 
)
inlinestatic

◆ applyConvectiveOperator()

void IBAMR::AdvDiffWavePropConvectiveOperator::applyConvectiveOperator ( int  Q_idx,
int  Y_idx 
)
overridevirtual

◆ initializeOperatorState()

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

The vector arguments for apply(), applyAdjoint(), etc, need not match those for initializeOperatorState(). However, there must be a certain degree of similarity, including

  • hierarchy configuration (hierarchy pointer and level range)
  • number, type and alignment of vector component data
  • ghost cell widths of data in the input and output vectors
Note
It is generally necessary to reinitialize the operator state when the hierarchy configuration changes.

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:

  • input and output vectors must have same hierarchy
  • input and output vectors must have same structure, depth, etc.

Call deallocateOperatorState() to remove any data allocated by this method.

See also
deallocateOperatorState
Parameters
ininput vector
outoutput vector

Reimplemented from IBTK::GeneralOperator.

◆ deallocateOperatorState()

void IBAMR::AdvDiffWavePropConvectiveOperator::deallocateOperatorState ( )
overridevirtual
Note
It is safe to call deallocateOperatorState() when the operator state is already deallocated.
See also
initializeOperatorState

Reimplemented from IBTK::GeneralOperator.

◆ operator=()

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

◆ setAdvectionVelocity()

void IBAMR::ConvectiveOperator::setAdvectionVelocity ( int  u_idx)
inherited

◆ getAdvectionVelocity()

int IBAMR::ConvectiveOperator::getAdvectionVelocity ( ) const
inherited

◆ setConvectiveDifferencingType()

void IBAMR::ConvectiveOperator::setConvectiveDifferencingType ( ConvectiveDifferencingType  difference_form)
inherited

◆ getConvectiveDifferencingType()

ConvectiveDifferencingType IBAMR::ConvectiveOperator::getConvectiveDifferencingType ( ) const
inherited

◆ apply()

void IBAMR::ConvectiveOperator::apply ( SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  x,
SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  y 
)
overridevirtualinherited

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.

See also
initializeOperatorState

Implements 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.

◆ modifyRhsForBcs()

virtual void IBTK::GeneralOperator::modifyRhsForBcs ( SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &  y)
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 modifyRhsForBcs.
See also
initializeOperatorState
Note
A default implementation does not modify the RHS vector y.

Reimplemented in IBTK::LinearOperator.

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

SAMRAI::tbox::Pointer<SAMRAI::xfer::CoarsenAlgorithm<NDIM> > IBAMR::AdvDiffWavePropConvectiveOperator::d_coarsen_alg_Q
private

◆ d_coarsen_scheds_Q

std::vector<SAMRAI::tbox::Pointer<SAMRAI::xfer::CoarsenSchedule<NDIM> > > IBAMR::AdvDiffWavePropConvectiveOperator::d_coarsen_scheds_Q
private

◆ d_ghostfill_alg_Q

SAMRAI::tbox::Pointer<SAMRAI::xfer::RefineAlgorithm<NDIM> > IBAMR::AdvDiffWavePropConvectiveOperator::d_ghostfill_alg_Q
private

◆ d_ghostfill_strategy_Q

SAMRAI::tbox::Pointer<SAMRAI::xfer::RefinePatchStrategy<NDIM> > IBAMR::AdvDiffWavePropConvectiveOperator::d_ghostfill_strategy_Q
private

◆ d_ghostfill_scheds_Q

std::vector<SAMRAI::tbox::Pointer<SAMRAI::xfer::RefineSchedule<NDIM> > > IBAMR::AdvDiffWavePropConvectiveOperator::d_ghostfill_scheds_Q
private

◆ d_outflow_bdry_extrap_type

std::string IBAMR::AdvDiffWavePropConvectiveOperator::d_outflow_bdry_extrap_type = "CONSTANT"
private

◆ d_hierarchy

SAMRAI::tbox::Pointer<SAMRAI::hier::PatchHierarchy<NDIM> > IBAMR::AdvDiffWavePropConvectiveOperator::d_hierarchy
private

◆ d_coarsest_ln

int IBAMR::AdvDiffWavePropConvectiveOperator::d_coarsest_ln = IBTK::invalid_level_number
private

◆ d_finest_ln

int IBAMR::AdvDiffWavePropConvectiveOperator::d_finest_ln = IBTK::invalid_level_number
private

◆ d_Q_var

SAMRAI::tbox::Pointer<SAMRAI::pdat::CellVariable<NDIM, double> > IBAMR::AdvDiffWavePropConvectiveOperator::d_Q_var
private

◆ d_Q_scratch_idx

int IBAMR::AdvDiffWavePropConvectiveOperator::d_Q_scratch_idx = 0
private

◆ d_conc_bc_coefs

const std::vector<SAMRAI::solv::RobinBcCoefStrategy<NDIM>*> IBAMR::AdvDiffWavePropConvectiveOperator::d_conc_bc_coefs
private

◆ d_k

int IBAMR::AdvDiffWavePropConvectiveOperator::d_k = 3
private

◆ d_difference_form

ConvectiveDifferencingType IBAMR::AdvDiffWavePropConvectiveOperator::d_difference_form
private

◆ d_u_idx

int IBAMR::ConvectiveOperator::d_u_idx = IBTK::invalid_index
protectedinherited

The advection velocity patch data descriptor index.

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