morphogen.homogenization.fenicsx¶
The FEniCSx solver: morphoGen’s finite element problems assembled and solved by
dolfinx (solver="fenicsx").
make_problem(mesh, materials, physics, bc, solver="fenicsx") (configurations:
homogenization: solver: fenicsx; the command line: --solver fenicsx) returns
problems whose fields come from FEniCSx: the weak forms of linear (thermo-)elasticity
and conduction written in UFL on the same tetrahedra, with Lagrange elements of the
order of the mesh and the materials of the elements (oriented crystals included) as
cellwise constant tensors; the periodic fluctuations by the multi-point constraints of
dolfinx_mpc (the upper faces of the box slaved to the lower ones, a node held against
translations); the kinematic, static and mixed conditions on the very degrees of
freedom that morphoGen’s own solver constrains; PETSc’s sparse direct solver (MUMPS) or,
beyond DIRECT_LIMIT unknowns, conjugate gradients preconditioned by algebraic
multigrid (GAMG, with the rigid-body modes). The averages, energies and statistics of
the phases are then evaluated from the fields as for morphoGen’s solver, so that the
two are interchangeable (homogenize, RVE studies, configurations, the command line)
and check each other.
FEniCSx runs on Linux (or WSL): conda install -c conda-forge fenics-dolfinx
dolfinx_mpc; dolfinx 0.11 and dolfinx_mpc 0.11 were used.
- morphogen.homogenization.fenicsx.DIRECT_LIMIT = 300000¶
Unknowns up to which PETSc’s direct solver (MUMPS) is used.
- morphogen.homogenization.fenicsx.available() bool[source]¶
Whether dolfinx, dolfinx_mpc and petsc4py can be imported.
- class morphogen.homogenization.fenicsx.FenicsxElasticProblem(mesh: TetMesh, materials: dict[int, Material], bc: str = 'kubc', *, solver: str = 'auto', tol: float = 1e-08, maxiter: int | None = None, regularization: float = 1e-12, physics: str | None = None, integration: str = 'full')[source]¶
Bases:
_Fenicsx,FEElasticProblemLinear (thermo-)elasticity of a tetrahedral mesh solved by FEniCSx.
- class morphogen.homogenization.fenicsx.FenicsxThermalProblem(mesh: TetMesh, materials: dict[int, Material], bc: str = 'kubc', *, solver: str = 'auto', tol: float = 1e-08, maxiter: int | None = None, regularization: float = 1e-12, physics: str | None = None, integration: str = 'full')[source]¶
Bases:
_Fenicsx,FEThermalProblemSteady linear conduction of a tetrahedral mesh solved by FEniCSx.