API reference

The Python interface of morphoGen, written from its docstrings. Each package lists its public names, those of its __all__ (from morphogen.homogenization import Material), linked to the module that defines them, then its modules; each module documents what it defines. The commands and the keys of the configuration files are described in the configuration reference. The graphical interface (morphogen.gui), the compiled kernels (morphogen.kernels) and the functions behind the commands (morphogen.cli) are not part of it. Which of these names stay stable from one version to the next is the subject of Stability of the interface.

The package at a glance

import morphogen as mg gives the domains and images (mg.Domain, mg.VoxelImage), the models (mg.models, mg.model_from_config, mg.list_models), mg.export and the packages used most (mg.analysis, mg.mesh, mg.io, mg.homogenization, mg.rve…); the others are imported by name (from morphogen import fracture). The packages follow the steps of a study:

Step

Package

What it holds

Generate

morphogen.models

the 40 models of microstructures, their realizations and their theory

morphogen.automata

cellular automata and lattice growth processes, on grids and tilings

morphogen.design

tile assemblies, strut frameworks and their rigidity, searches of design spaces

morphogen.optimization

topology optimization of periodic cells by inverse homogenization

morphogen.iga

isogeometric analysis of NURBS geometries and their shape optimization

Describe

morphogen.mesh

conforming, exact and voxel meshes

morphogen.io

images, meshes, geometries and the inputs of other codes, read and written

morphogen.viz

sections, figures, 3D views and videos

Measure

morphogen.analysis

the morphological measures of images, percolation, stereology

morphogen.theory

the closed forms of stochastic geometry used by the models

morphogen.texture

crystallographic textures and orientation maps

Compute

morphogen.homogenization

apparent properties, materials and behaviours, loading paths, the solvers

morphogen.fracture

cohesive zones, cracks and their growth, the phase field

morphogen.contact

contact, self-contact and friction of the surfaces of a mesh

morphogen.micromorphic

micromorphic continua: the microfoam model, micromorphic damage

morphogen.coupling

transient diffusion, oxidation, ageing and hygromorphs

morphogen.learning

behaviours learned from data

morphogen.symmetry

symmetry groups of periodic cells, for the patterns after buckling

morphogen.gpu

the choice of the device of the FFT solvers

Study

morphogen.rve

the statistical size of the representative volume element

morphogen.results

the database of the results and the Ashby charts

morphogen.config, morphogen.pipeline, morphogen.parallel

configuration files, their runs, in parallel and on clusters

Applications

morphogen.laser

metal sheets architectured by localized laser treatment

morphogen.dynamics

explicit dynamics with OpenRadioss

Foundations

morphogen.domain, morphogen.image, morphogen.primitives

boxes and grids, voxel images, spheres and segments

morphogen.distributions, morphogen.orientations, morphogen.seeding

laws of sizes and of orientations, reproducible random numbers

morphogen.settings, morphogen.stopping

threads, and the stop of long computations

Modules