Class UncollidedProblem

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class UncollidedProblem : public opensn::LBSProblem

Public Functions

explicit UncollidedProblem(const InputParameters &params)
~UncollidedProblem() override

Public Static Functions

static InputParameters GetInputParameters()
static std::shared_ptr<UncollidedProblem> Create(const ParameterBlock &params)

Protected Types

enum class CellRegion

Values:

enumerator NEAR_SOURCE
enumerator BULK

Protected Functions

virtual void PrintSimHeader() override
virtual void InitializeSpatialDiscretization() override
inline virtual void ClearBoundaries() override

Clears all the boundary conditions from the solver.

void BuildSweepOrdering(const SourcePoint &source_point)
void InitializeNearSourceRegions(const InputParameters &params)
void InitializeReflectingBoundaries(const InputParameters &params)
void BuildSourcePoints()
void AddReflectedSourcePoints()
void RaytraceNearSourceRegion(const SourcePoint &source_point)
void ProjectReflectedImageSources(unsigned int progress_interval)
std::vector<double> RaytraceLine(RayTracer &ray_tracer, const Cell &cell, const Vector3 &qp_xyz, const SourcePoint &source_point, double tolerance = 1.0e-12)
void RaytraceLineInto(RayTracer &ray_tracer, const Cell &cell, const Vector3 &qp_xyz, const SourcePoint &source_point, std::vector<double> &phi_out, std::vector<std::pair<size_t, double>> &scratch_segs, std::vector<double> &scratch_bp, std::vector<double> &scratch_mfp, double tolerance = 1.0e-12)

Zero-allocation variant: writes into pre-allocated phi_out and reuses the three scratch vectors.

All four buffers must be sized to num_groups_ before the first call (they are reset internally each call, so no manual clearing is needed between calls).

void SweepBulkRegion(const SourcePoint &source_point)
UncollidedMatrices ComputeUncollidedIntegrals(const Cell &cell, const Vector3 &pt_loc)
void Execute(const std::string &file_name, unsigned int progress_interval)
void UpdateBalance(const SourcePoint &source_point)
void AccumulateMoments(const Vector3 &pt_loc)
void WriteFluxMoments(hid_t file)
void FinalizeBalance(hid_t file)
inline bool IsReflectingBoundary(std::uint64_t boundary_id) const

Protected Attributes

std::vector<std::shared_ptr<LogicalVolume>> near_source_logvols_

Near source region logical volumes.

std::vector<SourcePoint> source_points_
std::vector<SourcePoint> reflected_source_points_
std::vector<ReflectionPlane> reflection_planes_
std::set<std::uint64_t> reflecting_boundary_ids_
std::vector<std::vector<FaceOrientation>> cell_face_orientations_

Cell face orientations for the cells in the local cell graph.

std::vector<size_t> near_spls_

Near source uncollided sweep-plane local subgrid.

std::vector<size_t> bulk_spls_

Bulk region uncollided sweep-plane local subgrid.

std::vector<CellRegion> cell_regions_
std::vector<double> destination_phi_
std::vector<double> cell_sizes_

Bounding-box diagonal for each local cell, pre-computed once for RayTracer tolerance scaling.

bool all_cells_convex_ = true

False when the mesh contains any geometrically non-convex cell; true for standard hex/tet meshes.

std::vector<FaceVertData> all_face_verts_
std::vector<uint32_t> cell_face_offsets_
std::vector<uint32_t> cell_num_faces_
std::unordered_map<uint64_t, uint32_t> global_to_local_id_

O(1) global-to-local cell-ID lookup; replaces two O(log N) std::map calls per while-loop step.

bool use_fast_trace_ = false

True when all_cells_convex_ and all faces have <= kMaxFaceSides vertices.

unsigned int ell_max_ = 0
std::vector<Moment> moments_
std::vector<std::string> moment_names_
std::vector<std::vector<double>> accumulated_moments_
double production_ = 0.
double removal_ = 0.
double out_flow_ = 0.

Protected Static Functions

static inline Vector3 ComputeOmega(const Vector3 &point0, const Vector3 &point1)

Friends

friend class UncollidedSolver
struct FaceVertData

Precomputed face vertex data &#8212; bypasses the std::map-backed VertexHandler in the hot path.

Supports faces with up to kMaxFaceSides vertices (covers triangles and quads).

Public Members

Vector3 verts[max_sides]
Vector3 centroid
uint64_t neighbor_id = 0
uint32_t num_sides = 0
uint32_t pad = 0

Public Static Attributes

static uint32_t max_sides = 4
struct Moment

Public Members

unsigned int ell
int m
struct ReflectionPlane

Public Members

std::uint64_t boundary_id = 0
Vector3 normal
double offset = 0.0
struct SourcePoint

Public Members

Vector3 location
std::vector<double> strength
std::vector<Subscriber> subscribers
std::shared_ptr<LogicalVolume> near_source_logvol
std::vector<ReflectionPlane> reflection_planes
struct Subscriber

Public Members

std::uint32_t cell_local_id = 0
double volume_weight = 1.0