Commit 472c037f authored by Ricardo Ortiz's avatar Ricardo Ortiz
Browse files

ENH: Refactor of Vega force model interface.

parent b97c0778
Pipeline #4778 passed with stage
......@@ -150,9 +150,10 @@ protected:
std::shared_ptr<OdeSystemState> newState; ///> Storage for the next state
core::SparseMatrixd M; ///> Mass matrix
core::SparseMatrixd C; ///> Damping matrix
core::SparseMatrixd C; ///> Raleigh Damping matrix
core::SparseMatrixd D; ///> Laplacian Damping matrix
core::SparseMatrixd K; ///> Stiffness matrix
core::Vectord f; ///> Force loads
core::Vectord f; ///> Accumulative forces vector
TimeIntegrator::IntegratorType integrationScheme; ///> Integration scheme used.
};
......
This diff is collapsed.
......@@ -74,9 +74,10 @@ public:
auto &K = this->system->evalDFv(newState);
auto &C = this->system->evalDFx(newState);
this->systemMatrix = (1.0/dt) * M;
this->systemMatrix = (1.0/timeStep) * M;
this->systemMatrix += C;
this->systemMatrix += dt * K;
this->systemMatrix += timeStep * K;
state.applyBoundaryConditions(this->systemMatrix);
if(computeRHS)
{
......
......@@ -30,13 +30,14 @@
///
/// \brief Ode system of equations. Represent a ODE system of equations written as
/// Mdv/dt=f(t,x,v)
/// dv/dt=f(t,x,v)
/// dx/dt=v, with initial conditions x(0)=x0; v(0)=v0.
///
class OdeSystem
{
public:
using MatrixFunctionType = std::function<const SparseMatrixd&(const core::Vectord &,const core::Vectord &)>;
using MatrixFunctionType = std::function<const SparseMatrixd&(const core::Vectord &,
const core::Vectord &)>;
using FunctionType = std::function<const core::Vectord &(const OdeSystemState &s)>;
public:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment