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