diff --git a/applications/plugins/SofaCUDA/Component/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaCorotationalFEMForceField.cpp b/applications/plugins/SofaCUDA/Component/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaCorotationalFEMForceField.cpp index ca58990357d..ce190709333 100644 --- a/applications/plugins/SofaCUDA/Component/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaCorotationalFEMForceField.cpp +++ b/applications/plugins/SofaCUDA/Component/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaCorotationalFEMForceField.cpp @@ -35,6 +35,8 @@ template class SOFACUDA_COMPONENT_API CudaCorotationalFEMForceField; template class SOFACUDA_COMPONENT_API CudaCorotationalFEMForceField; template class SOFACUDA_COMPONENT_API CudaCorotationalFEMForceField; +template class SOFACUDA_COMPONENT_API CudaCorotationalFEMForceField; +template class SOFACUDA_COMPONENT_API CudaCorotationalFEMForceField; #ifdef SOFA_GPU_CUDA_DOUBLE template class SOFACUDA_COMPONENT_API CudaCorotationalFEMForceField; @@ -42,6 +44,8 @@ template class SOFACUDA_COMPONENT_API CudaCorotationalFEMForceField; template class SOFACUDA_COMPONENT_API CudaCorotationalFEMForceField; template class SOFACUDA_COMPONENT_API CudaCorotationalFEMForceField; +template class SOFACUDA_COMPONENT_API CudaCorotationalFEMForceField; +template class SOFACUDA_COMPONENT_API CudaCorotationalFEMForceField; #endif } // namespace sofa::component::solidmechanics::fem::elastic @@ -54,48 +58,24 @@ void registerCorotationalFEMForceField(sofa::core::ObjectFactory* factory) using namespace sofa::component::solidmechanics::fem::elastic; factory->registerObjects(sofa::core::ObjectRegistrationData( - "Supports GPU-side computations using CUDA for EdgeCorotationalFEMForceField") + "Supports GPU-side computations using CUDA for CorotationalFEMForceField") .add< CudaCorotationalFEMForceField >() - ); - factory->registerObjects(sofa::core::ObjectRegistrationData( - "Supports GPU-side computations using CUDA for TriangleCorotationalFEMForceField") .add< CudaCorotationalFEMForceField >() - ); - factory->registerObjects(sofa::core::ObjectRegistrationData( - "Supports GPU-side computations using CUDA for QuadCorotationalFEMForceField") .add< CudaCorotationalFEMForceField >() - ); - factory->registerObjects(sofa::core::ObjectRegistrationData( - "Supports GPU-side computations using CUDA for TetrahedronCorotationalFEMForceField") .add< CudaCorotationalFEMForceField >() - ); - factory->registerObjects(sofa::core::ObjectRegistrationData( - "Supports GPU-side computations using CUDA for HexahedronCorotationalFEMForceField") .add< CudaCorotationalFEMForceField >() - ); - + .add< CudaCorotationalFEMForceField >() + .add< CudaCorotationalFEMForceField >() #ifdef SOFA_GPU_CUDA_DOUBLE - factory->registerObjects(sofa::core::ObjectRegistrationData( - "Supports GPU-side computations using CUDA (double) for EdgeCorotationalFEMForceField") .add< CudaCorotationalFEMForceField >() - ); - factory->registerObjects(sofa::core::ObjectRegistrationData( - "Supports GPU-side computations using CUDA (double) for TriangleCorotationalFEMForceField") .add< CudaCorotationalFEMForceField >() - ); - factory->registerObjects(sofa::core::ObjectRegistrationData( - "Supports GPU-side computations using CUDA (double) for QuadCorotationalFEMForceField") .add< CudaCorotationalFEMForceField >() - ); - factory->registerObjects(sofa::core::ObjectRegistrationData( - "Supports GPU-side computations using CUDA (double) for TetrahedronCorotationalFEMForceField") .add< CudaCorotationalFEMForceField >() - ); - factory->registerObjects(sofa::core::ObjectRegistrationData( - "Supports GPU-side computations using CUDA (double) for HexahedronCorotationalFEMForceField") .add< CudaCorotationalFEMForceField >() - ); + .add< CudaCorotationalFEMForceField >() + .add< CudaCorotationalFEMForceField >() #endif + ); } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/Component/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaCorotationalFEMForceField.cu b/applications/plugins/SofaCUDA/Component/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaCorotationalFEMForceField.cu index a34a75c7646..3b0a486ecc1 100644 --- a/applications/plugins/SofaCUDA/Component/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaCorotationalFEMForceField.cu +++ b/applications/plugins/SofaCUDA/Component/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaCorotationalFEMForceField.cu @@ -315,17 +315,25 @@ void CorotationalFEMForceFieldCuda_addDForce( INSTANTIATE_COROTATIONAL(float, 2) INSTANTIATE_COROTATIONAL(float, 3) INSTANTIATE_COROTATIONAL(float, 4) +INSTANTIATE_COROTATIONAL(float, 5) // Pyramid +INSTANTIATE_COROTATIONAL(float, 6) // Prism INSTANTIATE_COROTATIONAL(float, 8) INSTANTIATE_COROTATIONAL_WITH_ROTATIONS(float, 3) INSTANTIATE_COROTATIONAL_WITH_ROTATIONS(float, 4) +INSTANTIATE_COROTATIONAL_WITH_ROTATIONS(float, 5) // Pyramid +INSTANTIATE_COROTATIONAL_WITH_ROTATIONS(float, 6) // Prism INSTANTIATE_COROTATIONAL_WITH_ROTATIONS(float, 8) INSTANTIATE_COROTATIONAL(double, 2) INSTANTIATE_COROTATIONAL(double, 3) INSTANTIATE_COROTATIONAL(double, 4) +INSTANTIATE_COROTATIONAL(double, 5) // Pyramid +INSTANTIATE_COROTATIONAL(double, 6) // Prism INSTANTIATE_COROTATIONAL(double, 8) INSTANTIATE_COROTATIONAL_WITH_ROTATIONS(double, 3) INSTANTIATE_COROTATIONAL_WITH_ROTATIONS(double, 4) +INSTANTIATE_COROTATIONAL_WITH_ROTATIONS(double, 5) // Pyramid +INSTANTIATE_COROTATIONAL_WITH_ROTATIONS(double, 6) // Prism INSTANTIATE_COROTATIONAL_WITH_ROTATIONS(double, 8) #undef INSTANTIATE_COROTATIONAL diff --git a/applications/plugins/SofaCUDA/Component/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaLinearSmallStrainFEMForceField.cpp b/applications/plugins/SofaCUDA/Component/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaLinearSmallStrainFEMForceField.cpp index 0c624c5b03e..83c0c67d5e5 100644 --- a/applications/plugins/SofaCUDA/Component/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaLinearSmallStrainFEMForceField.cpp +++ b/applications/plugins/SofaCUDA/Component/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaLinearSmallStrainFEMForceField.cpp @@ -35,6 +35,8 @@ template class SOFACUDA_COMPONENT_API CudaLinearSmallStrainFEMForceField; template class SOFACUDA_COMPONENT_API CudaLinearSmallStrainFEMForceField; template class SOFACUDA_COMPONENT_API CudaLinearSmallStrainFEMForceField; +template class SOFACUDA_COMPONENT_API CudaLinearSmallStrainFEMForceField; +template class SOFACUDA_COMPONENT_API CudaLinearSmallStrainFEMForceField; #ifdef SOFA_GPU_CUDA_DOUBLE template class SOFACUDA_COMPONENT_API CudaLinearSmallStrainFEMForceField; @@ -42,6 +44,8 @@ template class SOFACUDA_COMPONENT_API CudaLinearSmallStrainFEMForceField; template class SOFACUDA_COMPONENT_API CudaLinearSmallStrainFEMForceField; template class SOFACUDA_COMPONENT_API CudaLinearSmallStrainFEMForceField; +template class SOFACUDA_COMPONENT_API CudaLinearSmallStrainFEMForceField; +template class SOFACUDA_COMPONENT_API CudaLinearSmallStrainFEMForceField; #endif } // namespace sofa::component::solidmechanics::fem::elastic @@ -54,48 +58,24 @@ void registerLinearSmallStrainFEMForceField(sofa::core::ObjectFactory* factory) using namespace sofa::component::solidmechanics::fem::elastic; factory->registerObjects(sofa::core::ObjectRegistrationData( - "Supports GPU-side computations using CUDA for EdgeLinearSmallStrainFEMForceField") + "Supports GPU-side computations using CUDA for LinearSmallStrainFEMForceField") .add< CudaLinearSmallStrainFEMForceField >() - ); - factory->registerObjects(sofa::core::ObjectRegistrationData( - "Supports GPU-side computations using CUDA for TriangleLinearSmallStrainFEMForceField") .add< CudaLinearSmallStrainFEMForceField >() - ); - factory->registerObjects(sofa::core::ObjectRegistrationData( - "Supports GPU-side computations using CUDA for QuadLinearSmallStrainFEMForceField") .add< CudaLinearSmallStrainFEMForceField >() - ); - factory->registerObjects(sofa::core::ObjectRegistrationData( - "Supports GPU-side computations using CUDA for TetrahedronLinearSmallStrainFEMForceField") .add< CudaLinearSmallStrainFEMForceField >() - ); - factory->registerObjects(sofa::core::ObjectRegistrationData( - "Supports GPU-side computations using CUDA for HexahedronLinearSmallStrainFEMForceField") .add< CudaLinearSmallStrainFEMForceField >() - ); - + .add< CudaLinearSmallStrainFEMForceField >() + .add< CudaLinearSmallStrainFEMForceField >() #ifdef SOFA_GPU_CUDA_DOUBLE - factory->registerObjects(sofa::core::ObjectRegistrationData( - "Supports GPU-side computations using CUDA (double) for EdgeLinearSmallStrainFEMForceField") .add< CudaLinearSmallStrainFEMForceField >() - ); - factory->registerObjects(sofa::core::ObjectRegistrationData( - "Supports GPU-side computations using CUDA (double) for TriangleLinearSmallStrainFEMForceField") .add< CudaLinearSmallStrainFEMForceField >() - ); - factory->registerObjects(sofa::core::ObjectRegistrationData( - "Supports GPU-side computations using CUDA (double) for QuadLinearSmallStrainFEMForceField") .add< CudaLinearSmallStrainFEMForceField >() - ); - factory->registerObjects(sofa::core::ObjectRegistrationData( - "Supports GPU-side computations using CUDA (double) for TetrahedronLinearSmallStrainFEMForceField") .add< CudaLinearSmallStrainFEMForceField >() - ); - factory->registerObjects(sofa::core::ObjectRegistrationData( - "Supports GPU-side computations using CUDA (double) for HexahedronLinearSmallStrainFEMForceField") .add< CudaLinearSmallStrainFEMForceField >() - ); + .add< CudaLinearSmallStrainFEMForceField >() + .add< CudaLinearSmallStrainFEMForceField >() #endif + ); } } // namespace sofa::gpu::cuda diff --git a/applications/plugins/SofaCUDA/Component/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaLinearSmallStrainFEMForceField.cu b/applications/plugins/SofaCUDA/Component/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaLinearSmallStrainFEMForceField.cu index e625c701d49..c4d645838e5 100644 --- a/applications/plugins/SofaCUDA/Component/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaLinearSmallStrainFEMForceField.cu +++ b/applications/plugins/SofaCUDA/Component/src/SofaCUDA/component/solidmechanics/fem/elastic/CudaLinearSmallStrainFEMForceField.cu @@ -177,11 +177,15 @@ void LinearSmallStrainFEMForceFieldCuda_addDForce( INSTANTIATE_LINEAR(float, 2) INSTANTIATE_LINEAR(float, 3) INSTANTIATE_LINEAR(float, 4) +INSTANTIATE_LINEAR(float, 5) // Pyramid +INSTANTIATE_LINEAR(float, 6) // Prism INSTANTIATE_LINEAR(float, 8) INSTANTIATE_LINEAR(double, 2) INSTANTIATE_LINEAR(double, 3) INSTANTIATE_LINEAR(double, 4) +INSTANTIATE_LINEAR(double, 5) // Pyramid +INSTANTIATE_LINEAR(double, 6) // Prism INSTANTIATE_LINEAR(double, 8) #undef INSTANTIATE_LINEAR diff --git a/applications/plugins/SofaCUDA/examples/ElementFEMForcefield/CudaCorotationalFEMForceField_prism.scn b/applications/plugins/SofaCUDA/examples/ElementFEMForcefield/CudaCorotationalFEMForceField_prism.scn new file mode 100644 index 00000000000..0d6c13dad2e --- /dev/null +++ b/applications/plugins/SofaCUDA/examples/ElementFEMForcefield/CudaCorotationalFEMForceField_prism.scn @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/applications/plugins/SofaCUDA/examples/ElementFEMForcefield/CudaCorotationalFEMForceField_pyramid.scn b/applications/plugins/SofaCUDA/examples/ElementFEMForcefield/CudaCorotationalFEMForceField_pyramid.scn new file mode 100644 index 00000000000..7733aa92c89 --- /dev/null +++ b/applications/plugins/SofaCUDA/examples/ElementFEMForcefield/CudaCorotationalFEMForceField_pyramid.scn @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/applications/plugins/SofaCUDA/examples/ElementFEMForcefield/CudaLinearSmallStrainFEMForceField_prism.scn b/applications/plugins/SofaCUDA/examples/ElementFEMForcefield/CudaLinearSmallStrainFEMForceField_prism.scn new file mode 100644 index 00000000000..e7e30a3f603 --- /dev/null +++ b/applications/plugins/SofaCUDA/examples/ElementFEMForcefield/CudaLinearSmallStrainFEMForceField_prism.scn @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/applications/plugins/SofaCUDA/examples/ElementFEMForcefield/CudaLinearSmallStrainFEMForceField_pyramid.scn b/applications/plugins/SofaCUDA/examples/ElementFEMForcefield/CudaLinearSmallStrainFEMForceField_pyramid.scn new file mode 100644 index 00000000000..85b53b7e588 --- /dev/null +++ b/applications/plugins/SofaCUDA/examples/ElementFEMForcefield/CudaLinearSmallStrainFEMForceField_pyramid.scn @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +