diff --git a/src/language/modules/SchemeModule.cpp b/src/language/modules/SchemeModule.cpp index b111e8510232be7ea87d8807a0cae93cd50d0c64..0f5de1a9bf388b250e4ce8963fa856e7860b7f22 100644 --- a/src/language/modules/SchemeModule.cpp +++ b/src/language/modules/SchemeModule.cpp @@ -370,6 +370,56 @@ SchemeModule::SchemeModule() )); + this->_addBuiltinFunction("hyperelastic_eucclhyd_solver", + std::function( + + [](const std::shared_ptr<const IDiscreteFunction>& rho, + const std::shared_ptr<const IDiscreteFunction>& u, + const std::shared_ptr<const IDiscreteFunction>& E, + const std::shared_ptr<const IDiscreteFunction>& CG, + const std::shared_ptr<const IDiscreteFunction>& aL, + const std::shared_ptr<const IDiscreteFunction>& aT, + const std::shared_ptr<const IDiscreteFunction>& sigma, + const std::vector<std::shared_ptr<const IBoundaryConditionDescriptor>>& + bc_descriptor_list, + const double& dt) + -> std::tuple<std::shared_ptr<const IMesh>, std::shared_ptr<const IDiscreteFunction>, + std::shared_ptr<const IDiscreteFunction>, + std::shared_ptr<const IDiscreteFunction>, + std::shared_ptr<const IDiscreteFunction>> { + return HyperelasticSolverHandler{getCommonMesh({rho, u, E, CG, aL, aT, sigma})} + .solver() + .apply(HyperelasticSolverHandler::SolverType::Eucclhyd, dt, rho, u, E, CG, aL, aT, + sigma, bc_descriptor_list); + } + + )); + + this->_addBuiltinFunction("hyperelastic_glace_solver", + std::function( + + [](const std::shared_ptr<const IDiscreteFunction>& rho, + const std::shared_ptr<const IDiscreteFunction>& u, + const std::shared_ptr<const IDiscreteFunction>& E, + const std::shared_ptr<const IDiscreteFunction>& CG, + const std::shared_ptr<const IDiscreteFunction>& aL, + const std::shared_ptr<const IDiscreteFunction>& aT, + const std::shared_ptr<const IDiscreteFunction>& sigma, + const std::vector<std::shared_ptr<const IBoundaryConditionDescriptor>>& + bc_descriptor_list, + const double& dt) + -> std::tuple<std::shared_ptr<const IMesh>, std::shared_ptr<const IDiscreteFunction>, + std::shared_ptr<const IDiscreteFunction>, + std::shared_ptr<const IDiscreteFunction>, + std::shared_ptr<const IDiscreteFunction>> { + return HyperelasticSolverHandler{getCommonMesh({rho, u, E, CG, aL, aT, sigma})} + .solver() + .apply(HyperelasticSolverHandler::SolverType::Glace, dt, rho, u, E, CG, aL, aT, sigma, + bc_descriptor_list); + } + + )); + this->_addBuiltinFunction("apply_acoustic_fluxes", std::function( diff --git a/src/scheme/HyperelasticSolver.cpp b/src/scheme/HyperelasticSolver.cpp index 962e133fc615c59fba0539bcf0820b2a744046d1..b54a221a15d69490df7c6676f6c47f2b4c4af405 100644 --- a/src/scheme/HyperelasticSolver.cpp +++ b/src/scheme/HyperelasticSolver.cpp @@ -78,6 +78,7 @@ class HyperelasticSolverHandler::HyperelasticSolver final : public HyperelasticS class FixedBoundaryCondition; class PressureBoundaryCondition; + class NormalStressBoundaryCondition; class SymmetryBoundaryCondition; class VelocityBoundaryCondition;