FEA

This sub-module of TopOpt defines the finite-element analysis solvers used inside topology optimization. The solver dispatches on two orthogonal axes: the physics (LinearElasticity or HeatTransfer) and the linear-system algorithm (DirectSolver, CGAssemblySolver, or CGMatrixFreeSolver).

Abstract types

TopOpt.FEA.AbstractPhysics — Type
AbstractPhysics

Abstract type for the physics model dispatched on by GenericFEASolver. Subtypes: LinearElasticity (structural mechanics, dim DOFs/node) and HeatTransfer (heat conduction, 1 DOF/node).

source
TopOpt.FEA.LinearElasticity — Type
LinearElasticity

Physics tag for structural-mechanics problems. Selects linear-elasticity element matrices and assembly (dim DOFs per node).

source
TopOpt.FEA.HeatTransfer — Type
HeatTransfer

Physics tag for heat-conduction problems. Selects heat-transfer element matrices and assembly (1 DOF per node).

source
TopOpt.FEA.AbstractLinearSolver — Type
AbstractLinearSolver

Abstract type for the linear-system algorithm used inside GenericFEASolver. Subtypes: DirectSolver (factorization), CGAssemblySolver (CG with an assembled sparse matrix), CGMatrixFreeSolver (matrix-free CG).

source

Linear solvers

TopOpt.FEA.DirectSolver — Type
DirectSolver

Direct linear solver using Cholesky (or QR) factorization. The most robust option for small to medium problems.

source
TopOpt.FEA.CGAssemblySolver — Type
CGAssemblySolver

Conjugate-gradient solver with an assembled sparse matrix. Suitable for larger problems where a factorization is too expensive in memory.

source
TopOpt.FEA.CGMatrixFreeSolver — Type
CGMatrixFreeSolver

Matrix-free conjugate-gradient solver. Avoids assembling the global stiffness matrix entirely, applying element matrices on the fly. Does not yet support inhomogeneous Dirichlet BCs.

source

FEA solver

TopOpt.FEA.GenericFEASolver — Type
GenericFEASolver

Unified FEA solver with orthogonal physics and linear-solver dispatch. Use the FEASolver factory constructor instead of constructing this directly.

source
TopOpt.FEA.FEASolver — Function
FEASolver(Physics, Solver, problem; kwargs...) -> GenericFEASolver
FEASolver(Solver, problem; kwargs...) -> GenericFEASolver

Factory constructor for the unified FEA solver. The second form infers the physics type from the problem type. Keyword arguments: quad_order, xmin, penalty, prev_penalty, qr, cg_max_iter, abstol, preconditioner, conv.

source

Matrix-free operators

TopOpt.FEA.MatrixFreeOperator — Type
MatrixFreeOperator

Linear operator that applies the global stiffness matrix without assembling it, by looping over element matrices. Used by CGMatrixFreeSolver.

source

Convergence criteria

TopOpt.FEA.EnergyCriteria — Type
EnergyCriteria

Energy-based CG convergence criterion, checking the relative energy norm. Useful for stiff systems where the residual norm is a poor indicator.

source

Forward simulation

TopOpt.FEA.simulate — Function
simulate(solver, x)

Run a forward FEA solve for the design x and return the displacement/temperature field. Convenience wrapper around the solver call operator.

source

Internal CG solve

TopOpt.FEA.cg_solve! — Function
cg_solve!(solver, op, rhs, lhs, precond_matrix; initially_zero=true)

Solve the linear system with the solver's preconditioned conjugate-gradient settings, writing the solution into lhs.

source