Class ReflectingBoundary

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class ReflectingBoundary : public opensn::SweepBoundary

Reflective boundary condition.

Public Functions

ReflectingBoundary(BoundaryBank &bank, std::uint64_t bid, const std::shared_ptr<MeshContinuum> &grid, const std::vector<LBSGroupset> &groupsets, const Vector3 &normal, CoordinateSystemType coord_type = CoordinateSystemType::CARTESIAN)
inline const Vector3 &GetNormal() const
inline virtual const Vector3 *GetNormalForReflection() const override
inline virtual bool HasDelayedAngularFlux() const override
virtual void GetFollowingAngleSets(int groupset_id, std::set<AngleSet*> &following_angle_sets, const AngleAggregation &angle_agg, const AngleSet &angleset) override

Get the list of anglesets that depend on a given angleset.

If the boundary is not opposing reflecting, this method extracts all anglesets in the angle aggregation that can only begin sweeping after the given angle set has completed its sweep.

Parameters:
  • following_angle_sets – Output set to which the dependent anglesets will be added.

  • angle_agg – Angle aggregation containing all anglesets.

  • angleset – Angleset for which dependent anglesets are sought.

virtual void SetOpposingReflected(std::uint64_t boundary_id, const std::map<std::uint64_t, std::shared_ptr<SweepBoundary>> &boundaries) override
virtual void ZeroOpposingDelayedAngularFluxOld(int groupset_id) override
virtual size_t CountDelayedAngularDOFsNew(int groupset_id) const override
virtual size_t CountDelayedAngularDOFsOld(int groupset_id) const override
virtual void AppendNewDelayedAngularDOFsToVector(int groupset_id, std::vector<double> &output) const override
virtual void AppendOldDelayedAngularDOFsToVector(int groupset_id, std::vector<double> &output) const override
virtual void AppendNewDelayedAngularDOFsToArray(int groupset_id, int64_t &index, double *buffer) const override
virtual void AppendOldDelayedAngularDOFsToArray(int groupset_id, int64_t &index, double *buffer) const override
virtual void SetNewDelayedAngularDOFsFromArray(int groupset_id, int64_t &index, const double *buffer) override
virtual void SetOldDelayedAngularDOFsFromArray(int groupset_id, int64_t &index, const double *buffer) override
virtual void SetNewDelayedAngularDOFsFromVector(int groupset_id, const std::vector<double> &values, size_t &index) override
virtual void SetOldDelayedAngularDOFsFromVector(int groupset_id, const std::vector<double> &values, size_t &index) override
virtual void CopyDelayedAngularFluxOldToNew(int groupset_id) override
virtual void CopyDelayedAngularFluxNewToOld(int groupset_id) override
inline virtual void GetReflectedMap(int groupset_id, std::vector<std::vector<std::uint32_t>> &reflected_maps) override
virtual double *PsiIncoming(std::uint32_t cell_local_id, unsigned int face_num, unsigned int fi, unsigned int angle_num, int groupset_id, unsigned int group_idx) override

Return a pointer to the location of the incoming flux.

virtual double *PsiOutgoing(uint64_t cell_local_id, unsigned int face_num, unsigned int fi, unsigned int angle_num, int groupset_id) override

Return a pointer to the location of the outgoing flux.

virtual std::uint64_t GetOffsetToAngleset(const FaceNode &face_node, AngleSet &anglset, bool is_outgoing) override

Get offset to the data region of a given angleset.

virtual void InitializeReflectingMap(const std::vector<LBSGroupset> &groupsets) override
virtual void InitializeAngleDependent(const std::vector<LBSGroupset> &groupsets) override

Perform additional setup required by angle-dependent boundaries.

Angle-dependent boundaries require an extra initialization step after flux data structures are initialized. This phase cannot be executed in the constructor, which happens before the initialization of flux data structures.

Protected Attributes

const Vector3 normal_
CoordinateSystemType coord_type_
bool opposing_reflected_ = false
std::map<FaceNode, std::uint64_t> facenode_to_index_

Map from face node to internal node-index.

std::vector<ExtraData> extra_data_

List of data per groupset.

struct ExtraData

Additional data specific to reflecting boundary for each groupset.

Public Members

std::vector<std::uint64_t> map_dirnum

Map from angle direction number in a quadrature to internal angle index.

std::vector<std::uint32_t> reflected_anglenum

Map from angle direction number in a quadrature to reflected angle index.

std::uint64_t node_stride = 0

Number of angles recorded in the boundary, which is also the stride of the face node.

If the boundary is opposing reflected, all angles are recorded. Otherwise, only outgoing ones are counted.

std::uint64_t old_stride = 0

Offset separating current and old boundary flux.

struct Stride

Stride for computing psi pointer.

Public Members

std::uint64_t facenode_stride = 0
std::uint64_t angle_stride = 0