Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ template class SOFA_COMPONENT_MASS_API ElementFEMMass<sofa::defaulttype::Vec2Typ
template class SOFA_COMPONENT_MASS_API ElementFEMMass<sofa::defaulttype::Vec3Types, sofa::geometry::Quad>;
template class SOFA_COMPONENT_MASS_API ElementFEMMass<sofa::defaulttype::Vec3Types, sofa::geometry::Tetrahedron>;
template class SOFA_COMPONENT_MASS_API ElementFEMMass<sofa::defaulttype::Vec3Types, sofa::geometry::Hexahedron>;
template class SOFA_COMPONENT_MASS_API ElementFEMMass<sofa::defaulttype::Vec3Types, sofa::geometry::Prism>;

void registerFEMMass(sofa::core::ObjectFactory* factory)
{
Expand All @@ -59,6 +60,8 @@ void registerFEMMass(sofa::core::ObjectFactory* factory)
factory->registerObjects(sofa::core::ObjectRegistrationData("Finite-element mass (inertia and body force) defined on hexahedra")
.add< ElementFEMMass<sofa::defaulttype::Vec3Types, sofa::geometry::Hexahedron> >(true));

factory->registerObjects(sofa::core::ObjectRegistrationData("Finite-element mass (inertia and body force) defined on prisms")
.add< ElementFEMMass<sofa::defaulttype::Vec3Types, sofa::geometry::Prism> >(true));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ template class SOFA_COMPONENT_MASS_API ElementFEMMass<sofa::defaulttype::Vec2Typ
template class SOFA_COMPONENT_MASS_API ElementFEMMass<sofa::defaulttype::Vec3Types, sofa::geometry::Quad>;
template class SOFA_COMPONENT_MASS_API ElementFEMMass<sofa::defaulttype::Vec3Types, sofa::geometry::Tetrahedron>;
template class SOFA_COMPONENT_MASS_API ElementFEMMass<sofa::defaulttype::Vec3Types, sofa::geometry::Hexahedron>;
template class SOFA_COMPONENT_MASS_API ElementFEMMass<sofa::defaulttype::Vec3Types, sofa::geometry::Prism>;
#endif

} // namespace sofa::component::mass
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
<RequiredPlugin pluginName="Sofa.Component.Constraint.Projective"/> <!-- Needed to use components [FixedProjectiveConstraint] -->
<RequiredPlugin pluginName="Sofa.Component.Engine.Select"/> <!-- Needed to use components [BoxROI] -->
<RequiredPlugin pluginName="Sofa.Component.LinearSolver.Direct"/> <!-- Needed to use components [SparseLDLSolver] -->
<RequiredPlugin pluginName="Sofa.Component.Mass"/> <!-- Needed to use components [MeshMatrixMass] -->
<RequiredPlugin pluginName="Sofa.Component.SolidMechanics.FEM.Elastic"/>
<RequiredPlugin pluginName="Sofa.Component.Mass"/> <!-- Needed to use components [NodalMassDensity,PrismFEMMass] -->
<RequiredPlugin pluginName="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] -->
<RequiredPlugin pluginName="Sofa.Component.SolidMechanics.FEM.Elastic"/> <!-- Needed to use components [PrismCorotationalFEMForceField] -->
<RequiredPlugin pluginName="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
<RequiredPlugin pluginName="Sofa.Component.Topology.Container.Constant"/> <!-- Needed to use components [MeshTopology] -->
<RequiredPlugin pluginName="Sofa.Component.Topology.Container.Grid"/> <!-- Needed to use components [RegularGridTopology] -->
<RequiredPlugin pluginName="Sofa.Component.Topology.Mapping"/> <!-- Needed to use components [Hexa2PrismTopologicalMapping] -->
<RequiredPlugin pluginName="Sofa.Component.Visual"/> <!-- Needed to use components [VisualMesh] -->
<RequiredPlugin pluginName="Sofa.GL.Component.Rendering3D"/> <!-- Needed to use components [OglSceneFrame] -->
</Node>

<DefaultAnimationLoop/>
Expand All @@ -21,21 +23,22 @@
<LineAxis size="0.1"/>
<OglSceneFrame/>

<EulerImplicitSolver name="backward Euler" rayleighStiffness="0.1" rayleighMass="0.1" />
<SparseLDLSolver/>
<EulerImplicitSolver name="backward_Euler" rayleighStiffness="0.01" rayleighMass="0.01" />
<SparseLDLSolver template="CompressedRowSparseMatrixMat3x3d"/>

<RegularGridTopology name="grid" min="-0.01 -0.01 0" max="0.01 0.01 0.2" n="5 5 30"/>
<MechanicalObject template="Vec3" name="state" showObject="true"/>

<MeshMatrixMass massDensity="1100"/>

<Node name="prisms">
<MeshTopology name="prism_topology"/>
<Hexa2PrismTopologicalMapping input="@grid" output="@prism_topology" />

<PrismCorotationalFEMForceField name="FEM" youngModulus="2e6" poissonRatio="0.45" topology="@prism_topology"
rotationMethod="polar" computeForceStrategy="sequenced" computeForceDerivStrategy="sequenced"/>

<NodalMassDensity property="1100"/>
<PrismFEMMass/>

<VisualMesh position="@../state.position" topology="@prism_topology" enable="true"/>
</Node>

Expand Down
Loading