svZeroDSolver
|
Degree-of-freedom handler. More...
#include <DOFHandler.h>
Public Member Functions | |
int | size () const |
Get the size of the system. | |
int | get_num_equations () const |
Get the number of equations. | |
int | get_num_variables () const |
Get the number of variables. | |
int | register_variable (const std::string &name) |
Register a new variable at the DOFHandler. | |
int | get_variable_index (const std::string &name) const |
Get the index of a variable by its name. | |
int | register_equation (const std::string &name) |
Register a new equation at the DOFHandler. | |
int | get_index (const std::string_view &name) const |
Get the index of a variable. | |
Public Attributes | |
std::vector< std::string > | variables |
Variable names corresponding to the variable indices. | |
std::map< std::string, int > | variable_name_map |
Map between variable name and index. | |
std::vector< std::string > | equations |
Equation names corresponding to the equation indices. | |
Degree-of-freedom handler.
This class handles degrees-of-freedom for model variables and equations. It assigns each element with row and column indices which it can use to assemble it's local contributions into the global system.
int DOFHandler::get_index | ( | const std::string_view & | name | ) | const |
Get the index of a variable.
name | Name of the variable |
int DOFHandler::get_num_equations | ( | ) | const |
Get the number of equations.
int DOFHandler::get_num_variables | ( | ) | const |
Get the number of variables.
int DOFHandler::get_variable_index | ( | const std::string & | name | ) | const |
Get the index of a variable by its name.
name | Name of the variable |
int DOFHandler::register_equation | ( | const std::string & | name | ) |
Register a new equation at the DOFHandler.
name | Name of the equation |
int DOFHandler::register_variable | ( | const std::string & | name | ) |
Register a new variable at the DOFHandler.
name | Name of the variable |
int DOFHandler::size | ( | ) | const |
Get the size of the system.
std::vector<std::string> DOFHandler::equations |
Equation names corresponding to the equation indices.
std::map<std::string, int> DOFHandler::variable_name_map |
Map between variable name and index.
std::vector<std::string> DOFHandler::variables |
Variable names corresponding to the variable indices.