PolyDiM
C++ library for POLYtopal DIscretization Methods
Loading...
Searching...
No Matches
LocalSpace_MCC_2D.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 __LocalSpace_MCC_2D_H
13#define __LocalSpace_MCC_2D_H
14
17#include "MeshUtilities.hpp"
18#include "QuadratureData.hpp"
22
23namespace Polydim
24{
25namespace PDETools
26{
27
37namespace LocalSpace_MCC_2D
38{
40enum class MethodTypes
41{
42 VEM_MCC = 1,
43 VEM_MCC_Partial = 2,
44 VEM_MCC_Ortho = 3,
47 FEM_RT_MCC = 6
48};
49
74
89
104
114 const unsigned int method_order);
115
124std::array<std::array<unsigned int, 4>, 2> ReferenceElementNumDOFs(const Polydim::PDETools::LocalSpace_MCC_2D::ReferenceElement_Data &reference_element_data);
125
138 const double &geometric_tolerance_1D,
139 const double &geometric_tolerance_2D,
140 const Gedim::MeshUtilities::MeshGeometricData2D &mesh_geometric_data,
141 const unsigned int cell2D_index,
143
150std::vector<Eigen::MatrixXd> VelocityBasisFunctionsValues(
151 const ReferenceElement_Data &reference_element_data,
152 const LocalSpace_Data &local_space_data,
154
162
173
183Eigen::MatrixXd StabilizationMatrix(const Polydim::PDETools::LocalSpace_MCC_2D::ReferenceElement_Data &reference_element_data,
186
195 const unsigned int edge_local_index);
196
209Eigen::VectorXd EdgeDofs(const Polydim::PDETools::LocalSpace_MCC_2D::ReferenceElement_Data &reference_element_data,
211 const unsigned int edge_local_index,
212 const Gedim::Quadrature::QuadratureData &edge_dofs_coordinates,
213 const Eigen::VectorXd &strong_values);
214
222Eigen::MatrixXd VelocityBasisFunctionsValuesOnEdges(const unsigned int &edge_local_index,
225 const Eigen::MatrixXd &edge_quadrature_points);
226
234std::vector<Eigen::MatrixXd> VelocityBasisFunctionsValues(
235 const ReferenceElement_Data &reference_element_data,
236 const LocalSpace_Data &local_space_data,
237 const Eigen::MatrixXd &points,
239
248 const unsigned int edge_local_index);
249
255
263
269unsigned int VelocitySize(const Polydim::PDETools::LocalSpace_MCC_2D::ReferenceElement_Data &reference_element_data,
271
280
281} // namespace LocalSpace_MCC_2D
282} // namespace PDETools
283} // namespace Polydim
284
285#endif
Local space for a 2D mixed (velocity/pressure) MCC finite element.
Definition FEM_MCC_2D_LocalSpace.hpp:34
Per-cell local-space data for the 2D MCC local space.
Definition LocalSpace_MCC_2D.hpp:80
Polydim::VEM::MCC::VEM_MCC_2D_Pressure_LocalSpace_Data VEM_LocalSpace_Data_Pressure
Definition LocalSpace_MCC_2D.hpp:84
Polydim::VEM::MCC::VEM_MCC_2D_Polygon_Geometry VEM_Geometry
Definition LocalSpace_MCC_2D.hpp:82
Polydim::VEM::MCC::VEM_MCC_2D_Velocity_LocalSpace_Data VEM_LocalSpace_Data_Velocity
Definition LocalSpace_MCC_2D.hpp:83
Polydim::FEM::MCC::FEM_MCC_2D_Polygon_Geometry FEM_Geometry
Definition LocalSpace_MCC_2D.hpp:86
Polydim::FEM::MCC::FEM_MCC_2D_LocalSpace_Data FEM_LocalSpace_Data
Definition LocalSpace_MCC_2D.hpp:87
Polydim::VEM::MCC::VEM_MCC_PerformanceAnalysis_Data VEM_Analysis
Definition LocalSpace_MCC_2D.hpp:99
unsigned int NumBoundaryQuadraturePoints
Definition LocalSpace_MCC_2D.hpp:97
unsigned int NumInternalQuadraturePoints
Definition LocalSpace_MCC_2D.hpp:98
Per-cell performance metrics for the 2D MCC local space.
Definition LocalSpace_MCC_2D.hpp:92
Polydim::PDETools::LocalSpace_MCC_2D::Performance_Data::Cell2D_Performance Performance_Data
Definition LocalSpace_MCC_2D.hpp:102
Method-specific reference-element data for the 2D MCC local space.
Definition LocalSpace_MCC_2D.hpp:56
Polydim::FEM::MCC::FEM_MCC_2D_LocalSpace FEM_LocalSpace
Definition LocalSpace_MCC_2D.hpp:70
Polydim::VEM::MCC::VEM_MCC_2D_Pressure_ReferenceElement_Data VEM_ReferenceElement_Data_Pressure
Definition LocalSpace_MCC_2D.hpp:64
std::unique_ptr< Polydim::VEM::MCC::I_VEM_MCC_2D_Velocity_ReferenceElement > VEM_ReferenceElement_Velocity
Definition LocalSpace_MCC_2D.hpp:61
Polydim::FEM::MCC::FEM_MCC_2D_ReferenceElement FEM_ReferenceElement
Definition LocalSpace_MCC_2D.hpp:71
std::unique_ptr< VEM::MCC::I_VEM_MCC_2D_Velocity_LocalSpace > VEM_LocalSpace_Velocity
Definition LocalSpace_MCC_2D.hpp:66
unsigned int Order
Definition LocalSpace_MCC_2D.hpp:59
Polydim::VEM::MCC::VEM_MCC_2D_LocalSpace_Types VEM_Type
Definition LocalSpace_MCC_2D.hpp:65
Polydim::PDETools::LocalSpace_MCC_2D::MethodTypes Method_Type
Definition LocalSpace_MCC_2D.hpp:58
Polydim::FEM::MCC::FEM_MCC_2D_ReferenceElement_Data FEM_ReferenceElement_Data
Definition LocalSpace_MCC_2D.hpp:72
Polydim::FEM::MCC::FEM_MCC_Types FEM_Type
Definition LocalSpace_MCC_2D.hpp:69
std::unique_ptr< Polydim::VEM::MCC::I_VEM_MCC_2D_Pressure_ReferenceElement > VEM_ReferenceElement_Pressure
Definition LocalSpace_MCC_2D.hpp:62
std::unique_ptr< VEM::MCC::I_VEM_MCC_2D_Pressure_LocalSpace > VEM_LocalSpace_Pressure
Definition LocalSpace_MCC_2D.hpp:67
Polydim::VEM::MCC::VEM_MCC_2D_Velocity_ReferenceElement_Data VEM_ReferenceElement_Data_Velocity
Definition LocalSpace_MCC_2D.hpp:63
FEM_MCC_Types
Definition FEM_MCC_2D_ReferenceElement.hpp:26
Eigen::VectorXd EdgeDofs(const ReferenceElement_Data &reference_element_data, const LocalSpace_Data &local_space_data, const unsigned int edge_local_index, const Gedim::Quadrature::QuadratureData &edge_dofs_coordinates, const Eigen::VectorXd &strong_values)
Compute the edge velocity DOFs from strongly-imposed boundary values.
Definition LocalSpace_MCC_2D.cpp:465
unsigned int VelocitySize(const ReferenceElement_Data &reference_element_data, const LocalSpace_Data &local_space_data)
Number of local velocity degrees of freedom of the cell.
Definition LocalSpace_MCC_2D.cpp:384
std::array< std::array< unsigned int, 4 >, 2 > ReferenceElementNumDOFs(const ReferenceElement_Data &reference_element_data)
Number of reference-element DOFs per mesh-entity type, for velocity and pressure.
Definition LocalSpace_MCC_2D.cpp:531
Eigen::MatrixXd PressureBasisFunctionsValues(const ReferenceElement_Data &reference_element_data, const LocalSpace_Data &local_space_data)
Evaluate the (scalar) pressure basis functions at the internal quadrature points.
Definition LocalSpace_MCC_2D.cpp:202
Gedim::Quadrature::QuadratureData EdgeReferenceQuadrature(const ReferenceElement_Data &reference_element_data)
Quadrature rule on the reference edge.
Definition LocalSpace_MCC_2D.cpp:315
std::vector< Eigen::MatrixXd > VelocityBasisFunctionsValues(const ReferenceElement_Data &reference_element_data, const LocalSpace_Data &local_space_data, const Polydim::VEM::MCC::ProjectionTypes &projectionType)
Evaluate the (vector) velocity/flux basis functions at the internal quadrature points.
Definition LocalSpace_MCC_2D.cpp:152
Gedim::Quadrature::QuadratureData EdgeDofsCoordinates(const ReferenceElement_Data &reference_element_data, const LocalSpace_Data &local_space_data, const unsigned int edge_local_index)
Coordinates (and weights) of the velocity DOFs on a given edge.
Definition LocalSpace_MCC_2D.cpp:426
Performance_Data ComputePerformance(const ReferenceElement_Data &reference_element_data, const LocalSpace_Data &local_space_data)
Compute the per-cell performance metrics of the local space.
Definition LocalSpace_MCC_2D.cpp:574
Gedim::Quadrature::QuadratureData InternalQuadrature(const ReferenceElement_Data &reference_element_data, const LocalSpace_Data &local_space_data)
Internal quadrature rule of the cell.
Definition LocalSpace_MCC_2D.cpp:364
ReferenceElement_Data CreateReferenceElement(const MethodTypes &method_type, const unsigned int method_order)
Create the velocity/pressure reference elements for the chosen method and order.
Definition LocalSpace_MCC_2D.cpp:22
Eigen::MatrixXd StabilizationMatrix(const ReferenceElement_Data &reference_element_data, const LocalSpace_Data &local_space_data, const VEM::MCC::ProjectionTypes &projectionType)
Compute the (VEM) stabilization matrix of the velocity local space.
Definition LocalSpace_MCC_2D.cpp:403
Gedim::Quadrature::QuadratureData EdgeQuadrature(const ReferenceElement_Data &reference_element_data, const LocalSpace_Data &local_space_data, const unsigned int edge_local_index)
Quadrature rule on a given (physical) edge of the cell.
Definition LocalSpace_MCC_2D.cpp:334
Eigen::MatrixXd VelocityBasisFunctionsValuesOnEdges(const unsigned int &edge_local_index, const ReferenceElement_Data &reference_element_data, const LocalSpace_Data &local_space_data, const Eigen::MatrixXd &edge_quadrature_points)
Evaluate the velocity basis functions on a given edge.
Definition LocalSpace_MCC_2D.cpp:245
MethodTypes
Discretization method for the 2D MCC velocity/pressure pair.
Definition LocalSpace_MCC_2D.hpp:41
@ VEM_MCC_Partial
Mixed VEM with a partially computed velocity space.
@ VEM_MCC_EdgeOrtho
Mixed VEM with an orthonormalized edge basis. .
@ VEM_MCC_Ortho_EdgeOrtho
Mixed VEM with both internal and edge orthonormalization. .
@ VEM_MCC_Ortho
Mixed VEM with an orthonormalized internal basis.
@ FEM_RT_MCC
Raviart–Thomas finite element.
Eigen::MatrixXd VelocityBasisFunctionsDivergenceValues(const ReferenceElement_Data &reference_element_data, const LocalSpace_Data &local_space_data)
Evaluate the velocity/flux divergence at the internal quadrature points.
Definition LocalSpace_MCC_2D.cpp:222
LocalSpace_Data CreateLocalSpace(const double &geometric_tolerance_1D, const double &geometric_tolerance_2D, const Gedim::MeshUtilities::MeshGeometricData2D &mesh_geometric_data, const unsigned int cell2D_index, const ReferenceElement_Data &reference_element_data)
Build the coupled velocity/pressure local space on a given cell.
Definition LocalSpace_MCC_2D.cpp:91
VEM_MCC_2D_LocalSpace_Types
Definition VEM_MCC_2D_Creator.hpp:35
ProjectionTypes
Definition VEM_MCC_Utilities.hpp:25
Definition FEM_MCC_2D_LocalSpace.cpp:17
Definition MeshUtilities.hpp:149
Definition QuadratureData.hpp:22
Aggregated local space data for a 2D MCC element.
Definition FEM_MCC_2D_LocalSpace_Data.hpp:75
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
Definition FEM_MCC_2D_ReferenceElement.hpp:43
Definition VEM_MCC_2D_LocalSpace_Data.hpp:26
Definition VEM_MCC_2D_LocalSpace_Data.hpp:103
Definition I_VEM_MCC_2D_ReferenceElement.hpp:33
Definition VEM_MCC_2D_LocalSpace_Data.hpp:42
Definition I_VEM_MCC_2D_ReferenceElement.hpp:45
Definition VEM_MCC_PerformanceAnalysis.hpp:27