BC¶
Base.h¶
-
template<typename
Lab>
classCubism::BC::Base Boundary condition base class.
Each boundary condition is applied for a specific
dir < CUBISM_DIMENSIONand correspondingside.- Template Parameters
Lab: Type ofDataLab
Subclassed by Cubism::BC::Absorbing< Lab >, Cubism::BC::Dirichlet< Lab >, Cubism::BC::Symmetry< Lab >
Public Functions
-
inline const BoundaryInfo &
getBoundaryInfo() const Get boundary information.
- Return
BoundaryInfostructure
-
inline virtual void
operator()(Lab&) Apply boundary condition.
-
inline virtual std::string
name() const Name of boundary condition.
- Return
Name string
Absorbing.h¶
-
template<typename
Lab>
classCubism::BC::Absorbing: public Cubism::BC::Base<Lab> Zeroth-Order absorbing BC.
Zeroth-Order absorbing boundary condition
- Template Parameters
Lab: Type ofDataLab
Public Functions
-
inline
Absorbing(const size_t dir, const size_t side) Main constructor.
- Parameters
dir: Direction in which to apply the boundaryside: On which side along directiondir
-
inline virtual void
operator()(Lab &lab) override Apply boundary condition.
- Parameters
lab: Lab on which the boundary is applied
-
inline virtual std::string
name() const override Name of boundary condition.
- Return
Name string
Dirichlet.h¶
-
template<typename
Lab>
classCubism::BC::Dirichlet: public Cubism::BC::Base<Lab> Dirichlet BC.
Constant value Dirichlet boundary condition
- Template Parameters
Lab: Type ofDataLab
Public Functions
-
inline
Dirichlet(const size_t dir, const size_t side, const DataType &val) Main constructor.
- Parameters
dir: Direction in which to apply the boundaryside: On which side along directiondirval: Boundary value
-
inline virtual void
operator()(Lab &lab) override Apply boundary condition.
- Parameters
lab: Lab on which the boundary is applied
-
inline virtual std::string
name() const override Name of boundary condition.
- Return
Name string
-
inline DataType &
getValue() Get boundary value.
- Return
Reference to
DataType
-
inline const DataType &
getValue() const Get boundary value.
- Return
constreference toDataType
Symmetry.h¶
-
template<typename
Lab>
classCubism::BC::Symmetry: public Cubism::BC::Base<Lab> Symmetry BC (reflecting)
Symmetry/reflecting boundary condition
- Template Parameters
Lab: Type ofDataLab
Public Functions
-
inline
Symmetry(const size_t dir, const size_t side, const DataType sign = 1) Main constructor.
The
signparameter can be used to flip the sign of the boundary value for example the momentum vector.- Parameters
dir: Direction in which to apply the boundaryside: On which side along directiondirsign: Determines the sign of the value computed in the ghosts
-
inline virtual void
operator()(Lab &lab) override Apply boundary condition.
- Parameters
lab: Lab on which the boundary is applied
-
inline virtual std::string
name() const override Name of boundary condition.
- Return
Name string