Skip to content

Commit

Permalink
clean code & unused fct/var
Browse files Browse the repository at this point in the history
  • Loading branch information
VannesteFelix committed Oct 11, 2023
1 parent 155afdb commit ea78ec7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,6 @@ class HyperReducedTriangleFEMForceField : public virtual TriangleFEMForceField<D
/// Stiffness matrix ( = RJKJtRt with K the Material stiffness matrix, J the strain-displacement matrix, and R the transformation matrix if any )
typedef type::Mat<9, 9, Real> StiffnessMatrix;

/// Vector of material stiffness matrices of each tetrahedron
VecMaterialStiffness materialsStiffnesses;
VecStrainDisplacement strainDisplacements; ///< the strain-displacement matrices vector
type::vector<Transformation> rotations;


using TriangleFEMForceField<DataTypes>::m_topology;
using TriangleFEMForceField<DataTypes>::_indexedElements;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,13 +380,6 @@ void HyperReducedTriangleFEMForceField<DataTypes>::buildStiffnessMatrix(core::be
StiffnessMatrix JKJt, RJKJtRt;
sofa::type::Mat<3, 3, Real> localMatrix(type::NOINIT);

static constexpr Transformation identity = []
{
Transformation i;
i.identity();
return i;
}();

constexpr auto S = DataTypes::deriv_total_size; // size of node blocks
constexpr auto N = Element::size();

Expand All @@ -403,9 +396,11 @@ void HyperReducedTriangleFEMForceField<DataTypes>::buildStiffnessMatrix(core::be
else
nbElementsConsidered = m_RIDsize;

const bool performECSW = d_performECSW.getValue();
for( unsigned int numElem = 0 ; numElem<nbElementsConsidered ;++numElem)
{
if (!d_performECSW.getValue()){
if (!performECSW)
{
triangleId = numElem;
}
else
Expand Down

0 comments on commit ea78ec7

Please sign in to comment.