Chi-Tech
PieceWiseLinearDiscontinuous.h
Go to the documentation of this file.
1#ifndef SPATIAL_DISCRETIZATION_PWLD_H
2#define SPATIAL_DISCRETIZATION_PWLD_H
3
6
7// ######################################################### Class def
9{
10
11/**Generalization of the Galerkin Finite Element Method
12 * with piecewise linear basis functions
13 * for use by a Discontinuous Finite Element Method (DFEM).
14 * \ingroup doc_SpatialDiscretization*/
16{
17public:
18 // prevent anything else other than a shared pointer
19 static std::shared_ptr<PieceWiseLinearDiscontinuous>
20 New(const chi_mesh::MeshContinuum& grid,
23
24 // 03
25 void
26 BuildSparsityPattern(std::vector<int64_t>& nodal_nnz_in_diag,
27 std::vector<int64_t>& nodal_nnz_off_diag,
28 const UnknownManager& unknown_manager) const override;
29
30 // 04
31 int64_t MapDOF(const chi_mesh::Cell& cell,
32 unsigned int node,
33 const UnknownManager& unknown_manager,
34 unsigned int unknown_id,
35 unsigned int component) const override;
36
37 int64_t MapDOFLocal(const chi_mesh::Cell& cell,
38 unsigned int node,
39 const UnknownManager& unknown_manager,
40 unsigned int unknown_id,
41 unsigned int component) const override;
42
43 int64_t MapDOF(const chi_mesh::Cell& cell, unsigned int node) const override
44 {
45 return MapDOF(cell, node, UNITARY_UNKNOWN_MANAGER, 0, 0);
46 }
47 int64_t MapDOFLocal(const chi_mesh::Cell& cell,
48 unsigned int node) const override
49 {
50 return MapDOFLocal(cell, node, UNITARY_UNKNOWN_MANAGER, 0, 0);
51 }
52
53 size_t GetNumGhostDOFs(const UnknownManager& unknown_manager) const override;
54
55 std::vector<int64_t>
56 GetGhostDOFIndices(const UnknownManager& unknown_manager) const override;
57
58protected:
59 // 02
60 void OrderNodes();
61
62 std::vector<int64_t> cell_local_block_address_;
63 std::vector<std::pair<uint64_t, int64_t>> neighbor_cell_block_address_;
64
65private:
66 // 00
68 QuadratureOrder q_order,
69 CoordinateSystemType cs_type);
70};
71
72} // namespace chi_math::spatial_discretization
73
74#endif // SPATIAL_DISCRETIZATION_PWLD_H
const UnknownManager UNITARY_UNKNOWN_MANAGER
size_t GetNumGhostDOFs(const UnknownManager &unknown_manager) const override
std::vector< std::pair< uint64_t, int64_t > > neighbor_cell_block_address_
int64_t MapDOFLocal(const chi_mesh::Cell &cell, unsigned int node, const UnknownManager &unknown_manager, unsigned int unknown_id, unsigned int component) const override
int64_t MapDOF(const chi_mesh::Cell &cell, unsigned int node, const UnknownManager &unknown_manager, unsigned int unknown_id, unsigned int component) const override
int64_t MapDOFLocal(const chi_mesh::Cell &cell, unsigned int node) const override
void BuildSparsityPattern(std::vector< int64_t > &nodal_nnz_in_diag, std::vector< int64_t > &nodal_nnz_off_diag, const UnknownManager &unknown_manager) const override
static std::shared_ptr< PieceWiseLinearDiscontinuous > New(const chi_mesh::MeshContinuum &grid, QuadratureOrder q_order=QuadratureOrder::SECOND, CoordinateSystemType cs_type=CoordinateSystemType::CARTESIAN)
int64_t MapDOF(const chi_mesh::Cell &cell, unsigned int node) const override
std::vector< int64_t > GetGhostDOFIndices(const UnknownManager &unknown_manager) const override
PieceWiseLinearDiscontinuous(const chi_mesh::MeshContinuum &grid, QuadratureOrder q_order, CoordinateSystemType cs_type)
QuadratureOrder
Definition: quadrature.h:12
CoordinateSystemType
Definition: chi_math.h:29