Class FiniteVolume

Inheritance Relationships

Base Type

Class Documentation

class FiniteVolume : public opensn::SpatialDiscretization

Spatial discretizations supporting Finite Volume representations.

Public Functions

virtual ~FiniteVolume() = default
void CreateCellMappings()
virtual void BuildSparsityPattern(std::vector<int64_t> &nodal_nnz_in_diag, std::vector<int64_t> &nodal_nnz_off_diag, const UnknownManager &unknown_manager) const override

Builds the sparsity pattern for a local block matrix compatible withthe given unknown manager. The modified vectors are: nodal_nnz_in_diag which specifies for each row the number of non-zeros in the local diagonal block, nodal_nnz_off_diag which specifies for each row the number of non-zeros in the off-diagonal block.

virtual int64_t MapDOF(const Cell &cell, unsigned int node, const UnknownManager &unknown_manager, unsigned int unknown_id, unsigned int component) const override

Maps the global address of a degree of freedom.

virtual int64_t MapDOFLocal(const Cell &cell, unsigned int node, const UnknownManager &unknown_manager, unsigned int unknown_id, unsigned int component) const override

Maps the local address of a degree of freedom. This can include ghost entries if the specific discretization has any.

inline virtual int64_t MapDOF(const Cell &cell, unsigned int node) const override

Maps the local address of a degree of freedom. This can include ghost entries if the specific discretization has any. Default structure here is a single scalar unknown.

inline virtual int64_t MapDOFLocal(const Cell &cell, unsigned int node) const override

Maps the local address of a degree of freedom. This can include ghost entries if the specific discretization has any. Default structure here is a single scalar unknown.

virtual size_t GetNumGhostDOFs(const UnknownManager &unknown_manager) const override

For the unknown structure in the unknown manager, returns the number of ghost degrees-of-freedom.

virtual std::vector<int64_t> GetGhostDOFIndices(const UnknownManager &unknown_manager) const override

For the unknown structure in the unknown manager, returns the global IDs of all the ghost degrees-of-freedom.

Public Static Functions

static std::shared_ptr<FiniteVolume> New(const std::shared_ptr<MeshContinuum> grid)

Publicly accessible construction handler.

Protected Functions

void OrderNodes()

Develops node ordering per location.