PRISMS-PF  v2.1
variableAttributeLoader.h
Go to the documentation of this file.
1 // Class to hold the variable attributes that will be passed to a userInputParameters object
2 #ifndef VARIABLEATTRIBUTELOADER_H
3 #define VARIABLEATTRIBUTELOADER_H
4 
5 #include "model_variables.h"
6 #include "varTypeEnums.h"
8 #include <vector>
9 #include <string>
10 
12 {
13 public:
14  // Constructor
16 
17  // Methods where the attributes are set
20 
21  // Methods to set the parameter_attributes
23  void set_variable_name(unsigned int index, std::string name);
24  void set_variable_type(unsigned int index, fieldType);
25  void set_variable_equation_type(unsigned int index, PDEType);
26 
27  void set_need_value_nucleation(unsigned int index, bool);
28  void set_allowed_to_nucleate(unsigned int index, bool);
29 
30  void set_output_integral(unsigned int index, bool);
31 
32  // Variable inputs (v2.0)
33  std::vector<std::pair<unsigned int, std::string> > var_name_list;
34  std::vector<std::pair<unsigned int, fieldType> > var_type_list;
35  std::vector<std::pair<unsigned int, PDEType> > var_eq_type_list;
36  std::vector<std::pair<unsigned int, bool> > need_value_list;
37  std::vector<std::pair<unsigned int, bool> > need_gradient_list;
38  std::vector<std::pair<unsigned int, bool> > need_hessian_list;
39  std::vector<std::pair<unsigned int, bool> > need_value_residual_list;
40  std::vector<std::pair<unsigned int, bool> > need_gradient_residual_list;
41  std::vector<std::pair<unsigned int, bool> > need_value_list_LHS;
42  std::vector<std::pair<unsigned int, bool> > need_gradient_list_LHS;
43  std::vector<std::pair<unsigned int, bool> > need_hessian_list_LHS;
44  std::vector<std::pair<unsigned int, bool> > need_value_residual_list_LHS;
45  std::vector<std::pair<unsigned int, bool> > need_gradient_residual_list_LHS;
46 
47  std::vector<std::pair<unsigned int, bool> > need_value_change_list_LHS;
48  std::vector<std::pair<unsigned int, bool> > need_gradient_change_list_LHS;
49  std::vector<std::pair<unsigned int, bool> > need_hessian_change_list_LHS;
50 
51  std::vector<std::pair<unsigned int, bool> > need_value_list_PP;
52  std::vector<std::pair<unsigned int, bool> > need_gradient_list_PP;
53  std::vector<std::pair<unsigned int, bool> > need_hessian_list_PP;
54  std::vector<std::pair<unsigned int, bool> > need_value_list_nucleation;
55  std::vector<std::pair<unsigned int, bool> > nucleating_variable_list;
56 
57  std::vector<std::pair<unsigned int, std::string> > var_name_list_PP;
58  std::vector<std::pair<unsigned int, fieldType> > var_type_list_PP;
59  std::vector<std::pair<unsigned int, bool> > output_integral_list;
60  std::vector<std::pair<unsigned int, bool> > need_value_residual_list_PP;
61  std::vector<std::pair<unsigned int, bool> > need_gradient_residual_list_PP;
62 
63 
64  void set_dependencies_value_term_RHS(unsigned int index, std::string dependencies);
65  void set_dependencies_gradient_term_RHS(unsigned int index, std::string dependencies);
66  void set_dependencies_value_term_LHS(unsigned int index, std::string dependencies);
67  void set_dependencies_gradient_term_LHS(unsigned int index, std::string dependencies);
68 
69  std::vector<std::pair<unsigned int, std::string> > var_eq_dependencies_value_RHS;
70  std::vector<std::pair<unsigned int, std::string> > var_eq_dependencies_gradient_RHS;
71  std::vector<std::pair<unsigned int, std::string> > var_eq_dependencies_value_LHS;
72  std::vector<std::pair<unsigned int, std::string> > var_eq_dependencies_gradient_LHS;
73 
74  std::vector<std::pair<unsigned int, std::string> > var_eq_dependencies_value_PP;
75  std::vector<std::pair<unsigned int, std::string> > var_eq_dependencies_gradient_PP;
76 
78 
79  unsigned int number_of_variables;
80 
81  std::vector<std::string> var_name;
82  std::vector<fieldType> var_type;
83  std::vector<PDEType> var_eq_type;
84 
85  std::vector<bool> var_nonlinear;
86 
87 
88  std::vector<bool> nucleating_variable;
89  std::vector<bool> need_value_nucleation;
90 
91  unsigned int pp_number_of_variables;
92 
93  std::vector<std::string> pp_var_name;
94  std::vector<fieldType> pp_var_type;
95  std::vector<bool> pp_calc_integral;
96 
97 };
98 
99 
100 #endif
std::vector< std::string > var_name
std::vector< bool > pp_calc_integral
void set_variable_name(unsigned int index, std::string name)
std::vector< std::pair< unsigned int, bool > > need_value_list_PP
std::vector< std::pair< unsigned int, bool > > nucleating_variable_list
std::vector< std::pair< unsigned int, std::string > > var_eq_dependencies_value_RHS
std::vector< std::pair< unsigned int, bool > > need_hessian_list_LHS
void set_need_value_nucleation(unsigned int index, bool)
std::vector< std::pair< unsigned int, bool > > need_gradient_list_PP
std::vector< std::pair< unsigned int, bool > > need_value_residual_list_PP
std::vector< std::pair< unsigned int, bool > > need_gradient_residual_list_LHS
std::vector< std::pair< unsigned int, bool > > need_value_list_nucleation
std::vector< std::pair< unsigned int, fieldType > > var_type_list
PDEType
Definition: varTypeEnums.h:5
std::vector< std::pair< unsigned int, fieldType > > var_type_list_PP
std::vector< std::pair< unsigned int, std::string > > var_name_list
void set_dependencies_gradient_term_LHS(unsigned int index, std::string dependencies)
std::vector< std::pair< unsigned int, bool > > need_hessian_list
std::vector< std::pair< unsigned int, std::string > > var_eq_dependencies_gradient_LHS
std::vector< std::pair< unsigned int, bool > > need_value_change_list_LHS
std::vector< std::pair< unsigned int, bool > > need_value_list
std::vector< std::pair< unsigned int, bool > > need_gradient_residual_list
std::vector< PDEType > var_eq_type
std::vector< std::pair< unsigned int, std::string > > var_eq_dependencies_gradient_PP
void set_variable_type(unsigned int index, fieldType)
std::vector< std::pair< unsigned int, bool > > need_value_residual_list
std::vector< std::pair< unsigned int, bool > > need_gradient_residual_list_PP
void set_output_integral(unsigned int index, bool)
std::vector< bool > var_nonlinear
EquationDependencyParser equation_dependency_parser
void set_dependencies_value_term_LHS(unsigned int index, std::string dependencies)
std::vector< std::pair< unsigned int, bool > > need_value_residual_list_LHS
std::vector< std::pair< unsigned int, std::string > > var_eq_dependencies_gradient_RHS
void set_dependencies_gradient_term_RHS(unsigned int index, std::string dependencies)
std::vector< std::pair< unsigned int, bool > > need_hessian_change_list_LHS
std::vector< std::pair< unsigned int, PDEType > > var_eq_type_list
std::vector< std::string > pp_var_name
std::vector< std::pair< unsigned int, bool > > need_gradient_change_list_LHS
std::vector< fieldType > pp_var_type
std::vector< bool > nucleating_variable
void set_dependencies_value_term_RHS(unsigned int index, std::string dependencies)
std::vector< std::pair< unsigned int, bool > > output_integral_list
std::vector< std::pair< unsigned int, bool > > need_gradient_list_LHS
void set_allowed_to_nucleate(unsigned int index, bool)
std::vector< std::pair< unsigned int, bool > > need_value_list_LHS
std::vector< std::pair< unsigned int, bool > > need_gradient_list
std::vector< bool > need_value_nucleation
std::vector< std::pair< unsigned int, bool > > need_hessian_list_PP
void set_variable_equation_type(unsigned int index, PDEType)
std::vector< fieldType > var_type
std::vector< std::pair< unsigned int, std::string > > var_name_list_PP
std::vector< std::pair< unsigned int, std::string > > var_eq_dependencies_value_PP
fieldType
Definition: varTypeEnums.h:4
std::vector< std::pair< unsigned int, std::string > > var_eq_dependencies_value_LHS