Strong Coupling Core
0.1.0
Library for solving a system of strong coupled physical subsystems.
|
Holds all slaves and constraints in the system, and solves for constraint forces. More...
#include <Solver.h>
Public Member Functions | |
Solver () | |
virtual | ~Solver () |
void | addSlave (Slave *slave) |
Add a slave to the solver. More... | |
void | addConstraint (Constraint *constraint) |
Add a constraint to the solver. More... | |
int | getSystemMatrixRows () |
Get the number of rows in the system matrix. More... | |
int | getSystemMatrixCols () |
Get number of columns in the system matrix. More... | |
void | getEquations (std::vector< Equation * > *eqs) |
Get all equations in a vector. More... | |
void | solve (int printDebugInfo) |
Solves the system of equation. Sets the constraint forces in each connector. More... | |
void | solve () |
void | setSpookParams (double relaxation, double compliance, double timeStep) |
void | resetConstraintForces () |
void | updateConstraints () |
Public Attributes | |
int | m_connectorIndexCounter |
Counter for connector index. More... | |
Holds all slaves and constraints in the system, and solves for constraint forces.
Solver::Solver | ( | ) |
|
virtual |
void Solver::addConstraint | ( | Constraint * | constraint | ) |
Add a constraint to the solver.
constraint |
void Solver::addSlave | ( | Slave * | slave | ) |
Add a slave to the solver.
slave |
void Solver::getEquations | ( | std::vector< Equation * > * | eqs | ) |
Get all equations in a vector.
eqs | Vector that will be appended with the equations. |
int Solver::getSystemMatrixCols | ( | ) |
Get number of columns in the system matrix.
int Solver::getSystemMatrixRows | ( | ) |
Get the number of rows in the system matrix.
void Solver::resetConstraintForces | ( | ) |
Resets all constraint forces on all connnectors added.
void Solver::setSpookParams | ( | double | relaxation, |
double | compliance, | ||
double | timeStep | ||
) |
Set spook parameters for all equations at once.
relaxation | |
compliance | |
timeStep |
void Solver::solve | ( | int | printDebugInfo | ) |
Solves the system of equation. Sets the constraint forces in each connector.
void Solver::solve | ( | ) |
void Solver::updateConstraints | ( | ) |
Updates all constraints.
int sc::Solver::m_connectorIndexCounter |
Counter for connector index.