PRISMS-PF Manual v3.0-pre
Loading...
Searching...
No Matches
variableAttributes.h
1#ifndef VARIABLEATTRIBUTES_H
2#define VARIABLEATTRIBUTES_H
3
4#include <deal.II/matrix_free/evaluation_flags.h>
5
6#include <core/varTypeEnums.h>
7#include <map>
8#include <set>
9#include <string>
10
11using EvalFlags = dealii::EvaluationFlags::EvaluationFlags;
13using AttributesList = std::map<uint, variableAttributes>;
14
20{
21 // Variable attributes
22 std::string name;
23 fieldType var_type = UNDEFINED_FIELD;
24 PDEType eq_type = UNDEFINED_PDE;
25 bool need_value_nucleation = false;
26 bool nucleating_variable = false;
27 bool is_pp = false;
28 bool is_nonlinear = false;
29 bool calc_integral = false;
30 bool output_integral = false;
31
32 // This variable's dependencies
33 std::set<std::string> dependencies_value_RHS;
34 std::set<std::string> dependencies_gradient_RHS;
35 std::set<std::string> dependencies_RHS;
36 std::set<std::string> dependencies_value_LHS;
37 std::set<std::string> dependencies_gradient_LHS;
38 std::set<std::string> dependencies_LHS;
39 std::set<std::string> dependencies_value_PP;
40 std::set<std::string> dependencies_gradient_PP;
41 std::set<std::string> dependencies_PP;
42
43 std::set<std::string> dependency_set;
44
45 // Evaluation Flags. Tells deal.II whether or not to retrieve the value, grad, hess,
46 // etc. for equations
47 EvalFlags eval_flags_explicit_RHS = dealii::EvaluationFlags::nothing;
48 EvalFlags eval_flags_nonexplicit_RHS = dealii::EvaluationFlags::nothing;
49 EvalFlags eval_flags_nonexplicit_LHS = dealii::EvaluationFlags::nothing;
50
51 EvalFlags eval_flags_change_nonexplicit_LHS = dealii::EvaluationFlags::nothing;
52
53 EvalFlags eval_flags_residual_explicit_RHS = dealii::EvaluationFlags::nothing;
54 EvalFlags eval_flags_residual_nonexplicit_RHS = dealii::EvaluationFlags::nothing;
55 EvalFlags eval_flags_residual_nonexplicit_LHS = dealii::EvaluationFlags::nothing;
56
57 EvalFlags eval_flags_postprocess = dealii::EvaluationFlags::nothing;
58 EvalFlags eval_flags_residual_postprocess = dealii::EvaluationFlags::nothing;
59
64 void
66
71 void
72 parse_dependencies(std::map<uint, variableAttributes> &other_var_attributes);
73
78 void
80
87 std::set<EvalFlags *>
88 eval_flags_for_eq_type(const variableAttributes &other_variable);
89};
90
91#endif
Structure to hold the variable attributes that will be passed to a setInputParameters object.
Definition variableAttributes.h:20
void parse_dependencies(std::map< uint, variableAttributes > &other_var_attributes)
Take user-defined dependency sets to set the evaluation flags for each variable.
Definition variableAttributes.cc:88
void format_dependencies()
Combine 'value' and 'gradient' residual dependencies to one dependency set per RHS,...
Definition variableAttributes.cc:4
std::set< EvalFlags * > eval_flags_for_eq_type(const variableAttributes &other_variable)
Helper function that returns a set of pointers to the flags that need to be set when other_variable i...
Definition variableAttributes.cc:152
void parse_residual_dependencies()
Take user-defined dependency sets to set the residual flags for each variable.
Definition variableAttributes.cc:24