PolyDiM
C++ library for POLYtopal DIscretization Methods
Loading...
Searching...
No Matches
VEM_PCC_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_PCC_2D_Creator_HPP
13#define __VEM_PCC_2D_Creator_HPP
14
17
22#include <memory>
23
24namespace Polydim
25{
26namespace VEM
27{
28namespace PCC
29{
36
37inline std::unique_ptr<Polydim::VEM::PCC::I_VEM_PCC_2D_ReferenceElement> create_VEM_PCC_2D_reference_element(
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<Polydim::VEM::PCC::I_VEM_PCC_2D_LocalSpace> create_VEM_PCC_2D_local_space(const Polydim::VEM::PCC::VEM_PCC_2D_LocalSpace_Types &type)
52{
53 switch (type)
54 {
56 return std::make_unique<VEM_PCC_2D_LocalSpace>();
58 return std::make_unique<VEM_PCC_2D_Inertia_LocalSpace>();
60 return std::make_unique<VEM_PCC_2D_Ortho_LocalSpace>();
61 default:
62 throw std::runtime_error("VEM type " + std::to_string((unsigned int)type) + " not supported");
63 }
64}
65
66} // namespace PCC
67} // namespace VEM
68} // namespace Polydim
69
70#endif
Primal Conforming Constant degree Virtual Element Methods 2D with improvements for high-order .
Definition VEM_PCC_2D_Inertia_LocalSpace.hpp:28
Definition VEM_PCC_2D_LocalSpace.hpp:26
Interface class for Primal Conforming Constant degree 2D Virtual Element Methods .
Definition VEM_PCC_2D_Ortho_LocalSpace.hpp:27
VEM_PCC_2D_LocalSpace_Types
Definition VEM_PCC_2D_Creator.hpp:31
std::unique_ptr< Polydim::VEM::PCC::I_VEM_PCC_2D_ReferenceElement > create_VEM_PCC_2D_reference_element(const Polydim::VEM::PCC::VEM_PCC_2D_LocalSpace_Types &type)
Definition VEM_PCC_2D_Creator.hpp:37
std::unique_ptr< Polydim::VEM::PCC::I_VEM_PCC_2D_LocalSpace > create_VEM_PCC_2D_local_space(const Polydim::VEM::PCC::VEM_PCC_2D_LocalSpace_Types &type)
Definition VEM_PCC_2D_Creator.hpp:51
Definition FEM_MCC_2D_LocalSpace.cpp:17