A C++ library for the discrete mechanics of crystal defects.
MoDELib evolves defects that are represented individually inside a crystal, and computes their interactions from continuum elasticity. One object, the DefectiveCrystal, holds every physics that a simulation enables:
- dislocation dynamics: a network of discrete dislocation loops that glide, climb, react and nucleate;
- cluster dynamics: mobile point-defect species that diffuse and react on the finite-element mesh, and immobile loop populations that grow by absorbing them;
- elastic deformation: a uniform deformation applied by a load controller, or a finite-element solution on the mesh;
- inclusions: Eshelby inclusions, spherical or polyhedral.
The library separates three things that a simulation needs:
- the crystal: its structure, slip systems, mobility laws and domain mesh;
- the microstructure: which defects are present, and where;
- the algorithm: how forces become velocities, and how the configuration is updated.
The governing rule follows from that separation:
Each physics is a microstructure with the same duties: solve, propose a time step, update its configuration, and report its fields. The crystal adds the fields and takes the smallest time step.
Languages: C++20 for the library and its tools. Python for input generation, post-processing and the optional pyMoDELib bindings (pybind11).
Version: 2.0.0. Input files written for 1.0.0 must be converted: see section 9.
License: GNU GPL v2, as stated in the header of every source file. The repository has no separate LICENSE file.
Primary reference: G. Po, M. S. Mohamed, T. Crosby, C. Erel, A. El-Azab, N. Ghoniem, Recent progress in discrete dislocation dynamics and its applications to micro plasticity, JOM 66 (2014) 2108–2120.
- What is new in 2.0.0
- Capabilities
- Methodology
- Repository structure
- Installation
- Quick start
- Tutorials
- Outputs
- Migrating input files from 1.0.0
- Tests and validation
- Status and known issues
- Documentation
- How to cite
- Repository conventions
- License and contact
Version 2.0.0 adds a spatially resolved model of irradiation-induced loop populations, replaces the mobility laws by composable ones, and reorganizes the input files. The sections named in each item give the details.
In 1.0.0 cluster dynamics solved for the mobile point-defect species only. In 2.0.0 the mobile species feed immobile loop populations that are fields on the same finite-element mesh (section 3.6).
-
Eight immobile fields. For each of four loop families,
c,a1,a2anda3, the code carries a number density$N_j$ and a defect content$c_j$ (the point defects stored in that family, per lattice site). The mean cluster size is$n_j = c_j/(N_j,\Omega)$ . -
Sink strengths that follow the cluster shape. A cluster is treated as a bi-pyramid below
nmindefects and as a dislocation loop abovenmax, with a sigmoidal transition between the two. The sink strength, the capture bias and the eigenstrain all follow that transition. -
Anisotropic capture. The bias of a loop family combines a drift factor (
immobileBias) and the diffusion-anisotropy factor of the mobile species (the ratio of its diffusion coefficients along and normal to thecaxis). -
Network dislocations as sinks.
dislocationSinks_SIgives a dislocation density per family, in addition to the loops. - Growth strain. Cluster dynamics now contributes to the average plastic distortion of the crystal: the eigenstrain of the loop populations, and the relaxation volume of the dissolved defects. In 1.0.0 that contribution was zero.
-
Dissociation of mobile clusters, with a binding energy per species (
mobileSpeciesBindingEnergy_eV). -
New files:
FirstOrderReaction.h,ImmobileSinkRate.h,SpatialODESolver.h, the material fileZr4_Fitted.txt, and the tutorialspatialCDtest. -
Species counts are build options. The numbers of mobile and immobile species are compile-time constants. They are now set by the CMake options
MODELIB_CD_MSIZEandMODELIB_CD_ISIZE(defaults 4 and 8) instead of being edited inClusterDynamicsParameters.h(section 5).
The four switches useDislocations, useClusterDynamics, useInclusions and useElasticDeformation of DD.txt are replaced by one line in a new input file, DefectiveCrystal.txt:
physics=DislocationDynamics ClusterDynamics ElasticDeformation;
The run controls that are not specific to dislocations (Nsteps, dtMax, outputFrequency, outputBinary, useFEM, the restart step and the periodic image settings) moved to the same file. A physics can also be re-solved several times within a step (maxResolveSteps), which the coupled climb and diffusion problem uses. See section 3.1.
The per-crystal mobility classes (FCC, BCC, HEX basal, HEX prismatic, HEX pyramidal) are removed. A mobility law is now declared per slip system in the material file and assembled from building blocks (section 3.3):
viscousDragandkinkPair, the two elementary laws;edgeScrew, which blends an edge law and a screw law;interpolated, which interpolates any number of laws over the character angle (linear, logarithmic or Lagrange);python, a law written in a Python module.
Slip systems are named by their crystallography, for example a/2<111>{110} instead of full<111>{110}.
- Cubic fluorite crystal with the slip systems
a/2<110>{111},a/2<110>{110}anda/2<110>{100}, and aUO2.txtmaterial file. - New material files:
FeCrAl_Fe.txt,UO2.txt,Zr4_Fitted.txt,Zr_BMD19.txt,Zr_CD3_BMD19.txt. - Stacking-fault noise from MD (
MDStackingFaultNoise): a correlated stacking-fault energy field on the glide plane, which acts on partial dislocations. Correlation data for Al–Mg (5, 10 and 15 at.%) and Fe–Cr are inLibrary/GlidePlaneNoise/. - Gamma surfaces of HEX prismatic planes, given as wave vectors and energy points in the material file.
- Dislocation nucleation in the bulk (
bulkNucleationModel), as a first model (section 11). - Nodal velocity constraints (
nodalVelocityConstraints): directions removed from the velocity of every node. - Dislocation density per slip system in the output (
outputDislocationDensityPerSlipSystem). - Microstructure generation moved from
DislocationMicrostructure/toMicrostructureGeneration/. Loop densities and radii are given in SI units (targetDensity_SI,radiusDistributionMean_SI); Frank loops can be restricted to grains and planes. - One-dimensional interpolants (
LinearInterpolant,LagrangeInterpolant) with periodic extrapolation. - New meshes:
unitCube_15K,unitCube_70K,disk2d, and periodic polycrystal cubes of 10 and 50 grains. pyMoDELib: bindings for the mobility laws, the noise generators, gamma surfaces, slip systems, lattices, the stress of a straight segment and the interpolants.DDqt: a slip-system tab with a colour per slip system, segments and slipped areas coloured by slip system, stacking faults coloured by misfit energy, animated playback, and face labels and periodic faces on the mesh.- Tutorials:
annealing,dipoles,spatialCDtestanduniformLoadControllerare new;dipoleNoiseis rewritten;crossSlipandpolycrystalare removed. - Scripts:
lib/holds readers of the output files;testsPy/holds verification scripts. - Build: portable
CMakeLists.txtwith options for the optional parts (section 5).
| Capability | Where | Notes |
|---|---|---|
| Dislocation network topology | include/LoopNetwork/, include/DislocationDynamics/ |
loops, loop nodes and loop links; network nodes and segments shared between loops |
| Elastic fields of dislocations | DislocationDynamics/StraightDislocationSegment.h, StressStraight.h |
piecewise-straight segments; _MODEL_NON_SINGULAR_DD_ selects classical (0), Cai (1, default) or Lazar (2) fields; coreSize in DD.txt |
| Glide solver | GalerkinGlideSolver.h |
nodal velocities by Galerkin projection of the line velocity; periodic constraints by a null-space projection |
| Glide solver in Python | PyGlideSolver.h, python/MLglideSolver.py |
glideSolverType=pybind11; the module path is pyModuleName in DD.txt |
| Climb solver | GalerkinClimbSolver.h |
climbSolverType=Galerkin; needs ClusterDynamics in physics, since climb is driven by the point-defect concentrations |
| Mobility laws | include/DislocationMobilities/ |
per slip system: viscousDrag, kinkPair, edgeScrew, interpolated, python |
| Crystal structures and slip systems | include/PolycrystallineMaterials/ |
FCC, BCC, HEX and cubic fluorite; names in section 3.3 |
| Gamma surfaces and second phases | GammaSurface.h, SecondPhase.h |
FCC {111} and HEX basal from three energies; HEX prismatic from points; second phases L12 (FCC), sigma and chi (BCC) |
| Polycrystals | Grain.h, GrainBoundary.h, Polycrystal.h |
grains are mesh regions, each with its rotation C2G<n> |
| Cross slip | CrossSlipModels.h |
crossSlipModel: 0 none, 1 deterministic (largest glide Peach–Koehler force) |
| Junctions and remeshing | DislocationJunctionFormation.h, DislocationNetworkRemesh.h, DislocationNodeContraction.h |
segment lengths kept between Lmin and Lmax |
| Nucleation | DislocationNucleation.h |
bulkNucleationModel=1 inserts shear loops in mesh elements; a first model |
| Periodic domains | GlidePlanes/PeriodicGlidePlane.h |
periodic faces chosen per mesh face (periodicFaceIDs); image sums set by periodicImageSize; EwaldLengthFactor |
| Finite domains | include/FEM/, ElasticDeformationFEM.h |
useFEM=1; direct solvers (CHOLMOD, UMFPACK) or iterative solvers |
| Uniform load control | DefectiveCrystal/UniformController.h |
stress control, strain control, or mixed, per Voigt component (section 3.5) |
| Glide-plane noise | GlidePlanes/AnalyticalSolidSolutionNoise.h, MDSolidSolutionNoise.h, MDStackingFaultNoise.h |
stress noise of a solid solution and stacking-fault energy noise, sampled on a grid (FFTW) from analytical or MD correlations |
| Stochastic force | DD.txt |
useStochasticForce, stochasticForceSeed |
| Inclusions | SphericalInclusion.h, PolyhedronInclusion.h |
eigendistortion, velocity reduction factor and second phase per inclusion |
| Cluster dynamics | include/ClusterDynamics/ |
mobile species: anisotropic diffusion, production from a dose rate, dissociation, second-order reactions, sinks. Immobile species: four loop families with number density and defect content. Growth strain (section 3.6) |
| Microstructure generation | include/MicrostructureGeneration/ |
shear, prismatic and Frank loops; stacking-fault tetrahedra; periodic dipoles; a planar loop from its nodes; spherical and polyhedral inclusions. By target density or individually |
| Time stepping | DDtimeStepper.h |
fixed or adaptive; velocity filter; subcycling when subcyclingBins has more than one value |
| Lattice arithmetic | include/Lattices/ |
lattice and reciprocal vectors, rational directions, LLL reduction, CSL and DSCL of bicrystals |
| Visualization | tools/DDqt/ |
Qt 6 and VTK viewer of configurations, slip systems, glide planes, inclusions, quadrature data, fields and the mesh |
DefectiveCrystal is a container of physics. The physics line of DefectiveCrystal.txt lists the ones that exist in a run:
Name in physics |
Physics added |
|---|---|
DislocationDynamics |
dislocation network |
ClusterDynamics |
mobile and immobile point-defect species |
ElasticDeformation |
uniform elastic deformation with load control, or the finite-element elastic solution |
InclusionMicrostructure |
inclusions |
The names are separated by spaces and are not case sensitive. They are created, solved and written in the order given. At least one is required: the value none of the template must be replaced. useFEM enables the finite-element mesh for the physics that can use it.
One step of DefectiveCrystal::runSingleStep does the following, in this order:
- Solve. Each physics solves for its own rates.
- Re-solve. The solve is repeated
maxResolveStepstimes, so that coupled physics (climb and diffusion) can exchange their fields within the step. - Time step. Each physics proposes a time step; the smallest one is used, capped by
dtMax. - Output. Every
outputFrequencysteps, the configuration and the averaged quantities are written. - Update. Each physics advances its configuration by the time step.
For the dislocation network, cross slip is carried out at the end of the solve, before the nodes move. The update then moves the nodes and executes the discrete events: remeshing, junction formation, remeshing again, and nucleation.
Each segment carries quadrature points. At a point with unit tangent
where alphaLineTension:
The mobility law of the slip system turns the force and the local stress into a glide velocity
With adaptive time stepping,
Slip systems. enabledSlipSystems in the material file lists the slip systems, by these names:
crystalStructure |
Slip-system names |
|---|---|
FCC |
a/2<110>{111} (full), a/6<112>{111} (Shockley partials), a/3<112>{111} (Kear) |
BCC |
a/2<111>{110}, a<100>{110} |
HEX |
<a>{basal}, <Shockley>{basal}, <a>{prismatic}, <a>{pyramidal} |
CubicFluorite |
a/2<110>{111}, a/2<110>{110}, a/2<110>{100} |
A name that is not in this table creates no slip system, without an error.
One law per slip system. Each enabled slip system needs a line mobility_<slip system>=<type> <arguments>;. The type is one of:
| Type | Arguments | Velocity |
|---|---|---|
edgeScrew |
two labels: edge, screw |
|
interpolated |
linear, logarithmic or lagrange, then labels ending in _<angle in degrees>
|
interpolation over the character angle, periodic with period logarithmic interpolates |
python |
path of a Python module | the module's class MobilitySolver returns the velocity from velocityPy(stress, b, xi, n, T, dL, dt); needs the pybind11 build |
Each label names a further line, mobility_<label>=..., with an elementary law:
| Elementary law | Arguments, in this order | Meaning |
|---|---|---|
viscousDrag |
B0_SI B1_SI |
|
kinkPair |
h w B0_SI B1_SI Bk_SI dH0_eV p q Tf tauC_SI a0 a1 a2 a3 angle |
the kink-pair law of Po et al. (2016): kink height h and width w in units of Bk; kink-pair enthalpy dH0 with exponents p, q; athermal temperature Tf as a fraction of tauC; non-Schmid coefficients a0–a3; the angle, in degrees, between the glide plane and the conjugate plane of the non-Schmid terms |
The law of tungsten shows the pattern:
enabledSlipSystems=a/2<111>{110};
mobility_a/2<111>{110}=edgeScrew a/2<111>{110}e a/2<111>{110}s;
mobility_a/2<111>{110}e= viscousDrag 4.26e-04 0.87e-06;
mobility_a/2<111>{110}s= kinkPair 0.94280904158 25 9.8e-4 0.0 8.3e-05 1.63 0.86 1.69 0.8 2.03e9 1.50 1.15 2.32 4.29 60.0;
UO2.txt shows the interpolated type, with four laws at 0°, 30°, 90° and 150°.
The stress of the network is the sum over straight segments, in the non-singular form selected at compile time (section 2) with core width coreSize. In a finite domain, the infinite-medium fields are corrected by a finite-element solution on the mesh (the superposition principle). In a periodic domain, the fields of periodicImageSize images are summed along each periodic shift vector.
The derivations are in manual_beta/MoDELib_manual.pdf: eigendistortion theory, discrete loops in anisotropic and isotropic media, the solid angle as a line integral, and the fields of straight segments.
ElasticDeformation.txt gives an applied stress
stiffnessRatio component |
Result |
|---|---|
| stress control: |
|
1e20) |
strain control: |
The plastic strain is the sum over all physics, so the growth strain of cluster dynamics enters the load control as dislocation slip does. With useElasticDeformationFEM=1 the uniform controller is replaced by the finite-element elastic solution.
Cluster dynamics is solved on the finite-element mesh (quadratic tetrahedra) when useFEM=1 and useClusterDynamicsFEM=1, in a domain that is not periodic.
Fields.
-
Mobile species,
$k = 1 \dots$ MODELIB_CD_MSIZE.mobileSpeciesVectorgives the signed point-defect content$n_k$ of each cluster:$-1$ for a vacancy,$+1$ ,$+2$ ,$+3$ for interstitial clusters. The stored field is$c_k = |n_k|,C_k$ , with$C_k$ the cluster concentration per lattice site. -
Immobile species,
$j \in {c, a_1, a_2, a_3}$ : the number density$N_j$ and the defect content$c_j$ of each loop family, with the Burgers vectorimmobileSpeciesBurgersand the sign$s_j$ ofimmobileSpeciesVector($-1$ vacancy type,$+1$ interstitial type).
Mobile species. Each step solves the quasi-steady balance
with:
- diffusion $\mathbf{D}k = \mathbf{D}{0k}\exp(-\mathbf{E}^m_k/k_BT)$, component by component in the crystal frame, so that diffusion can be anisotropic;
-
production
$G_k$ = dose rate ×mobileSpeciesSurvivingEfficiency×mobileSpeciesCascadeFractions$_k$ ; -
dissociation of a cluster into a smaller cluster and a single defect, with the binding energy
mobileSpeciesBindingEnergy_eV, and the fixed sinksotherSinks_SI; -
second-order reactions between the pairs listed in
reactionPrefactorMap, with rate constant$p,4\pi(r_a+r_b)(\bar D_a+\bar D_b)/\Omega$ ; -
sinks $K_k = \sum_j \left(Z^{tot}_{jk},\rho^{l}j + Z^{loop}{jk},\rho^{d}_j\right)\bar D_k$, where
$\rho^{l}_j$ is the sink density of the clusters of family$j$ ,$\rho^{d}_j$ the dislocation densitydislocationSinks_SI, and$\bar D_k = (\det \mathbf{D}_k)^{1/3}$ .
The reactions make the problem nonlinear; it is solved by Newton iterations to a relative change of
Cluster shape. A cluster of
and the sink density is
with immobileBias and the diffusion-anisotropy factor: $p_k$ for the c family and $(p_k + p_k^{-2})/2$ for the a families, with $p_k = (D{k,33}/D_{k,11})^{1/6}$.
Immobile species. The number densities do not change (there is no nucleation of new clusters). The defect content grows by the net flux of point defects to the family:
The rate is projected on the finite-element space and integrated by a forward Euler step. The content is kept above n_min defects per cluster.
Growth strain. The average plastic distortion of cluster dynamics is the volume average of
plus a volumetric part from the relaxation volumes of the loops and of the dissolved mobile defects. Vacancy loops on the basal plane and interstitial loops on the prismatic planes therefore produce the anisotropic shape change known as irradiation growth.
Coupling with dislocation dynamics. Climb needs cluster dynamics: the climb velocity of a segment follows from the difference between the concentration in equilibrium with its climb force and the concentration that cluster dynamics gives at that point. When the network holds discrete loops, the loop sink term is left out of the mobile equation and the immobile fields are frozen.
Time step. Cluster dynamics proposes dtMax. A run of cluster dynamics alone uses dtMax as its step.
Input files give material constants in SI units, in variables whose names end in _SI. Internally, and in the output files, quantities are dimensionless:
| Quantity | Unit |
|---|---|
| length | Burgers vector magnitude |
| stress | shear modulus |
| speed | shear-wave speed |
| time | |
| energy |
The values of these units are printed when a simulation starts. For zirconium (
A simulation folder holds inputFiles/, config/ and F/. Configuration and auxiliary IO default to config; existing runs stored in evl/ must move that directory to config/ before restarting or opening them in DDqt. Filenames inside the directory remain unchanged. These files in inputFiles/ define the run:
| File | Declares | Read when |
|---|---|---|
DefectiveCrystal.txt |
the physics, useFEM, Nsteps, dtMax, maxResolveSteps, the restart step, the periodic images, the output frequency and format |
always |
polycrystal.txt |
the material file, temperature, mesh file, crystal rotations C2G<n>, mesh mapping F and X0, and periodic faces |
always |
the material file, for example W.txt |
crystal structure, slip systems and their mobility laws, elastic constants, gamma surfaces, noise, second phases, cluster-dynamics parameters | always |
initialMicrostructure.txt |
a list of microstructure files, each declaring one family of initial defects | by microstructureGenerator |
DD.txt |
the numerical controls of dislocation dynamics | with DislocationDynamics |
ElasticDeformation.txt |
the applied stress and strain, their rates, the stiffness ratio, useElasticDeformationFEM |
with ElasticDeformation |
ClusterDynamics.txt |
useClusterDynamicsFEM |
with ClusterDynamics |
Mesh nodes
The active DD helpers use dimension-based APIs, for example
DislocationNetworkRemesh<3>, DislocationJunctionFormation<3>, and
GalerkinGlideSolver<3>. Their implementations explicitly instantiate dimension 3
in the corresponding source files. DD IO records accept concrete objects such as
DislocationLoopLink<dim>; serialization is implemented in the matching IO source
files, and live-object conversions in DislocationIOConversions.cpp. The generic
LoopNetwork layer retains its type-based templates.
MoDELib/
├── include/ # headers
│ ├── DefectiveCrystal/ # shared physics contexts, configuration and auxiliary output, orchestration
│ ├── DislocationDynamics/ # DD context, fields, network, solvers, topology, and dislocation IO
│ ├── MicrostructureGeneration/ # generators and specifications of initial microstructures
│ ├── DislocationMobilities/ # mobility laws and their selector
│ ├── PolycrystallineMaterials/ # crystals, slip systems, grains, grain boundaries, gamma surfaces
│ ├── GlidePlanes/ # glide planes, periodic glide planes, noise
│ ├── ClusterDynamics/ # mobile and immobile species on the FEM mesh, reactions, sink rates
│ ├── ElasticDeformation/ InclusionMicrostructure/ DiscreteCrackMechanics/
│ ├── LoopNetwork/ # the generic loop-network topology
│ ├── FEM/ Mesh/ Quadrature/ # finite elements, simplicial meshes (Gmsh), Gauss–Legendre rules
│ ├── Lattices/ Lattices_NEW/ # lattice arithmetic
│ ├── Geometry/ Math/ IO/ Utilities/
│ ├── ParticleInteraction/ MPI/ DDvtk/
├── src/ # implementations, matching the header folders
├── tools/
│ ├── DDomp/ # the simulation driver
│ ├── MicrostructureGenerator/ # writes the initial configuration
│ ├── DDqt/ # Qt 6 / VTK viewer
│ ├── pyMoDELib/ # pybind11 module
│ ├── DDconverter/ # binary configuration files to text
│ ├── DDsegments/ # reads segments from an OVITO DXA .vtk file
│ └── QuadratureGeneration/ # generates the Gauss–Legendre tables
├── python/ # modlibUtils.py (input and output helpers), examples of the bindings,
│ # MLglideSolver.py, DDMobilityPy.py
├── lib/ # readers of the evl, ddAux and F files, used by the plotting scripts
├── Library/ # templates copied into each simulation
│ ├── DefectiveCrystal/ # DefectiveCrystal.txt
│ ├── DislocationDynamics/ # DD.txt
│ ├── ElasticDeformation/ # ElasticDeformation.txt
│ ├── ClusterDynamics/ # ClusterDynamics.txt
│ ├── Materials/ # Al, AlMg5, AlMg10, AlMg15, Co, Cu, Ni (FCC); W, FeCrAl_Fe (BCC);
│ │ # Zr, Zr_CD2, Zr_CD4, Zr_BMD19, Zr_CD3_BMD19, Zr4_Fitted (HEX); UO2 (fluorite)
│ ├── Meshes/ # Gmsh meshes: unit cubes, cylinders, a disk, bicrystal, polycrystals
│ ├── Microstructures/ # one template per defect family
│ └── GlidePlaneNoise/ # noise templates and MD correlation data
├── tutorials/ # annealing, dipoleNoise, dipoles, spatialCDtest, uniformLoadController
├── testsPy/ # verification scripts (section 10)
├── manual_beta/ # the theory manual (tex, pdf)
├── doxygen/ # Doxyfile and pages of the API documentation
├── scripts/ # shell scripts for cleaning and for image and video conversion
├── .github/workflows/ # workflow.yml: Doxygen pages; container.yml: container image
├── CMakeLists.txt Dockerfile Contributors.txt README.md git_basic_commands.txt
| Dependency | Needed for | Required |
|---|---|---|
| C++20 compiler with OpenMP | everything | yes |
| CMake 3.20 or later | the build | yes |
| Eigen 3 | linear algebra | yes |
| FFTW 3 | glide-plane noise | yes: configuration fails without it |
| Boost | headers | no (a warning if absent) |
| SuiteSparse (CHOLMOD, UMFPACK) | direct FEM solvers | no (a warning if absent) |
| Python 3 with NumPy | the tutorials' generateInputFiles.py |
for the tutorials |
| Matplotlib | the tutorials' plotting scripts | for the plots |
| pybind11 | pyMoDELib, the Python glide solver and mobility |
when USE_PYBIND11=ON (the default); skipped with a warning if absent |
| Qt 6 and VTK 9.4.2 or later | DDqt |
when BUILD_DDQT=ON (the default) |
git clone https://github.com/MechanicsOfDefects/MoDELib.git
cd MoDELib
cmake -S . -B build
cmake --build build -jThe build type is Release, with -O3 -march=native -fopenmp. Eigen is found through its CMake package, or in the usual MacPorts, Homebrew and Linux locations.
| Option | Default | Effect |
|---|---|---|
USE_PYBIND11 |
ON |
builds pyMoDELib and the Python solver hooks; needs Python 3 and pybind11 |
BUILD_TOOLS |
ON |
builds microstructureGenerator, DDomp, DDqt and pyMoDELib. DDconverter, DDsegments and QuadratureGeneration are built separately |
BUILD_DDQT |
ON |
builds the viewer; needs Qt 6 and VTK. Configuration fails if they are missing, so set it to OFF on a machine without them |
MODELIB_MARCH |
native |
the value of -march. Use for example x86-64-v2 for binaries that must run on other machines |
MODELIB_CD_MSIZE |
4 |
number of mobile cluster-dynamics species |
MODELIB_CD_ISIZE |
8 |
number of immobile cluster-dynamics fields: two per loop family. 0 for none |
EIGEN3_INCLUDE_DIRS |
found automatically | path of the Eigen headers |
CMAKE_PREFIX_PATH |
where Qt 6 is installed, for example ~/Qt/6.7.3/macos/lib/cmake |
|
Python_EXECUTABLE, pybind11_DIR |
the interpreter and the pybind11 installation to use |
Common configurations:
# command-line tools only (no Python bindings, no viewer); works on a plain Debian or Ubuntu machine
cmake -S . -B build -DUSE_PYBIND11=OFF -DBUILD_DDQT=OFF
# library only
cmake -S . -B build -DBUILD_TOOLS=OFF -DUSE_PYBIND11=OFF
# macOS with MacPorts, clang 18 and Python 3.11
cmake -S . -B build -DCMAKE_CXX_COMPILER=clang++-mp-18 -DCMAKE_PREFIX_PATH=$HOME/Qt/6.7.3/macos/lib/cmake \
-DPython_EXECUTABLE=/opt/local/bin/python3.11 -Dpybind11_DIR=$(/opt/local/bin/python3.11 -m pybind11 --cmakedir)On Debian or Ubuntu the packages for the library and the command-line tools are build-essential cmake libeigen3-dev libfftw3-dev libboost-dev libsuitesparse-dev. That configuration builds with g++ 13.3 and CMake 3.28 on Ubuntu 24.04.
The species counts must match the material file. The numbers of cluster-dynamics species are fixed when the library is compiled, and the material file must give arrays of the same sizes. The defaults (4 mobile, 8 immobile) are those of Zr4_Fitted.txt and of the spatialCDtest tutorial. The annealing tutorial uses Zr_BMD19.txt, with one mobile species and no immobile species, and needs its own build:
cmake -S . -B build_1_0 -DMODELIB_CD_MSIZE=1 -DMODELIB_CD_ISIZE=0 -DUSE_PYBIND11=OFF -DBUILD_DDQT=OFF
cmake --build build_1_0 -jThe immobile-species model is written for four loop families, so MODELIB_CD_ISIZE is either 8 or 0.
Each release is also published as a container image with the command-line tools, Library/, python/, lib/ and the tutorials:
docker pull ghcr.io/mechanicsofdefects/modelib:v2.0.0
docker run -it --rm ghcr.io/mechanicsofdefects/modelib:v2.0.0The container starts in /opt/MoDELib/tutorials, with DDomp and microstructureGenerator on the PATH. They are built with the default species counts (4 and 8) and -march=x86-64-v2, so that the binaries do not depend on the build machine. DDqt and pyMoDELib are not in the image.
The image is built from the Dockerfile at the root of the repository. To build it locally:
docker build -t modelib .The build ends with smoke tests: two steps of the dipoleNoise and spatialCDtest tutorials. For an image with other species counts, for example for the annealing tutorial, give the counts and the tests that apply to them:
docker build -t modelib:annealing --build-arg CD_MSIZE=1 --build-arg CD_ISIZE=0 --build-arg SMOKE_TESTS=dipoleNoise .A run has three steps: generate the input files, generate the initial microstructure, and evolve it.
cd tutorials/dipoleNoise
python3 generateInputFiles.py # writes inputFiles/, creates config/ and F/
../../build/tools/MicrostructureGenerator/microstructureGenerator . # writes config/evl_0.txt
../../build/tools/DDomp/DDomp . # runs Nsteps stepsBoth executables take the simulation folder as their only argument. The default is the current folder.
generateInputFiles.py shows the pattern every simulation follows. It copies a template from Library/, then changes the copy:
import sys
sys.path.append("../../python/")
from modlibUtils import * # also brings in os, shutil and numpy as np
for folder in ['config', 'F', 'inputFiles']:
os.makedirs(folder, exist_ok=True)
# the physics and the run controls
shutil.copy2('../../Library/DefectiveCrystal/DefectiveCrystal.txt', 'inputFiles/DefectiveCrystal.txt')
setInputVariable('inputFiles/DefectiveCrystal.txt', 'physics', 'DislocationDynamics ElasticDeformation')
setInputVariable('inputFiles/DefectiveCrystal.txt', 'useFEM', '0')
setInputVariable('inputFiles/DefectiveCrystal.txt', 'Nsteps', '10000')
setInputVariable('inputFiles/DefectiveCrystal.txt', 'outputFrequency', '100')
setInputVector('inputFiles/DefectiveCrystal.txt', 'periodicImageSize', np.array([2, 2, 2]), 'images in each direction')
# numerical controls of dislocation dynamics
shutil.copy2('../../Library/DislocationDynamics/DD.txt', 'inputFiles/DD.txt')
setInputVariable('inputFiles/DD.txt', 'glideSolverType', 'Galerkin')
setInputVariable('inputFiles/DD.txt', 'Lmin', '5')
setInputVariable('inputFiles/DD.txt', 'Lmax', '20')
# glide-plane noise
shutil.copy2('../../Library/GlidePlaneNoise/AnalyticalSolidSolutionNoise.txt', 'inputFiles/AnalyticalSolidSolutionNoise.txt')
setInputVariable('inputFiles/AnalyticalSolidSolutionNoise.txt', 'MSSS_SI', '0.45e18')
# material
shutil.copy2('../../Library/Materials/AlMg15.txt', 'inputFiles/AlMg15.txt')
setInputVariable('inputFiles/AlMg15.txt', 'glidePlaneNoise', 'AnalyticalSolidSolutionNoise.txt')
b_SI = getValueInFile('inputFiles/AlMg15.txt', 'b_SI')
# domain: a box mapped from the unit-cube mesh
shutil.copy2('../../Library/Meshes/unitCube24.msh', 'inputFiles/unitCube24.msh')
pf = PolyCrystalFile('AlMg15.txt')
pf.absoluteTemperature = 300
pf.meshFile = 'unitCube24.msh'
pf.alignToSlipSystem0 = 1 # orient the crystal and the box along slip system 0
pf.boxScaling = np.array([102.4e-9, 102.4e-9, 102.4e-9]) / b_SI # edge lengths in units of b
pf.periodicFaceIDs = np.array([-1]) # -1: every face periodic
pf.write('inputFiles')The script goes on to set the applied strain rate in ElasticDeformation.txt, and to declare a periodic dipole in periodicDipoleIndividual.txt, which initialMicrostructure.txt then lists.
Three points about setInputVariable:
- it changes nothing, and gives no warning, when the variable is not in the file, so a misspelt or renamed variable is silently ignored;
- it replaces the old value everywhere in the line, the comment included;
- for a variable whose value is empty in the template (such as
nodalVelocityConstraints=;), usesetInputVector.
The same objects are available from Python through pyMoDELib:
import sys, os
import numpy as np
sys.path.append("../build/tools/pyMoDELib")
import pyMoDELib
ddBase = pyMoDELib.DefectiveCrystalBase(os.path.abspath("../tutorials/uniformLoadController")) # after generateInputFiles.py
generator = pyMoDELib.MicrostructureGenerator(ddBase)
spec = pyMoDELib.ShearLoopIndividualSpecification()
spec.slipSystemIDs = [0, -1]
spec.loopRadii = [27.0e-8, 27.0e-8]
spec.loopCenters = np.array([[200.0, 0.0, 0.0], [0.0, 0.0, 0.0]])
spec.loopSides = [10, 10]
generator.addShearLoopIndividual(spec)
crystal = pyMoDELib.DefectiveCrystal(ddBase)
crystal.initializeConfiguration(generator.configIO)
crystal.runSteps() # or runSingleStep(); displacement(points) and stress(points) return the fieldsThe shared crystal classes live in matching include/DefectiveCrystal/ and
src/DefectiveCrystal/ folders. C++ clients include them with qualified paths,
for example #include <DefectiveCrystal/DefectiveCrystalBase.h>. Include the
physics context header explicitly when accessing that context’s members.
The testSharedHeaders target compiles each shared header independently.
DefectiveCrystalBase owns the shared mesh, polycrystal, FEM mesh, simulation parameters,
and active periodic lattice. Its activePhysics list controls construction of
dislocationDynamicsBase, clusterDynamicsBase, and elasticDeformationBase; disabled
contexts are None in Python. The checked accessors dislocationDynamics(),
clusterDynamics(), and elasticDeformation() raise an error for disabled physics.
Dislocation generators require DD to be enabled in physics. The same-grain lattice-shift
check runs only when constructing the DD context. Periodic image shifts remain shared
because both dislocations and inclusions use them.
Python exposes periodicCoordinates(), the periodic bases and image shifts, DD glide-plane
lookup methods, CD concentration/diffusion/reaction methods, and the elasticity settings.
Generators and crystals keep their common base alive; retained physics contexts keep their
own dependencies alive. Use DefectiveCrystalBase(folder) in place of the former
DislocationDynamicsBase(folder) constructor.
python/defectFields.py gives the complete example. The module also exposes the mobility laws (DislocationMobilitySelector), the noise generators, GammaSurface, SlipSystem, SingleCrystalBase, StressStraight and the interpolants; testsPy/ shows their use.
Each tutorial is a folder with one generateInputFiles.py.
| Tutorial | Physics | Material | Domain | Initial microstructure | Exercises |
|---|---|---|---|---|---|
dipoleNoise |
dislocations, elastic deformation | AlMg15, FCC, a/2<110>{111}
|
about 100 nm box, periodic, 300 K | one periodic dipole | glide through analytical solid-solution noise under a strain rate (strain control); a nodal velocity constraint |
dipoles |
dislocations, elastic deformation | W, BCC, a/2<111>{110}
|
500 × 100 × 500 nm box, periodic, 300 K | one periodic dipole | the edgeScrew law with a kink-pair screw under a stress ramp; elastic energy output |
uniformLoadController |
dislocations, elastic deformation | W, BCC, a/2<111>{110}
|
1 µm box, periodic, 300 K | prismatic loops and interstitial Frank loops, |
the uniform load controller under a constant stress of |
spatialCDtest |
cluster dynamics | Zr (Zr4_Fitted.txt), HEX |
1 µm box, not periodic, 553 K | none: the loop populations are fields | four mobile and eight immobile species under |
annealing |
dislocations, cluster dynamics, elastic deformation | Zr (Zr_BMD19.txt), HEX |
1 µm box, not periodic, 700 K | vacancy and interstitial Frank loops, |
loop annealing by climb coupled to vacancy diffusion, with the finite-element elastic and diffusion solutions |
Notes:
-
spatialCDtesttakes 120 steps of$3.4\times10^{18}$ time units, that is 5.7 days or 0.049 dpa per step, and 5.9 dpa in all. Each step takes about one minute on two cores.plotGrowthSwellingDensity.pyplots the three strain components against dose, with the measurements of Carpenter and Rogerson for comparison; it needs Matplotlib. -
annealingneeds a build with one mobile species and no immobile species (section 5).plotLoops.pyplots the loop radii and the dislocation density against time; it needspyMoDELiband Matplotlib. - The simulation time of the dislocation tutorials is set by
Nstepsin the script.
A run writes into the simulation folder:
| File | Contents |
|---|---|
config/evl_<runID>.txt or .bin |
the configuration: network nodes, loops, loop links, loop nodes, spherical and polyhedral inclusions, the finite-element displacement, and the cluster-dynamics fields |
config/ddAux_<runID>.txt or .bin |
auxiliary data of the dislocation network: quadrature points with their stress, forces, velocity and point-defect concentrations (with outputQuadraturePoints=1) |
F/F_0.txt |
one row per output step: runID, time, dt, the average plastic distortion and its rate, then the columns added by each physics |
F/F_labels.txt |
the label of each column of F_0.txt, one per line |
Further points:
-
Text layout of
evl. Ten lines give the number of rows of each block; the blocks follow in the order of the table. -
Cluster-dynamics fields. The last block of
evl_<runID>.txthas one row per finite-element node. Its columns are the mobile concentrations, then the number densities$N_c, N_{a1}, N_{a2}, N_{a3}$ in units of$b^{-3}$ , then the defect contents$c_c, c_{a1}, c_{a2}, c_{a3}$ . Cluster dynamics is written in text format only (outputBinary=0). -
Columns of
F_0.txt. The crystal writesrunID,time,dt, the nine components ofbetaP, its trace and norm, and the same for its rate.DislocationDynamicsadds the glissile, sessile, boundary and grain-boundary densities in m$^{-2}$; the densities and the plastic distortion per slip system, and the elastic and core energies, when the corresponding switches ofDD.txtare set.ElasticDeformationadds the strain and stress components (with the uniform controller).ClusterDynamicsadds no column: its strain is inbetaP. -
Format and frequency.
outputBinaryandoutputFrequencyare inDefectiveCrystal.txt.tools/DDconverterconverts the binary files in./configto text; it has its ownMakefileand is not part of the CMake build. -
Restart.
startAtTimeStep=-1restarts from the last step recorded inF/F_0.txt. -
Reading in Python.
python/modlibUtils.pyprovidesreadEVLtxt,readAUXtxt,readFfileandgetFarray(F, labels, label).lib/readF.pyandlib/readFile.pyread theFfiles and the input files;lib/readEVLMod2.pyandlib/readNodesMod2.pyread the currentevllayout. -
Viewing.
DDqtopens a simulation folder and displays its configurations.
Input files of 1.0.0 do not run unchanged. A missing variable stops the run with the message File ... does not cointain line with format <name>=...;, which names the variable to add. The simplest route is to start from the templates of Library/ and carry the values over.
Variables that left DD.txt:
In 1.0.0 (DD.txt) |
In 2.0.0 |
|---|---|
useDislocations, useClusterDynamics, useInclusions, useElasticDeformation |
the physics list of DefectiveCrystal.txt |
useCracks |
removed |
useFEM, Nsteps, dtMax, startAtTimeStep, outputFrequency, outputBinary |
DefectiveCrystal.txt |
periodicImageSize, EwaldLengthFactor |
DefectiveCrystal.txt |
useElasticDeformationFEM, inertiaReliefPenaltyFactor |
ElasticDeformation.txt |
useClusterDynamicsFEM |
ClusterDynamics.txt |
use_stochasticForce |
renamed useStochasticForce |
useSubCycling |
removed: subcycling is on when subcyclingBins has more than one value |
stepsBetweenBVPupdates, use_directSolver_FEM, solverTolerance |
removed |
New variables: physics and maxResolveSteps in DefectiveCrystal.txt; bulkNucleationModel, surfaceNucleationModel, outputDislocationDensityPerSlipSystem and nodalVelocityConstraints in DD.txt.
Changed defaults in the templates: Nsteps 250 → 10; dtMax 1e25 → 1e35; periodicImageSize 1 1 1 → 0 0 0; useElasticDeformationFEM 1 → 0; useClusterDynamicsFEM 1 → 0; subcyclingBins 1 2 5 10 50 100 → 1.
Material file:
| In 1.0.0 | In 2.0.0 |
|---|---|
enabledSlipSystems=full<111>{110} and full<100>{110} (BCC) |
a/2<111>{110}, a<100>{110} |
full, Shockley, Kear (FCC) |
a/2<110>{111}, a/6<112>{111}, a/3<112>{111} |
fullBasal, ShockleyBasal, fullPrismatic, fullPyramidal (HEX) |
<a>{basal}, <Shockley>{basal}, <a>{prismatic}, <a>{pyramidal} |
dislocationMobilityType... and the variables B0e_SI, B1e_SI, B0s_SI, B1s_SI, Bk_SI, dH0_eV, p, q, Tf, tauC_SI, a0–a3 |
one mobility_<slip system> line per slip system (section 3.3); the same numbers become the arguments of viscousDrag (edge) and kinkPair (screw), with the kink height, the kink width and the conjugate angle added |
ISF_SI, USF_SI, MSF_SI (HEX) |
basalISF_SI, basalUSF_SI, basalMSF_SI; a prismatic system also needs prismaticWaveVectors and prismaticGammaSurfacePoints |
dOmegav, Ufv_eV, Umv_eV, D0v_SI |
the cluster-dynamics block (mobileSpeciesVector, ...) |
correlationFile_L, correlationFile_T (MD solid-solution noise file) |
correlationFile_xz, correlationFile_yz |
An old slip-system name gives no error: the crystal is simply created without slip systems.
Microstructure files: in the density specifications of shear and Frank loops, targetDensity, radiusDistributionMean and radiusDistributionStd are now targetDensity_SI, radiusDistributionMean_SI and radiusDistributionStd_SI. Frank loops gained allowedGrainIDs and allowedPlaneIDs.
Cluster dynamics. With immobile species, the material file needs the variables of the #- Immobile Species -#, #- Bi-Pyramids -#, #- Initial Defect Densities -# and #- Discretization -# blocks of Zr4_Fitted.txt, which is the reference for the 4 + 8 species model.
Source code. Code that includes headers of DislocationMicrostructure/ must use MicrostructureGeneration/. DislocationNetwork<dim,corder> is now DislocationNetwork<dim>.
The CTest suite separates numerical checks, integration checks, complete simulation
regressions, and performance benchmarks. From the repository root, run
ctest --preset quick for routine checks, ctest --preset simulation for full
simulation regressions, or ctest --preset benchmark for timing measurements.
ctest --preset all runs everything. Configure and build first; see
tests/README.txt for setup, labels, and report locations.
Additional verification resources:
-
testsPy/, scripts that are run by hand from their folder and produce plots:Folder Checks Needs dislocationMobilityvelocity against character angle and stress, for every material of Library/MaterialspyMoDELibgammaSurfacegamma surfaces and their cuts, for the planes and second phases of W pyMoDELibinterpolation1Dlinear and Lagrange interpolants with periodic extrapolation pyMoDELibstressStraighttiming of the stress of a straight segment pyMoDELibanalyticalSolidSolutionCorrelations,mdSolidSolutionCorrelations,mdSolidSolutionNoiseSample,mdStackingFaultCorrelations,mdStackingFaultNoiseSamplesampled noise against its input correlation pyMoDELibwith FFTW, SciPyperiodicFields,periodicEnergyfields and energy of periodic dipoles against the number of images pyMoDELib; the executablesThe plots use Matplotlib, several of them with LaTeX labels.
-
The tutorials: five complete simulations (section 7).
-
Continuous integration:
.github/workflows/workflow.ymlbuilds the Doxygen pages on each push tomasterand publishes them..github/workflows/container.ymlbuilds the container image when a release is published; that build compiles the library and the two command-line tools, and runs two steps of thedipoleNoiseandspatialCDtesttutorials.
| Component | Status |
|---|---|
| Dislocation glide, junctions, remeshing | in use; exercised by the tutorials |
| Periodic and finite domains, inclusions | in use |
| Glide-plane noise | in use; dipoleNoise tutorial. The templates MDSolidSolution.txt and MDStackingFault.txt are placeholders: set type, the correlation files, and three values for gridSize and gridSpacing_SI, as the testsPy scripts do |
| Cluster dynamics, mobile and immobile species | in use; spatialCDtest tutorial. The immobile model is specific to HEX crystals and to four loop families. The number densities are constant: there is no nucleation of clusters |
| Climb | Galerkin climb solver coupled to the cluster-dynamics concentrations; annealing tutorial |
| Species counts | fixed at compile time (MODELIB_CD_MSIZE, MODELIB_CD_ISIZE). Two builds are needed to run all the tutorials. Making the counts run-time parameters is the open item |
| Material files | all are in the 2.0.0 format. Only Zr4_Fitted.txt has the variables of the immobile species. Zr_CD2.txt, Zr_CD3_BMD19.txt and Zr_CD4.txt have two, three and four mobile species and need a build with MODELIB_CD_ISIZE=0 and the matching MODELIB_CD_MSIZE. The mobility numbers of UO2.txt are those of W and are placeholders |
| Conversion of loop fields to discrete loops | the code that would replace the immobile fields by discrete prismatic loops after clusterDiscretizationTime is commented out in ClusterDynamics.cpp. The three variables of the #- Discretization -# block are still read, and have no effect |
| Nucleation |
bulkNucleationModel=1 is a first model: it inserts a shear loop of radius surfaceNucleationModel is read and has no effect |
| Cross slip | model 1 (deterministic) is in use. Model 2 (thermally activated, HEX) has not been updated: it relies on the names of the 1.0.0 mobility classes and on material variables that no material file has |
Mobility type none
|
not usable: an enabled slip system needs a law |
| Kear partials (FCC) |
a/3<112>{111} reads the mobility line of a/6<112>{111}
|
| Polycrystals |
PolyCrystalFile.write in modlibUtils.py writes the rotation of grain 1 only; add C2G2, ... by hand for a multi-grain mesh. Grain-boundary transmission is not connected to the solver |
| Cracks | the CircularCrack and CrackMesh microstructure types are accepted and generate nothing; there is no crack physics |
| Python examples |
python/modelibPy11.py still refers to the removed crossSlip tutorial and to the old density names. python/DDMobilityPy.py and python/MLglideSolver.py do not define the classes (MobilitySolver, PIGNN) that the C++ code calls |
testsPy |
the scripts that build a simulation folder (periodicFields, periodicEnergy and the five noise tests) do not yet copy DefectiveCrystal.txt, which 2.0.0 requires |
lib/ readers |
getLoops.py, readEVL.py, readEVLMod1.py and readNodes.py expect a three-line evl header; the files have ten. readAUX.py assumes three mobile species |
DDqt |
the immobile cluster-dynamics fields are not plotted |
| Sources outside the build |
PeriodicGlidePlane_NEW.h/.cpp, GalerkinGlideSolver_lumped.cpp, Lattices_NEW/, Math/Rational_NEW.h and MPI/ are in the repository and are not compiled |
| Doxygen pages | the main page still describes the earlier header-only MODEL library |
| Manual |
manual_beta/: architecture, theory and user guide, ordered from meshes and periodicity through materials, FEM and multiphysics. Inherited DDD derivations are retained with review notes; detailed CD coverage is deferred pending its redesign |
- API reference (Doxygen): https://mechanicsofdefects.github.io/MoDELib/, built from
doxygen/on each push tomaster. - Architecture, theory and user guide:
manual_beta/MoDELib_manual.pdf. Covers simplicial and polyhedral meshes, periodicity, materials and polycrystals, FEM, multiphysics, simulation setup, elastic deformation, inclusions and DDD. Cluster dynamics is last, with its detailed revision deferred. Build instructions and the migration map are inmanual_beta/BUILDING.txt. - Input reference: the templates in
Library/carry a comment on each variable.Library/DefectiveCrystal/DefectiveCrystal.txtandLibrary/DislocationDynamics/DD.txtlist the controls;Library/Materials/Zr4_Fitted.txtlists the cluster-dynamics variables. - Git notes:
git_basic_commands.txt.
If you use MoDELib, please cite the method paper:
G. Po, M. S. Mohamed, T. Crosby, C. Erel, A. El-Azab, N. Ghoniem, Recent progress in discrete dislocation dynamics and its applications to micro plasticity, JOM 66 (2014) 2108–2120.
@article{Po2014JOM,
author = {Po, Giacomo and Mohamed, Mamdouh S. and Crosby, Tamer and Erel, Can and El-Azab, Anter and Ghoniem, Nasr},
title = {Recent progress in discrete dislocation dynamics and its applications to micro plasticity},
journal = {JOM},
volume = {66},
pages = {2108--2120},
year = {2014}
}Cite also the papers behind the features you use:
- Kink-pair mobility law: G. Po, Y. Cui, D. Rivera, D. Cereceda, T. D. Swinburne, J. Marian, N. Ghoniem, A phenomenological dislocation mobility law for bcc metals, Acta Mater. 119 (2016) 123–135, doi:10.1016/j.actamat.2016.08.016.
- Non-singular fields, option 1: W. Cai, A. Arsenlis, C. R. Weinberger, V. V. Bulatov, A non-singular continuum theory of dislocations, J. Mech. Phys. Solids 54 (2006) 561–587.
- Non-singular fields, option 2: G. Po, M. Lazar, D. Seif, N. Ghoniem, Singularity-free dislocation dynamics with strain gradient elasticity, J. Mech. Phys. Solids 68 (2014) 161–178, doi:10.1016/j.jmps.2014.03.005.
-
Templates are copied, not edited. A simulation copies its input files from
Library/into its owninputFiles/and changes the copies. The templates stay as the reference. -
One folder per simulation.
inputFiles/,config/andF/sit together, and every tool takes that folder as its argument. -
Input syntax.
name=value;with#starting a comment. Vectors and matrices are space-separated values, with one matrix row per line, ended by one;. -
SI at the boundary only. Input variables in SI units end in
_SI(or name their unit, as indH0_eV). Everything inside the code is in units of$b$ ,$\mu$ and$c_s$ . -
Headers and sources mirror each other. A class declared in
include/<Module>/is implemented insrc/<Module>/. - Every source file states the license in its first lines.
-
Options are read where they are used. A class reads its own parameters from the input files with
TextFileParser. Every variable that is read is required.
MoDELib is distributed without any warranty under the GNU General Public License v2, as stated in each source file.
MoDELib was created by Giacomo Po, whose copyright notices in the tools date from 2012. The contributors are listed in Contributors.txt (38 names).
Questions and bug reports: please open an issue at https://github.com/MechanicsOfDefects/MoDELib/issues.