Skip to content

WIP: feat: prepare for fast explicit implementations#33

Draft
alexdummer wants to merge 4 commits intoMAteRialMOdelingToolbox:next_v26.05from
alexdummer:explicit
Draft

WIP: feat: prepare for fast explicit implementations#33
alexdummer wants to merge 4 commits intoMAteRialMOdelingToolbox:next_v26.05from
alexdummer:explicit

Conversation

@alexdummer
Copy link
Contributor

No description provided.

@alexdummer alexdummer marked this pull request as draft January 26, 2026 04:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces explicit-time-integration entry points across materials and elements (e.g., “explicit” stress update without tangents), and adds API hooks for density/damping needed by explicit dynamics.

Changes:

  • Add computeStressExplicit(...) default implementations to material base classes and an optimized override for VonMisesModel.
  • Add element-side explicit internal force assembly (computeYourselfExplicit) and a new lumped damping interface.
  • Add a damping-coefficient material API and tighten default getDensity() behavior.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
modules/materials/VonMises/src/VonMises.cpp Adds getDampingCoefficient() and computeStressExplicit() implementation for Von Mises.
modules/materials/VonMises/include/Marmot/VonMises.h Exposes the new explicit stress API + damping coefficient getter.
modules/elements/DisplacementFiniteElement/include/Marmot/DisplacementFiniteElement.h Adds explicit element assembly, changes lumped inertia approach, adds lumped damping computation.
modules/core/MarmotMechanicsCore/include/Marmot/MarmotMaterialHypoElastic.h Adds default computeStressExplicit, adds getDampingCoefficient, changes default getDensity() to throw.
modules/core/MarmotFiniteStrainMechanicsCore/include/Marmot/MarmotMaterialFiniteStrain.h Adds default finite-strain computeStressExplicit wrapper.
modules/core/MarmotFiniteElementCore/include/Marmot/MarmotElement.h Adds virtual computeYourselfExplicit and computeLumpedDamping with throwing defaults.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Map< RhsSized > LCM( C );
LCM.setZero();

constexpr int nNodesLinear = pow( 2, nDim );
else if ( sectionType == SectionType::PlaneStrain ) {

Vector6d dE6 = planeVoigtToVoigt( dE );
Matrix6d C66;
double dT,
double& pNewdT );

/** #
/* } */
/* Eigen::VectorXd stress1D( 1 ); */
/* stress1D( 0 ) = state.stress; */
/* qp.managedStateVars->stress = make3DVoigt< ParentGeometryElement::voigtSize >( stress1D ); */ #
KeSizedMatrix CMM;
CMM.setZero();
computeConsistentInertia( CMM.data() );
constexpr int nNodesLinear = pow( 2, nDim );
Comment on lines +878 to +881
VectorXd N_weighted = 0.5 * ( N_ );
// add the linear contribution to the first nNodesLinear nodes
N_weighted.head( nNodesLinear ) += 0.5 * N_lin;

Comment on lines +907 to +911
const double rho = qp.material->getDensity();
VectorXd m_ = N_weighted * qp.detJ * qp.weight * rho;
for ( int i = 0; i < nNodes; i++ ) {
for ( int d = 0; d < nDim; d++ )
LCM( i * nDim + d ) += m_( i );
}

virtual double getDensity() { return -1; }
virtual double getDensity() { throw std::runtime_error( "getDensity() not implemented for this material." ); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants