PolyDiM
C++ library for POLYtopal DIscretization Methods
Loading...
Searching...
No Matches
VEM_MCC_2D_Creator.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 __VEM_MCC_2D_Creator_HPP
13#define __VEM_MCC_2D_Creator_HPP
14
25#include <memory>
26
27namespace Polydim
28{
29namespace VEM
30{
31namespace MCC
32{
33
42
43inline std::unique_ptr<Polydim::VEM::MCC::I_VEM_MCC_2D_Pressure_ReferenceElement> create_VEM_MCC_2D_pressure_reference_element(
45{
46 switch (type)
47 {
51 return std::make_unique<VEM_MCC_2D_Pressure_ReferenceElement>();
54 return std::make_unique<VEM_MCC_2D_EdgeOrtho_Pressure_ReferenceElement>();
55 default:
56 throw std::runtime_error("VEM type " + std::to_string((unsigned int)type) + " not supported");
57 }
58}
59
60inline std::unique_ptr<I_VEM_MCC_2D_Velocity_ReferenceElement> create_VEM_MCC_2D_velocity_reference_element(
62{
63 switch (type)
64 {
68 return std::make_unique<VEM_MCC_2D_Velocity_ReferenceElement>();
71 return std::make_unique<VEM_MCC_2D_EdgeOrtho_Velocity_ReferenceElement>();
72 default:
73 throw std::runtime_error("VEM type " + std::to_string((unsigned int)type) + " not supported");
74 }
75}
76
77inline std::unique_ptr<I_VEM_MCC_2D_Pressure_LocalSpace> create_VEM_MCC_2D_pressure_local_space(const Polydim::VEM::MCC::VEM_MCC_2D_LocalSpace_Types &type)
78{
79 switch (type)
80 {
86 return std::make_unique<VEM_MCC_2D_Pressure_LocalSpace>();
87 default:
88 throw std::runtime_error("VEM type " + std::to_string((unsigned int)type) + " not supported");
89 }
90}
91
92inline std::unique_ptr<I_VEM_MCC_2D_Velocity_LocalSpace> create_VEM_MCC_2D_velocity_local_space(const Polydim::VEM::MCC::VEM_MCC_2D_LocalSpace_Types &type)
93{
94 switch (type)
95 {
97 return std::make_unique<VEM_MCC_2D_Velocity_LocalSpace>();
99 return std::make_unique<VEM_MCC_2D_Partial_Velocity_LocalSpace>();
101 return std::make_unique<VEM_MCC_2D_Ortho_Velocity_LocalSpace>();
103 return std::make_unique<VEM_MCC_2D_EdgeOrtho_Velocity_LocalSpace>();
105 return std::make_unique<VEM_MCC_2D_Ortho_EdgeOrtho_Velocity_LocalSpace>();
106 default:
107 throw std::runtime_error("VEM type " + std::to_string((unsigned int)type) + " not supported");
108 }
109}
110
111} // namespace MCC
112} // namespace VEM
113} // namespace Polydim
114
115#endif
std::unique_ptr< I_VEM_MCC_2D_Pressure_LocalSpace > create_VEM_MCC_2D_pressure_local_space(const Polydim::VEM::MCC::VEM_MCC_2D_LocalSpace_Types &type)
Definition VEM_MCC_2D_Creator.hpp:77
std::unique_ptr< Polydim::VEM::MCC::I_VEM_MCC_2D_Pressure_ReferenceElement > create_VEM_MCC_2D_pressure_reference_element(const Polydim::VEM::MCC::VEM_MCC_2D_LocalSpace_Types &type)
Definition VEM_MCC_2D_Creator.hpp:43
VEM_MCC_2D_LocalSpace_Types
Definition VEM_MCC_2D_Creator.hpp:35
std::unique_ptr< I_VEM_MCC_2D_Velocity_LocalSpace > create_VEM_MCC_2D_velocity_local_space(const Polydim::VEM::MCC::VEM_MCC_2D_LocalSpace_Types &type)
Definition VEM_MCC_2D_Creator.hpp:92
std::unique_ptr< I_VEM_MCC_2D_Velocity_ReferenceElement > create_VEM_MCC_2D_velocity_reference_element(const Polydim::VEM::MCC::VEM_MCC_2D_LocalSpace_Types &type)
Definition VEM_MCC_2D_Creator.hpp:60
Definition FEM_MCC_2D_LocalSpace.cpp:17