Chi-Tech
PieceWiseLinearPolygonMapping.h
Go to the documentation of this file.
1#ifndef PWL_POLYGON_VALUES_H
2#define PWL_POLYGON_VALUES_H
3
7#include "mesh/Cell/cell.h"
8
9#include <array>
10
11// ###################################################################
13{
14/** Object for handling polygon shaped 2D cells.
15* \ingroup doc_CellMappings*/
17{
18public:
19 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Constructor
21 const chi_mesh::MeshContinuum& ref_grid,
22 const QuadratureTriangle& volume_quadrature,
23 const QuadratureLine& surface_quadrature);
24
26 MakeVolumetricQuadraturePointData() const override;
27
29 MakeSurfaceQuadraturePointData(size_t face_index) const override;
30
31 double SideGradShape_x(uint32_t side, uint32_t i) const;
32 double SideGradShape_y(uint32_t side, uint32_t i) const;
33
34 double ShapeValue(int i, const chi_mesh::Vector3& xyz) const override;
35
37 const chi_mesh::Vector3& xyz) const override;
38
39 void ShapeValues(const chi_mesh::Vector3& xyz,
40 std::vector<double>& shape_values) const override;
41
42 void GradShapeValues(
43 const chi_mesh::Vector3& xyz,
44 std::vector<chi_mesh::Vector3>& gradshape_values) const override;
45
46private:
47 // ################################################## Define standard
48 // triangle linear shape
49 // functions
50 static double TriShape(uint32_t index,
51 const chi_mesh::Vector3& qpoint,
52 bool on_surface = false);
53
54 // ############################################### Shape functions per side
55 double SideShape(uint32_t side,
56 uint32_t i,
57 const chi_mesh::Vector3& qpoint,
58 bool on_surface = false) const;
59
60 // This structure goes into sides
62 {
63 double detJ;
64 double detJ_surf;
65 std::array<uint64_t, 2> v_index;
71 };
72
73 std::vector<FEside_data2d> sides_;
76
78 double beta_;
80 std::vector<std::vector<int>> node_to_side_map_;
81};
82} // namespace chi_math::cell_mapping
83
84#endif
chi_mesh::Vector3 GradShapeValue(int i, const chi_mesh::Vector3 &xyz) const override
void ShapeValues(const chi_mesh::Vector3 &xyz, std::vector< double > &shape_values) const override
double SideShape(uint32_t side, uint32_t i, const chi_mesh::Vector3 &qpoint, bool on_surface=false) const
finite_element::SurfaceQuadraturePointData MakeSurfaceQuadraturePointData(size_t face_index) const override
static double TriShape(uint32_t index, const chi_mesh::Vector3 &qpoint, bool on_surface=false)
PieceWiseLinearPolygonMapping(const chi_mesh::Cell &poly_cell, const chi_mesh::MeshContinuum &ref_grid, const QuadratureTriangle &volume_quadrature, const QuadratureLine &surface_quadrature)
double ShapeValue(int i, const chi_mesh::Vector3 &xyz) const override
finite_element::VolumetricQuadraturePointData MakeVolumetricQuadraturePointData() const override
void GradShapeValues(const chi_mesh::Vector3 &xyz, std::vector< chi_mesh::Vector3 > &gradshape_values) const override