Class CFUpperConvectiveOperator is a concrete ConvectiveOperator that implements the upper convective derivative. This uses second order finite differences to compute the velocity gradients. The transport component can be chosen from any current convective operators. If the advected quantity allows for a square root or logarithmic decomposition, this class can advect the symmetric square root or logarithm of the tensor. Note that this class requires the registration of a source funtion before it can be applied.
#include <ibamr/CFUpperConvectiveOperator.h>
|
| | CFUpperConvectiveOperator (const std::string &object_name, SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > > Q_var, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, const std::string &convective_op_type, ConvectiveDifferencingType difference_type, const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &Q_bc_coefs, const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &u_bc_coefs) |
| |
| | CFUpperConvectiveOperator (const std::string &object_name, SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > > Q_var, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, SAMRAI::tbox::Pointer< ConvectiveOperator > convective_op, ConvectiveDifferencingType difference_type, const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &Q_bc_coefs, const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &u_bc_coefs) |
| |
| | CFUpperConvectiveOperator ()=delete |
| |
| | CFUpperConvectiveOperator (const CFUpperConvectiveOperator &from)=delete |
| |
| CFUpperConvectiveOperator & | operator= (const CFUpperConvectiveOperator &that)=delete |
| |
| | ~CFUpperConvectiveOperator () |
| |
| void | applyConvectiveOperator (int Q_idx, int Y_idx) override |
| | Compute N = u * grad Q. 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 | registerCFStrategy (SAMRAI::tbox::Pointer< IBAMR::CFStrategy > cf_strategy) |
| | : Registers a source function with the convective operator. Note that this source function is given the evolved version of the tensor, and therefore must first be converted from the square root or logarithm to the tensor. 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...
|
| |
◆ CFUpperConvectiveOperator() [1/4]
Constructor that takes in a string for the convective operator. The convective operator type must be one of "DEFAULT", "CENTERED", "CUI", "PPM", or "WAVE_PROP"
◆ CFUpperConvectiveOperator() [2/4]
Constructor that takes in a convective operator
◆ CFUpperConvectiveOperator() [3/4]
| IBAMR::CFUpperConvectiveOperator::CFUpperConvectiveOperator |
( |
| ) |
|
|
delete |
◆ CFUpperConvectiveOperator() [4/4]
◆ ~CFUpperConvectiveOperator()
| IBAMR::CFUpperConvectiveOperator::~CFUpperConvectiveOperator |
( |
| ) |
|
◆ operator=()
◆ applyConvectiveOperator()
| void IBAMR::CFUpperConvectiveOperator::applyConvectiveOperator |
( |
int |
Q_idx, |
|
|
int |
N_idx |
|
) |
| |
|
overridevirtual |
◆ initializeOperatorState()
The vector arguments for apply(), applyAdd(), 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
-
| in | input vector |
| out | output vector |
Reimplemented from IBTK::GeneralOperator.
◆ deallocateOperatorState()
| void IBAMR::CFUpperConvectiveOperator::deallocateOperatorState |
( |
| ) |
|
|
overridevirtual |
◆ registerCFStrategy()
◆ commonConstructor()
◆ setAdvectionVelocity()
| void IBAMR::ConvectiveOperator::setAdvectionVelocity |
( |
int |
u_idx | ) |
|
|
inherited |
◆ getAdvectionVelocity()
| int IBAMR::ConvectiveOperator::getAdvectionVelocity |
( |
| ) |
const |
|
inherited |
◆ setConvectiveDifferencingType()
◆ getConvectiveDifferencingType()
◆ apply()
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
-
| x | input vector |
| y | output 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()
◆ getHierarchyMathOps()
◆ applyAdd()
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
-
| x | input vector |
| y | input vector |
| z | output 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()
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()
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 |
◆ d_hierarchy
◆ d_coarsest_ln
◆ d_finest_ln
◆ d_Q_var
◆ d_u_adv_var
◆ d_u_scratch_idx
◆ d_cf_strategy
◆ d_s_idx
◆ d_convec_oper
◆ d_Q_convec_idx
◆ d_Q_bc_coefs
◆ d_u_bc_coefs
◆ d_evolve_type
◆ d_interp_type
| std::string IBAMR::CFUpperConvectiveOperator::d_interp_type = "LINEAR" |
|
private |
◆ d_difference_form
Enumerated type that determines which form of differencing to use.
◆ d_u_idx
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
◆ 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: