Skip to content
Snippets Groups Projects
Commit 3328b294 authored by Sreekanth Arikatla's avatar Sreekanth Arikatla
Browse files

BUG: Continue init. of FE model even if damping coeff. are zero

Currently, if all the damping coefficients are zero,
the initialization is stopped in between which is not
intended.

Modifications are made to continue initialization of
the rest of the FE mode if all damping coefficients are zero.
parent 340b8c02
No related branches found
No related tags found
No related merge requests found
......@@ -102,43 +102,19 @@ FEMDeformableBodyModel::initialize()
auto physicsMesh = std::dynamic_pointer_cast<imstk::VolumetricMesh>(this->getModelGeometry());
m_vegaPhysicsMesh = physicsMesh->getAttachedVegaMesh();
if (!this->initializeForceModel())
{
return false;
}
if (!this->initializeMassMatrix())
{
return false;
}
if (!this->initializeDampingMatrix())
{
return false;
}
if (!this->initializeTangentStiffness())
if (!this->initializeForceModel() ||
!this->initializeMassMatrix() ||
!this->initializeDampingMatrix() ||
!this->initializeTangentStiffness() ||
!this->loadBoundaryConditions() ||
!this->initializeGravityForce() ||
!this->initializeExplicitExternalForces())
{
return false;
}
this->loadInitialStates();
if (!this->loadBoundaryConditions())
{
return false;
}
if (!this->initializeGravityForce())
{
return false;
}
if (!this->initializeExplicitExternalForces())
{
return false;
}
m_Feff.resize(m_numDOF);
m_Finternal.resize(m_numDOF);
m_Finternal.setConstant(0.0);
......@@ -285,11 +261,10 @@ FEMDeformableBodyModel::initializeDampingMatrix()
auto dampingMassCoefficient = m_forceModelConfiguration->getFloatsOptionsMap().at("dampingMassCoefficient");
auto dampingStiffnessCoefficient = m_forceModelConfiguration->getFloatsOptionsMap().at("dampingStiffnessCoefficient");
m_damped = (dampingStiffnessCoefficient == 0.0 && dampingLaplacianCoefficient == 0.0 && dampingMassCoefficient == 0.0) ? false : true;
if (!m_damped)
if (dampingStiffnessCoefficient == 0.0 && dampingLaplacianCoefficient == 0.0 && dampingMassCoefficient == 0.0)
{
return false;
LOG(WARNING) << "FEMDeformableBodyModel::initializeDampingMatrix() - All the damping parameters are zero!";
return true;
}
if (dampingLaplacianCoefficient < 0.0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment