OGS
CreateMFront.cpp
Go to the documentation of this file.
1
10#include "CreateMFront.h"
11
12#ifndef _WIN32
13#include <dlfcn.h>
14#endif
15
16#include "CreateMFrontGeneric.h"
17#include "MFront.h"
18
19namespace MaterialLib
20{
21namespace Solids
22{
23namespace MFront
24{
25template <int DisplacementDim>
26std::unique_ptr<MechanicsBase<DisplacementDim>> createMFront(
27 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
28 std::optional<ParameterLib::CoordinateSystem> const&
29 local_coordinate_system,
30 BaseLib::ConfigTree const& config)
31{
32 auto conf = createMFrontConfig(DisplacementDim, parameters, config);
33
34 return std::make_unique<MFront<DisplacementDim>>(
35 std::move(conf.behaviour), std::move(conf.material_properties),
36 std::move(conf.state_variables_initial_properties),
37 local_coordinate_system);
38}
39} // namespace MFront
40} // namespace Solids
41} // namespace MaterialLib
42
43namespace MaterialLib
44{
45namespace Solids
46{
47namespace MFront
48{
49template std::unique_ptr<MechanicsBase<2>> createMFront<2>(
50 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
51 std::optional<ParameterLib::CoordinateSystem> const&
52 local_coordinate_system,
53 BaseLib::ConfigTree const& config);
54template std::unique_ptr<MechanicsBase<3>> createMFront<3>(
55 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
56 std::optional<ParameterLib::CoordinateSystem> const&
57 local_coordinate_system,
58 BaseLib::ConfigTree const& config);
59} // namespace MFront
60} // namespace Solids
61} // namespace MaterialLib
MFrontConfig createMFrontConfig(int const displacement_dim, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, BaseLib::ConfigTree const &config)
template std::unique_ptr< MechanicsBase< 2 > > createMFront< 2 >(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, BaseLib::ConfigTree const &config)
std::unique_ptr< MechanicsBase< DisplacementDim > > createMFront(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, BaseLib::ConfigTree const &config)
template std::unique_ptr< MechanicsBase< 3 > > createMFront< 3 >(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, BaseLib::ConfigTree const &config)