PolyDiM
C++ library for POLYtopal DIscretization Methods
Loading...
Searching...
No Matches
FEM_MCC_2D_LocalSpace.hpp
Go to the documentation of this file.
1// _LICENSE_HEADER_
2//
3// Copyright (C) 2019 - 2025.
4// Terms register on the GPL-3.0 license.
5//
6// This file can be redistributed and/or modified under the license terms.
7//
8// See top level LICENSE file for more details.
9//
10// This file can be used citing references in CITATION.cff file.
11
12#ifndef __FEM_MCC_2D_LocalSpace_HPP
13#define __FEM_MCC_2D_LocalSpace_HPP
14
18
19namespace Polydim
20{
21namespace FEM
22{
23namespace MCC
24{
25
34{
35 private:
37
38 public:
45
52 std::vector<Eigen::MatrixXd> ComputeVelocityBasisFunctionsValues(const Polydim::FEM::MCC::FEM_MCC_2D_ReferenceElement_Data &reference_element_data,
53 const Polydim::FEM::MCC::FEM_MCC_2D_LocalSpace_Data &local_space) const
54 {
55 switch (local_space.fem_type)
56 {
58
59 return rt_triangle_local_space.ComputeVelocityBasisFunctionsValues(reference_element_data.rt_triangle_reference_element_data,
61 }
62 default:
63 throw std::runtime_error("not valid fem type");
64 }
65 }
66
73 const Polydim::FEM::MCC::FEM_MCC_2D_LocalSpace_Data &local_space) const
74 {
75 switch (local_space.fem_type)
76 {
78
79 return rt_triangle_local_space.ComputePressureBasisFunctionsValues(reference_element_data.rt_triangle_reference_element_data,
81 }
82 default:
83 throw std::runtime_error("not valid fem type");
84 }
85 }
86
94 const Polydim::FEM::MCC::FEM_MCC_2D_LocalSpace_Data &local_space) const
95 {
96 switch (local_space.fem_type)
97 {
99
100 return rt_triangle_local_space.ComputeVelocityBasisFunctionsDivergenceValues(
101 reference_element_data.rt_triangle_reference_element_data,
102 local_space.rt_triangle_local_space_data);
103 }
104 default:
105 throw std::runtime_error("not valid fem type");
106 }
107 }
108
116 std::vector<Eigen::MatrixXd> ComputeVelocityBasisFunctionsValues(const Polydim::FEM::MCC::FEM_MCC_2D_ReferenceElement_Data &reference_element_data,
118 const Eigen::MatrixXd &points) const
119 {
120 switch (local_space.fem_type)
121 {
123
124 return rt_triangle_local_space.ComputeVelocityBasisFunctionsValues(reference_element_data.rt_triangle_reference_element_data,
126 points);
127 }
128 default:
129 throw std::runtime_error("not valid fem type");
130 }
131 }
132
141 const Eigen::MatrixXd &points) const
142 {
143 switch (local_space.fem_type)
144 {
146
147 return rt_triangle_local_space.ComputePressureBasisFunctionsValues(reference_element_data.rt_triangle_reference_element_data,
149 points);
150 }
151 default:
152 throw std::runtime_error("not valid fem type");
153 }
154 }
155
164 const Eigen::MatrixXd &points) const
165 {
166 switch (local_space.fem_type)
167 {
169
170 return rt_triangle_local_space.ComputeVelocityBasisFunctionsDivergenceValues(reference_element_data.rt_triangle_reference_element_data,
172 points);
173 }
174 default:
175 throw std::runtime_error("not valid fem type");
176 }
177 }
178};
179} // namespace MCC
180} // namespace FEM
181} // namespace Polydim
182
183#endif
Local space for a 2D mixed (velocity/pressure) MCC finite element.
Definition FEM_MCC_2D_LocalSpace.hpp:34
Polydim::FEM::MCC::FEM_MCC_2D_LocalSpace_Data CreateLocalSpace(const Polydim::FEM::MCC::FEM_MCC_2D_ReferenceElement_Data &reference_element_data, const Polydim::FEM::MCC::FEM_MCC_2D_Polygon_Geometry &polygon) const
Builds the local space on a given polygon.
Definition FEM_MCC_2D_LocalSpace.cpp:23
Eigen::MatrixXd ComputeVelocityBasisFunctionsDivergenceValues(const Polydim::FEM::MCC::FEM_MCC_2D_ReferenceElement_Data &reference_element_data, const Polydim::FEM::MCC::FEM_MCC_2D_LocalSpace_Data &local_space) const
Evaluates the divergence of the velocity basis functions at the local space internal quadrature point...
Definition FEM_MCC_2D_LocalSpace.hpp:93
std::vector< Eigen::MatrixXd > ComputeVelocityBasisFunctionsValues(const Polydim::FEM::MCC::FEM_MCC_2D_ReferenceElement_Data &reference_element_data, const Polydim::FEM::MCC::FEM_MCC_2D_LocalSpace_Data &local_space) const
Evaluates the (vector-valued) velocity basis functions at the local space internal quadrature points.
Definition FEM_MCC_2D_LocalSpace.hpp:52
Eigen::MatrixXd ComputeVelocityBasisFunctionsDivergenceValues(const Polydim::FEM::MCC::FEM_MCC_2D_ReferenceElement_Data &reference_element_data, const Polydim::FEM::MCC::FEM_MCC_2D_LocalSpace_Data &local_space, const Eigen::MatrixXd &points) const
Evaluates the divergence of the velocity basis functions at a user-provided set of points.
Definition FEM_MCC_2D_LocalSpace.hpp:162
std::vector< Eigen::MatrixXd > ComputeVelocityBasisFunctionsValues(const Polydim::FEM::MCC::FEM_MCC_2D_ReferenceElement_Data &reference_element_data, const Polydim::FEM::MCC::FEM_MCC_2D_LocalSpace_Data &local_space, const Eigen::MatrixXd &points) const
Evaluates the (vector-valued) velocity basis functions at a user-provided set of points.
Definition FEM_MCC_2D_LocalSpace.hpp:116
Eigen::MatrixXd ComputePressureBasisFunctionsValues(const Polydim::FEM::MCC::FEM_MCC_2D_ReferenceElement_Data &reference_element_data, const Polydim::FEM::MCC::FEM_MCC_2D_LocalSpace_Data &local_space, const Eigen::MatrixXd &points) const
Evaluates the (scalar) pressure basis functions at a user-provided set of points.
Definition FEM_MCC_2D_LocalSpace.hpp:139
Eigen::MatrixXd ComputePressureBasisFunctionsValues(const Polydim::FEM::MCC::FEM_MCC_2D_ReferenceElement_Data &reference_element_data, const Polydim::FEM::MCC::FEM_MCC_2D_LocalSpace_Data &local_space) const
Evaluates the (scalar) pressure basis functions at the local space internal quadrature points.
Definition FEM_MCC_2D_LocalSpace.hpp:72
Definition FEM_Triangle_RT_MCC_2D_LocalSpace.hpp:27
Eigen::MatrixXd ComputeVelocityBasisFunctionsDivergenceValues(const Polydim::FEM::MCC::FEM_Triangle_RT_MCC_2D_ReferenceElement_Data &reference_element_data, const Polydim::FEM::MCC::FEM_Triangle_RT_MCC_2D_LocalSpace_Data &local_space) const
Definition FEM_Triangle_RT_MCC_2D_LocalSpace.hpp:68
Eigen::MatrixXd ComputePressureBasisFunctionsValues(const Polydim::FEM::MCC::FEM_Triangle_RT_MCC_2D_ReferenceElement_Data &reference_element_data, const Polydim::FEM::MCC::FEM_Triangle_RT_MCC_2D_LocalSpace_Data &local_space) const
Definition FEM_Triangle_RT_MCC_2D_LocalSpace.hpp:53
std::vector< Eigen::MatrixXd > ComputeVelocityBasisFunctionsValues(const Polydim::FEM::MCC::FEM_Triangle_RT_MCC_2D_ReferenceElement_Data &reference_element_data, const Polydim::FEM::MCC::FEM_Triangle_RT_MCC_2D_LocalSpace_Data &local_space) const
Definition FEM_Triangle_RT_MCC_2D_LocalSpace.hpp:59
@ RT_Triangle
Raviart-Thomas element defined on a triangle.
Definition FEM_MCC_2D_LocalSpace.cpp:17
Aggregated local space data for a 2D MCC element.
Definition FEM_MCC_2D_LocalSpace_Data.hpp:75
Polydim::FEM::MCC::FEM_Triangle_RT_MCC_2D_LocalSpace_Data rt_triangle_local_space_data
Definition FEM_MCC_2D_LocalSpace_Data.hpp:76
Polydim::FEM::MCC::FEM_MCC_2D_Types fem_type
Definition FEM_MCC_2D_LocalSpace_Data.hpp:77
Geometric description of a polygon on which a 2D MCC local space is constructed.
Definition FEM_MCC_2D_LocalSpace_Data.hpp:40
Definition FEM_MCC_2D_ReferenceElement.hpp:31
Polydim::FEM::MCC::FEM_Triangle_RT_MCC_2D_ReferenceElement_Data rt_triangle_reference_element_data
Definition FEM_MCC_2D_ReferenceElement.hpp:39