micromechanical (C++)
|
First, you need to install the micromechanical
Python package for the micromechanical command to be available. To do so, run the following command in the root directory of the micromechanical project:
Install cmake and one of the following C/C++ compilers:
Then, use the micromechanical plugin make
command to compile the plugins:
This will compile the elastic.cpp
and changhicher.cpp
plugins to dynamic libraries in the plugin
directory using cmake
as the build system. Type micromechanical plugin make --help
for more information about the command. After compiling the plugins, you can use the built plugins in your micromechanical simulations:
A plugin for a micromechanical model is a .cpp
file that contains a function named micromechanical_model
that returns a pointer to a MicromechanicalBase
object. The function must have the following signature:
A plugin for a contact law is a .cpp
file that contains a function named micromechanical_contact
that returns a pointer to a ContactLawBase
object. The function must have the following signature: