Skip to content

Installation

MeanFieldHomogenization is registered in Julia's General registry.

julia
julia> import Pkg; Pkg.add("MeanFieldHomogenization")

or, from the Pkg REPL mode (]):

julia
pkg> add MeanFieldHomogenization

No 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.

LoadUnlocks
DECUHR, Integralsthe adaptive-cubature backend method = :decuhr for arbitrary anisotropy; the bundled method = :nestedquadgk covers the same cases
NonlinearSolveany SciML algorithm for the self-consistent fixed points (Iterative solvers)
SymPysymbolic closed forms of the elliptic integrals
Ferrite, FerriteGmsh, Gmshthe reference finite-element backend for FE inclusions
Gridap, GridapGmshthe 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, Zygotetraining 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:

shell
cd /path/to/MeanFieldHomogenization.jl
julia --project=. -e 'using Pkg; Pkg.instantiate()'

Run the test suite with:

shell
julia --project=. -e 'using Pkg; Pkg.test()'

Citation

If you use MeanFieldHomogenization.jl in your work, please cite the following:

bibtex
@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.