GHOST
|
#include <auxiliary_data.hpp>
Public Member Functions | |
AuxiliaryData () | |
Constructor instanciating an empty vector of variable IDs. More... | |
AuxiliaryData (const std::vector< int > &variables_index) | |
AuxiliaryData (const std::vector< Variable > &variables) | |
AuxiliaryData (const AuxiliaryData &other)=default | |
Default copy contructor. More... | |
AuxiliaryData (AuxiliaryData &&other)=default | |
Default move contructor. More... | |
AuxiliaryData & | operator= (const AuxiliaryData &other)=delete |
Copy assignment operator disabled. More... | |
AuxiliaryData & | operator= (AuxiliaryData &&other)=delete |
Move assignment operator disabled. More... | |
virtual | ~AuxiliaryData ()=default |
Default virtual destructor. More... | |
Protected Member Functions | |
virtual void | required_update (const std::vector< Variable * > &variables, int index, int new_value)=0 |
ghost::AuxiliaryData is a class users eventually need to derive from if they need to keep track with some auxiliary data outside variable values.
ghost::AuxiliaryData cannot be directly used to encode auxiliary data of a model, since this is an abstract class.
Derived classes would contain all data outside variable values users need to keep updated. The only method to override is required_update(variables, index, new_value), defining how data should be updated when the solver assigns the value 'new_value' to the variable 'variables[index]'.
ghost::AuxiliaryData::AuxiliaryData | ( | ) |
Constructor instanciating an empty vector of variable IDs.
ghost::AuxiliaryData::AuxiliaryData | ( | const std::vector< int > & | variables_index | ) |
Constructor with a vector of variable IDs. This vector is internally used by AuxiliaryData to know what variables from the global variable vector it is handling.
variables | a const reference to a vector of IDs of variables needed for the auxiliary data. |
ghost::AuxiliaryData::AuxiliaryData | ( | const std::vector< Variable > & | variables | ) |
Constructor building a vector of variable IDs by calling v->get_id() from all variables v.
variables | a const reference to a vector of variable composing the constraint. |
|
default |
Default copy contructor.
|
default |
Default move contructor.
|
virtualdefault |
Default virtual destructor.
|
delete |
Move assignment operator disabled.
|
delete |
Copy assignment operator disabled.
|
protectedpure virtual |
Method to handle what should happen to the auxiliary data if variables[index] is updated with the value 'new_value'.
Like any methods prefixed by 'required_', overriding this method is mandatory.
variables | a const reference of the vector of raw pointers to variables that are relevant to the auxiliary data. |
index | an integer to get the variable 'variables[index]' that has been updated by the solver. |
new_value | an integer to know what is the new value of 'variables[index]'. |