1#ifndef VARIABLEATTRIBUTELOADER_H
2#define VARIABLEATTRIBUTELOADER_H
4#include <core/varTypeEnums.h>
5#include <core/variableAttributes.h>
9using EvalFlags = dealii::EvaluationFlags::EvaluationFlags;
38 [[nodiscard]] AttributesList
44 [[nodiscard]] AttributesList
100 const std::string &dependencies);
112 const std::string &dependencies);
124 const std::string &dependencies)
const;
136 const std::string &dependencies)
const;
146 template <
typename Iterable>
149 const Iterable &dependencies);
159 template <
typename Iterable>
162 const Iterable &dependencies);
172 template <
typename Iterable>
175 const Iterable &dependencies)
const;
185 template <
typename Iterable>
188 const Iterable &dependencies)
const;
224 AttributesList var_attributes;
229 AttributesList pp_attributes;
235 AttributesList *relevant_attributes =
nullptr;
242 validate_attributes();
249 validate_variable_name(
const std::string &name,
250 const std::set<std::string> &forbidden_names,
251 const std::string &context,
258 populate_dependencies(
259 const std::set<std::pair<std::string, std::string>> ®_delimiters,
260 const std::string &variable_name,
262 std::set<std::string> ®_possible_deps,
263 std::map<uint, std::set<std::string>> &change_possible_deps);
269 validate_dependencies(
270 const std::set<std::string> &dependencies,
271 const std::string &context,
273 const std::string &variable_name,
274 const std::set<std::string> ®_possible_deps,
275 const std::map<uint, std::set<std::string>> &change_possible_deps);
281 validate_postprocess_variable(
const std::string &name,
282 const std::set<std::string> &name_list,
283 const std::set<std::string> ®_possible_deps,
291 strip_whitespace(
const std::string &text);
Definition variableAttributeLoader.h:299
void loadVariableAttributes() override
User-facing method where the variable attributes are set.
void loadPostProcessorVariableAttributes() override
User-facing method where the postprocessing variable attributes are set.
Class to manage the variable attributes that the user specifies.
Definition variableAttributeLoader.h:15
variableAttributeLoader()=default
Constructor.
void set_variable_type(const unsigned int &index, const fieldType &var_type) const
Set the field type of the variable at index to var_type where var_type can be SCALAR or VECTOR.
Definition variableAttributeLoader.cc:77
AttributesList get_var_attributes() const
getter function for variable attributes list (copy).
Definition variableAttributeLoader.cc:57
void set_output_integral(const unsigned int &index, const bool &flag) const
(Postprocess only) Flag whether the postprocessing variable at index should have its domain integral ...
Definition variableAttributeLoader.cc:105
AttributesList get_pp_attributes() const
getter function for postprocessing attributes list (copy).
Definition variableAttributeLoader.cc:63
virtual void loadVariableAttributes()
User-facing method where the variable attributes are set.
Definition variableAttributeLoader.cc:7
virtual ~variableAttributeLoader()=default
Destructor.
void set_dependencies_gradient_term_LHS(const unsigned int &index, const std::string &dependencies) const
Add dependencies for the gradient term of the LHS equation of the variable at index.
Definition variableAttributeLoader.cc:142
void set_dependencies_value_term_LHS(const unsigned int &index, const std::string &dependencies) const
Add dependencies for the value term of the LHS equation of the variable at index.
Definition variableAttributeLoader.cc:132
void insert_dependencies_gradient_term_LHS(const unsigned int &index, const Iterable &dependencies) const
Insert dependencies for the gradient term of the LHS equation of the variable at index.
Definition variableAttributeLoader.cc:202
void insert_dependencies_value_term_RHS(const unsigned int &index, const Iterable &dependencies)
Insert dependencies for the value term of the RHS equation of the variable at index.
Definition variableAttributeLoader.cc:153
void insert_dependencies_value_term_LHS(const unsigned int &index, const Iterable &dependencies) const
Insert dependencies for the value term of the LHS equation of the variable at index.
Definition variableAttributeLoader.cc:192
void set_dependencies_gradient_term_RHS(const unsigned int &index, const std::string &dependencies)
Add dependencies for the gradient term of the RHS equation of the variable at index.
Definition variableAttributeLoader.cc:122
void set_variable_equation_type(const unsigned int &index, const PDEType &var_eq_type) const
Set the PDE type of the variable at index to var_eq_type where var_eq_typecan be EXPLICIT_TIME_DEPEND...
Definition variableAttributeLoader.cc:84
virtual void loadPostProcessorVariableAttributes()
User-facing method where the postprocessing variable attributes are set.
Definition variableAttributeLoader.cc:11
void set_need_value_nucleation(const unsigned int &index, const bool &flag) const
Flag whether the variable at index is needed to calculate the nucleation probability.
Definition variableAttributeLoader.cc:91
void insert_dependencies_gradient_term_RHS(const unsigned int &index, const Iterable &dependencies)
Insert dependencies for the gradient term of the RHS equation of the variable at index.
Definition variableAttributeLoader.cc:172
void init_variable_attributes()
Initialize the variable attributes from the two user-facing methods loadVariableAttributes() and load...
Definition variableAttributeLoader.cc:15
void set_allowed_to_nucleate(const unsigned int &index, const bool &flag) const
Flag whether the variable at index is can have a nucleation event.
Definition variableAttributeLoader.cc:98
void set_variable_name(const unsigned int &index, const std::string &name) const
Set the name of the variable at index to name.
Definition variableAttributeLoader.cc:70
void set_dependencies_value_term_RHS(const unsigned int &index, const std::string &dependencies)
Add dependencies for the value term of the RHS equation of the variable at index.
Definition variableAttributeLoader.cc:113
Structure to hold the variable attributes that will be passed to a setInputParameters object.
Definition variableAttributes.h:20