BC

Base.h

template<typename Lab>
class Cubism::BC::Base

Boundary condition base class.

Each boundary condition is applied for a specific dir < CUBISM_DIMENSION and corresponding side.

Template Parameters
  • Lab: Type of FieldLab

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

BoundaryInfo structure

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>
class Cubism::BC::Absorbing : public Cubism::BC::Base<Lab>

Zeroth-Order absorbing BC.

Zeroth-Order absorbing boundary condition

Template Parameters
  • Lab: Type of FieldLab

Public Functions

inline Absorbing(const size_t dir, const size_t side)

Main constructor.

Parameters
  • dir: Direction in which to apply the boundary

  • side: On which side along direction dir

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>
class Cubism::BC::Dirichlet : public Cubism::BC::Base<Lab>

Dirichlet BC.

Constant value Dirichlet boundary condition

Template Parameters
  • Lab: Type of FieldLab

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 boundary

  • side: On which side along direction dir

  • val: 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

const reference to DataType

Symmetry.h

template<typename Lab>
class Cubism::BC::Symmetry : public Cubism::BC::Base<Lab>

Symmetry BC (reflecting)

Symmetry/reflecting boundary condition

Template Parameters
  • Lab: Type of FieldLab

Public Functions

inline Symmetry(const size_t dir, const size_t side, const DataType sign = 1)

Main constructor.

The sign parameter can be used to flip the sign of the boundary value for example the momentum vector.

Parameters
  • dir: Direction in which to apply the boundary

  • side: On which side along direction dir

  • sign: 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