44 auto getFieldPointers(std::vector<std::shared_ptr<T>>& states, std::vector<std::shared_ptr<T>>& params)
46 static_assert(std::is_same_v<T, FiniteElementState> || std::is_same_v<T, FiniteElementDual>,
47 "Type must be either FiniteElementState or FiniteElementDual");
48 std::vector<T*> pointers;
49 for (
auto& t : states) {
50 pointers.push_back(t.get());
52 for (
auto& t : params) {
53 pointers.push_back(t.get());
63 static_assert(std::is_same_v<T, FiniteElementState> || std::is_same_v<T, FiniteElementDual>,
64 "Type must be either FiniteElementState or FiniteElementDual");
65 std::vector<T*> pointers;
66 for (
auto& t : states) {
67 pointers.push_back(t.get());
76 static_assert(std::is_same_v<T, FiniteElementState> || std::is_same_v<T, FiniteElementDual>,
77 "Type must be either FiniteElementState or FiniteElementDual");
78 std::vector<T*> pointers;
79 for (
auto& t : states) {
80 pointers.push_back(&t);
82 for (
auto& t : params) {
83 pointers.push_back(&t);
92 static_assert(std::is_same_v<T, FiniteElementState> || std::is_same_v<T, FiniteElementDual>,
93 "Type must be either FiniteElementState or FiniteElementDual");
94 std::vector<T*> pointers;
95 for (
auto& t : states) {
96 pointers.push_back(&t);
103 template <
typename T>
106 static_assert(std::is_same_v<T, FiniteElementState> || std::is_same_v<T, FiniteElementDual>,
107 "Type must be either FiniteElementState or FiniteElementDual");
108 return std::vector<T*>{state.get()};
112 template <
typename T>
115 static_assert(std::is_same_v<T, FiniteElementState> || std::is_same_v<T, FiniteElementDual>,
116 "Type must be either FiniteElementState or FiniteElementDual");
117 return std::vector<T*>{&state};
122 template <
typename T>
124 const std::vector<std::shared_ptr<T>>& params = {})
126 static_assert(std::is_same_v<T, FiniteElementState> || std::is_same_v<T, FiniteElementDual>,
127 "Type must be either FiniteElementState or FiniteElementDual");
128 std::vector<T const*> pointers;
129 for (
auto& t : states) {
130 pointers.push_back(t.get());
132 for (
auto& t : params) {
133 pointers.push_back(t.get());
140 template <
typename T>
143 static_assert(std::is_same_v<T, FiniteElementState> || std::is_same_v<T, FiniteElementDual>,
144 "Type must be either FiniteElementState or FiniteElementDual");
145 std::vector<T const*> pointers;
146 for (
auto& t : states) {
147 pointers.push_back(t);
149 for (
auto& t : params) {
150 pointers.push_back(t);
156 template <
typename T>
159 static_assert(std::is_same_v<T, FiniteElementState> || std::is_same_v<T, FiniteElementDual>,
160 "Type must be either FiniteElementState or FiniteElementDual");
161 std::vector<T const*> pointers;
162 for (
auto& t : states) {
163 pointers.push_back(&t);
165 for (
auto& t : params) {
166 pointers.push_back(&t);
173 template <
typename T>
176 static_assert(std::is_same_v<T, FiniteElementState> || std::is_same_v<T, FiniteElementDual>,
177 "Type must be either FiniteElementState or FiniteElementDual");
178 return std::vector<T const*>{state.get()};
182 template <
typename T>
185 static_assert(std::is_same_v<T, FiniteElementState> || std::is_same_v<T, FiniteElementDual>,
186 "Type must be either FiniteElementState or FiniteElementDual");
187 return std::vector<T const*>{&state};
Class for encapsulating the dual vector space of a finite element space (i.e. the space of linear for...
Class for encapsulating the critical MFEM components of a primal finite element field.
This contains a class that represents the dual of a finite element vector space, i....
This file contains the declaration of structure that manages the MFEM objects that make up the state ...
Accelerator functionality.
constexpr H1< SHAPE_ORDER, 3 > SHAPE_DIM_3
Function space for shape displacement on dimension 2 meshes.
constexpr int SHAPE_ORDER
Polynomial order used to discretize the shape displacement field.
std::vector< FiniteElementState * > getFieldPointers(std::vector< FieldState > &states, std::vector< FieldState > params={})
Get a vector of FieldPtr or DualFieldPtr from a vector of FieldState.
constexpr H1< SHAPE_ORDER, 2 > SHAPE_DIM_2
Function space for shape displacement on dimension 2 meshes.
FiniteElementDual const * ConstDualFieldPtr
using
std::vector< const FiniteElementState * > getConstFieldPointers(const std::vector< FieldState > &states, const std::vector< FieldState > ¶ms={})
Get a vector of ConstFieldPtr or ConstDualFieldPtr from a vector of FieldState.
FiniteElementState const * ConstFieldPtr
using