PolyDiM
C++ library for POLYtopal DIscretization Methods
Loading...
Searching...
No Matches
VEM_PCC_3D_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_PCC_3D_Creator_HPP
13#define __VEM_PCC_3D_Creator_HPP
14
18
23#include <memory>
24
25namespace Polydim
26{
27namespace VEM
28{
29namespace PCC
30{
37
38inline std::unique_ptr<I_VEM_PCC_2D_ReferenceElement> create_VEM_PCC_3D_reference_element_2D(const VEM_PCC_3D_LocalSpace_Types &type)
39{
40 switch (type)
41 {
45 return std::make_unique<VEM_PCC_2D_ReferenceElement>();
46 default:
47 throw std::runtime_error("VEM type " + std::to_string((unsigned int)type) + " not supported");
48 }
49}
50
51inline std::unique_ptr<I_VEM_PCC_3D_ReferenceElement> create_VEM_PCC_3D_reference_element_3D(const VEM_PCC_3D_LocalSpace_Types &type)
52{
53 switch (type)
54 {
58 return std::make_unique<VEM_PCC_3D_ReferenceElement>();
59 default:
60 throw std::runtime_error("VEM type " + std::to_string((unsigned int)type) + " not supported");
61 }
62}
63
64inline std::unique_ptr<I_VEM_PCC_2D_LocalSpace> create_VEM_PCC_3D_local_space_2D(const VEM_PCC_3D_LocalSpace_Types &type)
65{
66 switch (type)
67 {
69 return std::make_unique<VEM_PCC_2D_LocalSpace>();
71 return std::make_unique<VEM_PCC_2D_Inertia_LocalSpace>();
73 return std::make_unique<VEM_PCC_2D_Ortho_LocalSpace>();
74 default:
75 throw std::runtime_error("VEM type " + std::to_string((unsigned int)type) + " not supported");
76 }
77}
78
79inline std::unique_ptr<I_VEM_PCC_3D_LocalSpace> create_VEM_PCC_3D_local_space_3D(const VEM_PCC_3D_LocalSpace_Types &type)
80{
81 switch (type)
82 {
84 return std::make_unique<VEM_PCC_3D_LocalSpace>();
86 return std::make_unique<VEM_PCC_3D_Inertia_LocalSpace>();
88 return std::make_unique<VEM_PCC_3D_Ortho_LocalSpace>();
89 default:
90 throw std::runtime_error("VEM type " + std::to_string((unsigned int)type) + " not supported");
91 }
92}
93
94} // namespace PCC
95} // namespace VEM
96} // namespace Polydim
97
98#endif
Interface class for Primal Conforming Constant degree 3D Virtual Element Methods .
Definition VEM_PCC_3D_Inertia_LocalSpace.hpp:33
Definition VEM_PCC_3D_LocalSpace.hpp:33
Interface class for Primal Conforming Constant degree 3D Virtual Element Methods .
Definition VEM_PCC_3D_Ortho_LocalSpace.hpp:36
std::unique_ptr< I_VEM_PCC_2D_ReferenceElement > create_VEM_PCC_3D_reference_element_2D(const VEM_PCC_3D_LocalSpace_Types &type)
Definition VEM_PCC_3D_Creator.hpp:38
VEM_PCC_3D_LocalSpace_Types
Definition VEM_PCC_3D_Creator.hpp:32
std::unique_ptr< I_VEM_PCC_2D_LocalSpace > create_VEM_PCC_3D_local_space_2D(const VEM_PCC_3D_LocalSpace_Types &type)
Definition VEM_PCC_3D_Creator.hpp:64
std::unique_ptr< I_VEM_PCC_3D_LocalSpace > create_VEM_PCC_3D_local_space_3D(const VEM_PCC_3D_LocalSpace_Types &type)
Definition VEM_PCC_3D_Creator.hpp:79
std::unique_ptr< I_VEM_PCC_3D_ReferenceElement > create_VEM_PCC_3D_reference_element_3D(const VEM_PCC_3D_LocalSpace_Types &type)
Definition VEM_PCC_3D_Creator.hpp:51
Definition FEM_MCC_2D_LocalSpace.cpp:17