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