Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SofaBaseMechanics] Use doUpdateInternal API in DiagonalMass #1150

Merged
merged 5 commits into from
Sep 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions SofaKernel/modules/SofaBaseMechanics/DiagonalMass.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include <SofaBaseTopology/HexahedronSetGeometryAlgorithms.h>

#include <sofa/core/objectmodel/DataFileName.h>
#include <sofa/core/DataTracker.h>

namespace sofa
{
Expand Down Expand Up @@ -179,12 +178,12 @@ class DiagonalMass : public core::behavior::Mass<DataTypes>
/// the mass density used to compute the mass from a mesh topology and geometry
Data< Real > d_massDensity;

/// if true, the mass of every element is computed based on the rest position rather than the position
Data< bool > d_computeMassOnRest;

/// total mass of the object
Data< Real > d_totalMass;

/// if true, the mass of every element is computed based on the rest position rather than the position
Data< bool > d_computeMassOnRest;

/// to display the center of gravity of the system
Data< bool > d_showCenterOfGravity;

Expand All @@ -196,11 +195,6 @@ class DiagonalMass : public core::behavior::Mass<DataTypes>
/// value defining the initialization process of the mass (0 : totalMass, 1 : massDensity, 2 : vertexMass)
int m_initializationProcess;

/// Data tracker
sofa::core::DataTracker m_dataTrackerVertex;
sofa::core::DataTracker m_dataTrackerDensity;
sofa::core::DataTracker m_dataTrackerTotal;

protected:
////////////////////////// Inherited attributes ////////////////////////////
/// https://gcc.gnu.org/onlinedocs/gcc/Name-lookup.html
Expand Down Expand Up @@ -240,7 +234,7 @@ class DiagonalMass : public core::behavior::Mass<DataTypes>
void init() override;
void handleEvent(sofa::core::objectmodel::Event* ) override;

bool update();
void doUpdateInternal() override;

TopologyType getMassTopologyType() const
{
Expand Down
Loading