Installation
MeanFieldHomogenization is registered in Julia's General registry.
julia> import Pkg; Pkg.add("MeanFieldHomogenization")or, from the Pkg REPL mode (]):
pkg> add MeanFieldHomogenizationNo additional registry is required: its dependencies (TensND.jl, OrdinaryDiffEq.jl, Elliptic.jl, QuadGK.jl, Polynomials.jl, PolynomialRoots.jl, Tensors.jl, …) come from General as well. Type-generic elliptic integrals are bundled internally as the MeanFieldHomogenization.Elliptic submodule.
Optional package extensions
Nothing below is needed for the core: each extension loads by itself when you import its trigger packages, and the feature it unlocks is the only thing that becomes unavailable without it.
| Load | Unlocks |
|---|---|
DECUHR, Integrals | the adaptive-cubature backend method = :decuhr for arbitrary anisotropy; the bundled method = :nestedquadgk covers the same cases |
NonlinearSolve | any SciML algorithm for the self-consistent fixed points (Iterative solvers) |
SymPy | symbolic closed forms of the elliptic integrals |
Ferrite, FerriteGmsh, Gmsh | the reference finite-element backend for FE inclusions |
Gridap, GridapGmsh | the second FE backend for the same morphologies |
Ferrite (alone) | the material interface of the finite-element coupling — a microstructure as a Gauss-point law |
Lux, Optimisers, Zygote | training a neural surrogate; evaluating a shipped model needs none of them |
For development from a clone of the repository, instantiate the project before first use:
cd /path/to/MeanFieldHomogenization.jl
julia --project=. -e 'using Pkg; Pkg.instantiate()'Run the test suite with:
julia --project=. -e 'using Pkg; Pkg.test()'Citation
If you use MeanFieldHomogenization.jl in your work, please cite the following:
@software{meanfieldhomogenization_jl,
author = {Barthélémy, Jean-François},
title = {MeanFieldHomogenization.jl: Mean-field homogenization of heterogeneous materials},
doi = {10.5281/zenodo.21884243},
url = {https://doi.org/10.5281/zenodo.21884243},
}CITATION.cff in the repository root carries the same metadata in a machine-readable form.