Class ReflectingBoundary
Defined in File reflecting_boundary.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public opensn::SweepBoundary(Class SweepBoundary)
Class Documentation
-
class ReflectingBoundary : public opensn::SweepBoundary
Reflective boundary condition.
Public Functions
-
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:
groupset_id – Groupset whose per-groupset reflected-angle mapping is used.
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 ZeroOpposingDelayedAngularFluxOld(int groupset_id) override
-
virtual size_t CountDelayedAngularDOFsNew(int groupset_id) const override
-
virtual size_t CountDelayedAngularDOFsOld(int groupset_id) const override
-
virtual std::vector<std::uint64_t> GetDelayedAngularSlots(int groupset_id) const override
Returns, for each direction of the groupset quadrature, the slot that holds its delayed angular flux in this boundary.
Empty for a boundary without delayed angular unknowns.
-
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
-
virtual void CorrectNewDelayedAngularFlux(int groupset_id, const DelayedFluxCorrection &correction) override
Adds an isotropic nodal correction to every new (latest-iterate) delayed angular flux of this boundary.
Used by diffusion synthetic acceleration to correct the lagged incoming angular flux consistently with the scalar-flux correction. Every boundary type implements it, as a no-op if it has no delayed angular flux, so that a new boundary type with lagged fluxes cannot leave them uncorrected by omission.
-
virtual void AddToNewDelayedAngularSlope(int groupset_id, const DelayedFluxCorrection &correction) override
Adds a nodal value, as CorrectNewDelayedAngularFlux does, to every new delayed CSDA energy-slope value of this boundary.
No-op for boundaries without delayed slopes.
-
virtual void TallyDelayedIncomingCurrent(int groupset_id, const AngularQuadrature &quadrature, bool subtract_old, const DelayedCurrentTally &tally) const override
Tallies the current of an opposing reflecting boundary, the only kind whose incoming flux is lagged.
Of a pair of opposing reflecting boundaries, only the one with the smaller boundary id lags. The other reads fluxes reflected in the same sweep.
-
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 *PsiIncomingE(std::uint32_t cell_local_id, unsigned int face_num, unsigned int fi, unsigned int angle_num, int groupset_id, unsigned int group_num) override
Returns a pointer to the location of the incoming slope data.
-
virtual double *PsiOutgoing(uint64_t cell_local_id, unsigned int face_num, unsigned int fi, unsigned int angle_num, int groupset_id) override
Returns 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 double *PsiOutgoingE(uint64_t cell_local_id, unsigned int face_num, unsigned int fi, unsigned int angle_num, int groupset_id) override
Returns a pointer to the location of the outgoing slope data.
-
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.
Public Static Functions
-
static std::vector<std::uint32_t> MapReflectedDirections(const AngularQuadrature &quadrature, const Vector3 &normal, CoordinateSystemType coord_type)
Maps each direction of a quadrature to its mirror image across a reflecting boundary with outward normal
normal.In 1D spherical geometry the mirror changes the sign of mu. In RZ geometry only the symmetry axis and constant-z planes have mirror directions.
- Throws:
std::invalid_argument – for an RZ boundary that is neither the axis nor a constant-z plane.
std::logic_error – if a mirror direction is not in the quadrature, or if a direction and its mirror have different weights, which would make the boundary non-conservative.
-
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.
-
std::uint64_t slope_stride = 0
Offset from the current flux block to the current angular slope block.
-
std::vector<std::uint64_t> map_dirnum
-
inline virtual bool HasDelayedAngularFlux() const override