1 #ifndef CASM_BasisFunctionSpecs
2 #define CASM_BasisFunctionSpecs
98 std::vector<DoFKey> _dof_keys = {},
99 std::vector<notstd::cloneable_ptr<DoFSpecs>> _dof_specs = {},
101 std::map<OrbitBranchSize, MaxPolyOrder> _orbit_branch_max_poly_order = {},
102 std::vector<Index> _include_functions = {},
103 std::vector<Index> _exclude_functions = {},
139 template <
typename DoFSpecsType>
140 DoFSpecsType
const &
get(
DoFKey const &key,
154 std::vector<DoFKey> _dof_keys,
157 std::map<OrbitBranchSize, MaxPolyOrder> _orbit_branch_max_poly_order,
158 std::vector<Index> _include_functions,
159 std::vector<Index> _exclude_functions,
PARAM_PACK_TYPE _param_pack_type)
160 : dof_keys(
std::move(_dof_keys)),
161 dof_specs(
std::move(_dof_specs)),
162 global_max_poly_order(_global_max_poly_order),
163 orbit_branch_max_poly_order(_orbit_branch_max_poly_order),
164 include_functions(_include_functions),
165 exclude_functions(_exclude_functions),
166 param_pack_type(_param_pack_type) {}
168 template <
typename DoFSpecsType>
171 auto it = std::find_if(basis_function_specs.
dof_specs.begin(),
174 return ptr->name() == key;
176 if (it == basis_function_specs.
dof_specs.end()) {
177 std::stringstream ss;
178 ss <<
"DoFSpecs not found in BasisFunctionSpecs for " << key;
181 return static_cast<DoFSpecsType
const &
>(**it);
virtual DoFKey _name() const =0
A 'cloneable_ptr' can be used in place of 'unique_ptr'.
#define ABSTRACT_CLONEABLE(T)
DoFSpecsType const & get(DoFKey const &key, BasisFunctionSpecs const &basis_function_specs)
INDEX_TYPE Index
For long integer indexing:
Specify how to construct basis functions.
PARAM_PACK_TYPE param_pack_type
Specify the Clexulator underlying data structure type.
BasisFunctionSpecs(std::vector< DoFKey > _dof_keys={}, std::vector< notstd::cloneable_ptr< DoFSpecs >> _dof_specs={}, MaxPolyOrder _global_max_poly_order=-1, std::map< OrbitBranchSize, MaxPolyOrder > _orbit_branch_max_poly_order={}, std::vector< Index > _include_functions={}, std::vector< Index > _exclude_functions={}, PARAM_PACK_TYPE _param_pack_type=PARAM_PACK_TYPE::DEFAULT)
std::vector< Index > include_functions
MaxPolyOrder global_max_poly_order
std::map< OrbitBranchSize, MaxPolyOrder > orbit_branch_max_poly_order
std::vector< Index > exclude_functions
std::vector< DoFKey > dof_keys
Which DoF types to include in the basis functions.
std::vector< notstd::cloneable_ptr< DoFSpecs > > dof_specs
Provides DoF-particular specifications for constructing basis functions.