Class PieceWiseLinearDiscontinuous

Inheritance Relationships

Base Type

Class Documentation

class PieceWiseLinearDiscontinuous : public opensn::PieceWiseLinearBase

Generalization of the Galerkin Finite Element Method with piecewise linear basis functions for use by a Discontinuous Finite Element Method (DFEM).

Public Functions

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<PieceWiseLinearDiscontinuous> New(const std::shared_ptr<MeshContinuum> &grid, QuadratureOrder q_order = QuadratureOrder::SECOND)

Construct a shared object using the protected constructor.

Protected Functions

void OrderNodes()

Reorders the nodes for parallel computation in a Continuous Finite Element calculation.

Protected Attributes

std::vector<int64_t> cell_local_block_address_
std::vector<std::pair<uint64_t, int64_t>> neighbor_cell_block_address_