6#include <deal.II/base/exceptions.h>
13#include <prismspf/config.h>
31 std::string _name =
"",
34 bool _is_nucleation_rate_variable =
false,
35 std::vector<Types::Index> _nucleating_field_indices = std::vector<Types::Index>())
72inline std::map<std::string, Types::Index>
75 std::map<std::string, Types::Index> map;
76 for (
unsigned int i = 0; i < fields.size(); ++i)
78 AssertThrow(map.find(fields[i].name) == map.end(),
80 "The names of the fields are not unique. This is not allowed."));
81 map[fields[i].name] = i;
89inline std::map<std::string, FieldAttributes>
90field_map(
const std::vector<FieldAttributes> &fields)
92 std::map<std::string, FieldAttributes> map;
95 AssertThrow(map.find(field.name) == map.end(),
97 "The names of the fields are not unique. This is not allowed."));
98 map[field.name] = field;
107PRISMS_PF_END_NAMESPACE
std::map< std::string, Types::Index > field_index_map(const std::vector< FieldAttributes > &fields)
Make a map that maps field names to field indices.
Definition field_attributes.h:73
std::map< std::string, FieldAttributes > field_map(const std::vector< FieldAttributes > &fields)
Make a map that maps field names to field attributes.
Definition field_attributes.h:90
Definition conditional_ostreams.cc:20
Definition vectorized_operations.h:17
Definition constraint_parameters.h:73
Structure to hold the attributes of a field. This includes things like the name, rank,...
Definition field_attributes.h:26
TensorRank field_type
Field type (Scalar/Vector).
Definition field_attributes.h:51
std::vector< Types::Index > nucleating_field_indices
If this is a nucleation rate, the indices of the nucleating fields.
Definition field_attributes.h:66
FieldAttributes(std::string _name="", TensorRank _field_type=TensorRank::Scalar, BoundaryConditionSet _boundary_conditions=BoundaryConditionSet(), bool _is_nucleation_rate_variable=false, std::vector< Types::Index > _nucleating_field_indices=std::vector< Types::Index >())
Constructor.
Definition field_attributes.h:30
bool is_nucleation_rate_variable
Is a nucleation rate.
Definition field_attributes.h:61
BoundaryConditionSet boundary_conditions
Field type (Scalar/Vector).
Definition field_attributes.h:56
std::string name
Field name.
Definition field_attributes.h:46
TensorRank
Tensor rank of the field.
Definition type_enums.h:52
@ Scalar
Definition type_enums.h:54