Class PointSource

Nested Relationships

Nested Types

Class Documentation

class PointSource

A class for point sources, which is defined by its location and a group-wise strength vector.

A point source can belong to one or more cells based on whether it lies on the interior of a cell, a face, or a vertex. When a point source lies on a face or vertex, it belongs to multiple cells. Each of these cells are called subscribers. In this case, the source strength is split amongst the cells using a volumetric weighting. On each cell, the point source is defined in the finite element basis to obtain the contribution to each node. Defining the point source as \( Q(x) = S \delta(x - x_0) = \sum_j s_j b_j \), this implies that

\[ \int Q(x) dx = S \int \delta(x - x_0) dx = \sum_j s_j \int b_j dx. \]
To solve for the coefficients, a Galerkin method is used such that
\[ S \int b_i \delta(x - x_0) dx = \sum_j s_j \int b_i b_j dx. \]
Using the standard definition of the mass matrix, this is given by
\[ S \vec{b}(x_0) = M \vec{s}. \]
This can be solved for the coefficients via
\[ \vec{s} = S M^{-1} \vec{b}(x_0). \]
.

Public Functions

explicit PointSource(const InputParameters &params)
void Initialize(const LBSProblem &lbs_problem)

Initializes the cell subscriber info from the given solver.

Note

Uninitialized point sources will not contribute to sources.

inline size_t GetNumLocalSubscribers() const
inline size_t GetNumGlobalSubscribers() const
inline const std::vector<Subscriber> &GetSubscribers() const
inline const Vector3 &GetLocation() const
inline const std::vector<double> &GetStrength() const

Public Static Functions

static InputParameters GetInputParameters()
static std::shared_ptr<PointSource> Create(const ParameterBlock &params)
struct Subscriber

An encapsulation of subscriber cell data for defining point source contributions.

Public Members

double volume_weight = 0.0
uint64_t cell_local_id = 0
Vector<double> shape_values
Vector<double> node_weights