PolyDiM
C++ library for POLYtopal DIscretization Methods
Loading...
Searching...
No Matches
FEM_PCC_1D_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 __FEM_PCC_1D_Creator_HPP
13#define __FEM_PCC_1D_Creator_HPP
14
16
18#include <memory>
19
20namespace Polydim
21{
22namespace FEM
23{
24namespace PCC
25{
26
35
40inline std::unique_ptr<FEM_PCC_1D_ReferenceElement> create_FEM_PCC_1D_reference_element(const FEM_PCC_1D_LocalSpace_Types &type)
41{
42 switch (type)
43 {
45 return std::make_unique<FEM_PCC_1D_ReferenceElement>();
46 default:
47 throw std::runtime_error("FEM type " + std::to_string((unsigned int)type) + " not supported");
48 }
49}
50
55inline std::unique_ptr<FEM_PCC_1D_LocalSpace> create_FEM_PCC_1D_local_space(const FEM_PCC_1D_LocalSpace_Types &type)
56{
57 switch (type)
58 {
60 return std::make_unique<FEM_PCC_1D_LocalSpace>();
61 default:
62 throw std::runtime_error("FEM type " + std::to_string((unsigned int)type) + " not supported");
63 }
64}
65
66} // namespace PCC
67} // namespace FEM
68} // namespace Polydim
69
70#endif
Definition FEM_PCC_1D_LocalSpace.hpp:53
std::unique_ptr< FEM_PCC_1D_LocalSpace > create_FEM_PCC_1D_local_space(const FEM_PCC_1D_LocalSpace_Types &type)
Factory building the local space for a 1D PCC local space type.
Definition FEM_PCC_1D_Creator.hpp:55
FEM_PCC_1D_LocalSpace_Types
Enumeration of the available 1D PCC (primal/continuous) local space types.
Definition FEM_PCC_1D_Creator.hpp:32
@ FEM_PCC_1D_LocalSpace
Standard 1D PCC local space.
std::unique_ptr< FEM_PCC_1D_ReferenceElement > create_FEM_PCC_1D_reference_element(const FEM_PCC_1D_LocalSpace_Types &type)
Factory building the reference element for a 1D PCC local space type.
Definition FEM_PCC_1D_Creator.hpp:40
Definition FEM_MCC_2D_LocalSpace.cpp:17