Skip to content

Commit

Permalink
Merge pull request #345 from polyfem/FCR
Browse files Browse the repository at this point in the history
Fixed Corotational Model
  • Loading branch information
Huangzizhou committed Jun 6, 2024
2 parents b4ce196 + bda9ec1 commit 5c6646e
Show file tree
Hide file tree
Showing 12 changed files with 2,358 additions and 6 deletions.
37 changes: 36 additions & 1 deletion json-specs/input-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -1896,6 +1896,40 @@
],
"doc": "Material Parameters including ID"
},
{
"pointer": "/materials/*",
"type": "object",
"type_name": "FixedCorotational",
"required": [
"type",
"E",
"nu"
],
"optional": [
"id",
"rho",
"phi",
"psi"
],
"doc": "Material Parameters including ID"
},
{
"pointer": "/materials/*",
"type": "object",
"type_name": "FixedCorotational",
"required": [
"type",
"lambda",
"mu"
],
"optional": [
"id",
"rho",
"phi",
"psi"
],
"doc": "Material Parameters including ID"
},
{
"pointer": "/materials/*/type",
"type": "string",
Expand All @@ -1916,7 +1950,8 @@
"Laplacian",
"Helmholtz",
"Bilaplacian",
"AMIPS"
"AMIPS",
"FixedCorotational"
],
"doc": "Type of material"
},
Expand Down
3 changes: 3 additions & 0 deletions src/polyfem/assembler/AssemblerUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <polyfem/assembler/SaintVenantElasticity.hpp>
#include <polyfem/assembler/Stokes.hpp>
#include <polyfem/assembler/ViscousDamping.hpp>
#include <polyfem/assembler/FixedCorotational.hpp>

#include <polyfem/utils/JSONUtils.hpp>
#include <polyfem/utils/Logger.hpp>
Expand Down Expand Up @@ -93,6 +94,8 @@ namespace polyfem

else if (formulation == "AMIPS")
return std::make_shared<AMIPSEnergy>();
else if (formulation == "FixedCorotational")
return std::make_shared<FixedCorotational>();

log_and_throw_error("Inavalid assembler name {}", formulation);
}
Expand Down
2 changes: 2 additions & 0 deletions src/polyfem/assembler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ set(SOURCES
PressureAssembler.hpp
PeriodicBoundary.cpp
PeriodicBoundary.hpp
FixedCorotational.hpp
FixedCorotational.cpp
)

source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Source Files" FILES ${SOURCES})
Expand Down
Loading

0 comments on commit 5c6646e

Please sign in to comment.