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

Use Solid Material Models from MFront #2259

Merged
merged 11 commits into from
Nov 12, 2018
Prev Previous commit
Next Next commit
[Mat] register the MFront material model
  • Loading branch information
chleh committed Nov 12, 2018
commit 0f0e20b1c2579b9e9d17ca6a2ae1ffcdf80c8d54
8 changes: 6 additions & 2 deletions MaterialLib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,21 @@ append_source_files(SOURCES PorousMedium/UnsaturatedProperty/CapillaryPressure)
append_source_files(SOURCES PorousMedium/UnsaturatedProperty/RelativePermeability)
append_source_files(SOURCES TwoPhaseModels)

add_subdirectory(SolidModels/MFront)

add_library(MaterialLib ${SOURCES})
if(BUILD_SHARED_LIBS)
install(TARGETS MaterialLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()

include(GenerateExportHeader)
generate_export_header(MaterialLib)
target_include_directories(MaterialLib PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(MaterialLib
PUBLIC ${CMAKE_CURRENT_BINARY_DIR}
)

target_link_libraries(MaterialLib
PUBLIC BaseLib NumLib logog # ProcessLib
PUBLIC MaterialLib_SolidModels_MFront # ProcessLib
PRIVATE MathLib MeshLib
)

Expand Down
6 changes: 6 additions & 0 deletions MaterialLib/SolidModels/CreateConstitutiveRelation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "CreateEhlers.h"
#include "CreateLinearElasticIsotropic.h"
#include "CreateLubby2.h"
#include "MFront/CreateMFront.h"

#include "MechanicsBase.h"

Expand Down Expand Up @@ -58,6 +59,11 @@ createConstitutiveRelation(
return MaterialLib::Solids::Creep::createCreepBGRa<DisplacementDim>(
parameters, config);
}
if (type == "MFront")
{
return MaterialLib::Solids::MFront::createMFront<DisplacementDim>(
parameters, config);
}
OGS_FATAL("Cannot construct constitutive relation of given type \'%s\'.",
type.c_str());
}
Expand Down