Commit Graph

2165 Commits

Author SHA1 Message Date
Jukka Aho 85900fe680 feat(mesh): add structured Quad4/Seg2/Cook meshes and face-aware extract_surface
Structured mesh helpers now cover 2D quads in the xy plane, a 1D Seg2 chain
embedded in R^3, and Cook’s membrane on a bilinear Quad4 map, so plane tests
and benchmarks can build reference geometry without ad hoc connectivity.
extract_surface gains an explicit volume-local face index and uses faces(T)
when the face vertex count matches the surface topology, which avoids picking
the wrong face by default for low-order hex meshes that list true face corners.

- structured.jl: SPDX header; add create_structured_line_mesh(Seg2; x0,x1,nx,y,z)
- structured.jl: add create_structured_box_mesh(Quad4; xmin,xmax,…,z) with :xmin/:xmax/:ymin/:ymax node sets
- structured.jl: add create_cook_membrane_mesh(Quad4, nx, ny; scale) with classical Cook corner map and same node-set convention
- mesh.jl: extract_surface(mesh, set; local_face=1) selects vol_faces[local_face]; build face_conn from face vertex indices when length matches n_face_nodes, else keep first-n legacy fallback for high-order volume/surface mismatch
- README.md: document Quad4/Seg2/Cook entry points; clarify mesh I/O is not in core load path (see src/io/README.md)
2026-05-11 02:26:23 +03:00
Jukka Aho cbdc9d2f82 refactor(materials): diffusion and hydraulic conductivity traits
Support domain kernels and Pass~1 material field typing.
2026-05-11 02:23:06 +03:00
Jukka Aho 03330a1d6a feat(thermo-poroelastic): add THM coupled volume kernel
ThermoPoroelasticKernel with multi-field stiffness blocks and domain README.
2026-05-11 02:23:06 +03:00
Jukka Aho d646aa9d9e feat(poroelastic): add Biot coupled u–p volume kernel
New BiotPoroelasticKernel with README for steady/transient coupled displacement and pore pressure.
2026-05-11 02:23:06 +03:00
Jukka Aho eac97e0b19 refactor(domains): Darcy, heat, and thermo-elastic kernels
Align primal Darcy and heat kernels with Pass~1 updates; extend thermo_elastic kernel; document new poroelastic/THM folders in domains README.
2026-05-11 02:23:05 +03:00
Jukka Aho 799c4d6a0f feat(continuum): DOF-based Pass~1 hooks and mixed kernel updates
Add dof_based_pass1.jl prepare_dof_based_material_workspace! overrides; dim-2 geometry cache branch; update Hu–Washizu, Hellinger–Reissner, Stokes, mixed-up kernels and material cache wiring.
2026-05-11 02:23:05 +03:00
Jukka Aho 12f7f8c0bd refactor(matrix-free): Dirichlet integration and surface load basis reuse
Use get_basis_functions on Quad4/Tri3/Seg2; reference Gauss tuples for face rules; depwarn symmetric apply_load! overloads that carry an unused kernel argument.
2026-05-11 02:23:05 +03:00
Jukka Aho 1ebc795f69 refactor(matrix-free): preconditioners and eigensolve without redundant kernel
Primary signatures use (cache, asm, mesh; …); kernel-ful overloads delegate with one-shot depwarn.
2026-05-11 02:23:05 +03:00
Jukka Aho df2a1eb4f0 refactor(matrix-free): kernelless operators and README
MatrixFreeOperator stores cache/asm/mesh only; forward Pass~1 keywords; deprecate redundant-kernel overloads via shared depwarn helper.
2026-05-11 02:23:05 +03:00
Jukka Aho 6968cbf9b3 refactor(assemblers): abstract cache, element cache, microkernel, partitioned matvec
Tighten assembler/kernel contracts, material workspace hooks, and redundant-kernel depwarns on partitioned halo helpers.
2026-05-11 02:23:05 +03:00
Jukka Aho c430babf85 refactor(dof-based-ka): align KA matvec with kernel column
Keep CPU/GPU KA stiffness and mass matvec paths consistent with kernel_at(cache, eid) and precision guards.
2026-05-11 02:23:04 +03:00
Jukka Aho 35b99ca48e refactor(dof-based): kernel column, depwarns, and Pass~1 assembly
Route volume physics through cache.kernel_column; add redundant-kernel delegating overload depwarns; extend apply_K!/apply_M!/internal force/partitioned helpers and prepare_dof_based_material_workspace hooks.
2026-05-11 02:23:04 +03:00
Jukka Aho a0d67cdb59 feat(assemblers): add kernel column and KA scalar homogeneity
Add PerElementKernelColumn accessors, ka_column_homogeneity guard, and README documenting cache.kernel_column and Pass~1 separation from assemblers.
2026-05-11 02:23:04 +03:00
Jukka Aho a54c36ff5e chore(assemblers): add shared redundant-kernel depwarn helper
Introduce _depwarn_redundant_kernel_arg! and a session Ref so legacy overloads that ignore a volume kernel emit a single Base.depwarn toward kernel-column-only APIs.
2026-05-11 02:23:03 +03:00
Jukka Aho bc2cd71f5d test(quadrature): delegate runner to consolidated quadrature rule suite
Replace the retired per-shape modules with the single `test_quadrature_rules.jl`
entry point that mirrors the current quadrature implementation layout.

- SPDX header; trim imports to `Test`, `JuliaFEM`, and `Tensors`.
2026-05-09 18:46:29 +03:00
Jukka Aho b981c8301b test(physics): narrow runner to strain helpers while layer stabilizes
Legacy physics API tests were retired with the module reset; keep only the strain
smoke file until higher-level physics coverage returns.

- Import `JuliaFEM` explicitly for includes under `Pkg.test`.
2026-05-09 18:46:27 +03:00
Jukka Aho 9dfc27bc68 test(mesh): slim Hex8 refinement smoke + brick volume helper check
Drive refinement through `create_structured_box_mesh` so tests stay aligned with
the dimensioned `Mesh{8,Hex8}` constructors, and keep a cheap analytic volume
sanity check for `compute_element_volume`.

- SPDX header; replace bespoke manual meshes with structured coupons + bisection counts.
2026-05-09 18:46:26 +03:00
Jukka Aho 2502707f10 test(materials): snapshot material_behavior inventory across model families
Add one representative model per `material_behavior` kind so refactors to traits
cannot silently orphan newly added constitutive laws.

- Cover constant tangents (elastic/thermal/hydraulic/moisture/diffusion/orthotropic).
- Cover hyperelastic, plasticity, damage, Chaboche, creep, and eigenstrain-augmented elasticity.
2026-05-09 18:46:20 +03:00
Jukka Aho 84fc4ece56 test(materials): extend state-variable trait coverage for new physics hooks
Register the recently introduced damage/creep/eigenstrain/Chaboche markers so the
generated registry cannot drift from their storage types and default symbols.

- SPDX header refresh.
2026-05-09 18:46:17 +03:00
Jukka Aho c631eb6d1c test(materials): assert J2 yield after radial return for PerfectPlasticity
Add a focused regression that `compute_stress` lands on the von Mises surface when
the trial state lies outside yield, using the returned backstress state.

- SPDX header refresh for the file.
2026-05-09 18:46:11 +03:00
Jukka Aho aabca484a3 test(materials): cover buffered stress/tangent vectors in assembly workspace
The refactor exposes in-place `get_*_vector(workspace, buf)` overloads; exercise them
beside the allocating helpers and keep allocation probes on pre-filled buffers.

- Assert buffer aliases and equality against freshly extracted vectors.
- Replace generic `get_field` probes with direct NamedTuple field access.
2026-05-09 18:46:05 +03:00
Jukka Aho 00e69548b9 test(geometry): slim Jacobian suite to Triangle{3} Lagrange{1} smoke tests
The previous file duplicated a long narrative and many scenarios that better live
in basis/quadrature coverage; keep the Jacobian helpers exercised with tuple vs
vector coordinates and physical derivative consistency.

- SPDX header; drop unused `LinearAlgebra` import.
- Fix basis calls to `Triangle{3}` / `Lagrange{1}` and verify scaling + PoU gradient sum.
2026-05-09 18:46:03 +03:00
Jukka Aho cc71c10033 test(elements): smoke multifield extract_element_dofs on structured Hex8
Replace the hand-built toy elements with a single coupon produced by
`create_elements!`, matching how assembly pulls DOFs from handlers.

- SPDX header + one regression comparing flat vs structured extraction for T+u on Hex8.
2026-05-09 18:46:02 +03:00
Jukka Aho dffdf01af2 test(continuum): scrub Hex8 validation copy of deprecated \"NEW API\" wording
The stiffness check already targets the shipped COO assembler; drop marketing-style
labels from comments and console banners so failures read like ordinary regressions.
2026-05-09 18:45:53 +03:00
Jukka Aho 0f6924f62f test(continuum): reset tests use GlobalMaterialCache + geometry arity
Material-cache reset coverage should populate stresses through the global cache
API rather than the removed `create_material_state` helper.

- Mirror production signatures for `update_geometry_cache!` / `update_material_cache!`.
2026-05-09 18:45:48 +03:00
Jukka Aho 04dc1df09e test(continuum): thread GlobalMaterialCache through kernel integration check
Manual quadrature comparisons must refresh material data with the same global
state container production assembly uses, and geometry updates no longer take the
kernel object.

- Construct `global_cache` beside the per-IP material workspace.
- Pass `global_cache` into `update_material_cache!` and drop the kernel argument
  from `update_geometry_cache!`.
2026-05-09 18:45:46 +03:00
Jukka Aho 4d29e7816c test(continuum): follow assemble! signature without external material state
COO assembly now keeps persistent material history on the cache’s global store,
so tests should not fabricate a separate `state_old` argument.

- Call `assemble!(cache, assembler, kernel, mesh, u_global, Δt)` in correctness,
  allocation, and two-element coverage paths.
- Clarify comments about zero displacement vs nonzero `u_global`.
2026-05-09 18:45:37 +03:00
Jukka Aho e6a1767f99 test(continuum): align cache-update regression with GlobalMaterialCache API
The three-phase cache exerciser still referenced the retired per-call material
state bag and an older `update_geometry_cache!` arity. Fold everything onto the
shared global cache object and the slimmer geometry updater signature.

- Hoist `BenchmarkTools` to module scope for the `@benchmark` block.
- Drop the duplicate legacy `update_material_cache!` testset; keep the zero-alloc
  path driven by `GlobalMaterialCache`.
2026-05-09 18:45:32 +03:00
Jukka Aho e1d46340db test(continuum): drop unused create_material_state helper
Stateful initialization now flows through `GlobalMaterialCache` construction in
the individual tests, so the placeholder helper only duplicated errors.

- Remove `create_material_state` and its docstring from shared continuum helpers.
2026-05-09 18:45:02 +03:00
Jukka Aho 041e0d519d test(continuum): extend runner with mixed formulations and solves
Wire the continuum suite into the newer kernel families beyond baseline elasticity
assembly: branch coverage for material caching, a brick direct solve, and mixed
u–p / Stokes / HR / Hu–Washizu matvec + solver smoke paths.

- Add `test_material_cache_branches.jl` next to the existing cache-update group.
- Include mixed formulation kernels with companion solves or penalty matvec checks.
2026-05-09 18:44:57 +03:00
Jukka Aho f332fe9ad1 test(dofs): run multifield and facet-map integration suite
The DOF runner now exercises the type-stable handler path end-to-end (multi-field
templates, facet orientation maps, and higher-order hex facets) instead of the
retired field-unification stub.

- Replace `test_field_unification.jl` with global ranges, multifield wiring, and
  facet-map coverage across tet/wedge/pyramid/tet10/hex20 shapes.
- Drop the unused `Tensors` import and the old header docstring.
2026-05-09 18:44:49 +03:00
Jukka Aho b540c62334 test(basis): load JuliaFEM in type-stability regression
Inference-sensitive helpers belong behind the public module boundary so changes to
includes do not silently widen types in CI.

- Switch to `using JuliaFEM` after removing relative includes.
2026-05-09 18:44:05 +03:00
Jukka Aho f5ff185741 test(basis): load JuliaFEM in SVector return-shape checks
Static-array return paths depend on the same generated helpers as production code;
tests should import the package rather than cherry-picking sources.

- Drop manual topology/basis includes.
2026-05-09 18:43:57 +03:00
Jukka Aho 3dac8325e7 test(basis): load JuliaFEM in PoU regression
Partition-of-unity constraints must hold for the generated tables JuliaFEM ships,
not a parallel copy pulled via relative paths.

- Replace includes with `using JuliaFEM`.
2026-05-09 18:43:49 +03:00
Jukka Aho 469fe2ea4a test(basis): load JuliaFEM in numerical-accuracy suite
Numerical tolerances are meaningful only when they target the shipped basis
implementation and quadrature pairing.

- Import `JuliaFEM` instead of stitching topology files manually.
2026-05-09 18:43:43 +03:00
Jukka Aho f67ec02006 test(basis): load JuliaFEM in Kronecker-delta checks
Kronecker tests should exercise exported Lagrange evaluation helpers together with
topology types from the package root.

- Swap fragile src includes for `using JuliaFEM`.
2026-05-09 18:43:32 +03:00
Jukka Aho 9a3d7038ef test(basis): load JuliaFEM in interpolation regression
Interpolation tests should respect manifest exports and initialization order from
the main module.

- Remove duplicated topology/basis includes; import `JuliaFEM` instead.
2026-05-09 18:43:17 +03:00
Jukka Aho fb3056e513 test(basis): load JuliaFEM in gradient property checks
Ensure gradient identities run against the same API users import, not a bespoke
subset of source files.

- Replace relative includes with `using JuliaFEM`.
2026-05-09 18:43:14 +03:00
Jukka Aho 094e2a1dc5 test(basis): load JuliaFEM in derivative regression
Align derivative checks with the packaged basis/topology stack instead of
partially re-including `src/` fragments.

- Drop manual `include("../../src/...")` bootstrapping in favor of `using JuliaFEM`.
2026-05-09 18:43:13 +03:00
Jukka Aho 0bd4580c00 test(basis): load JuliaFEM in partition-of-unity sweep
Basis regression files used to `include` topology and generated basis sources
directly from `../../src`, which drifted from package exports and hid missing
wiring until CI.

- Replace the relative `include` chain with `using JuliaFEM` so tests hit the
  real module surface (`Lagrange{P}`, parametrized topologies, generated tables).
2026-05-09 18:43:04 +03:00
Jukka Aho 1e1a08d4db test(basis): extend runner for Piola and quadrature hooks
Import `JuliaFEM` in the topic runner and include new Piola/Nedelec,
integration-basis quadrature, and basis-description regressions.

- Reorder derivative/type-stability includes after adding coverage files.
2026-05-09 18:41:05 +03:00
Jukka Aho d6514f2195 test: drive suites via topic runners and ARGS filtering
Replace hand-inlined topic tests with `TOPICS` discovery, optional ARGS-based
filtering, and interface smoke checks required by the new mesh stack.

- SPDX-header the runner and assert `AbstractInterfaceMesh` / `InterfaceMesh` exist.
- `include(joinpath(topic, \"runtests.jl\"))` for every mirrored topic directory.
- Drop obsolete inline includes for retired paths; note legacy tests live outside CI.
2026-05-09 18:40:23 +03:00
Jukka Aho aec9383974 test(verification): add symbolic Tet4 stiffness script 2026-05-09 18:39:46 +03:00
Jukka Aho 9a126471cd test(verification): add symbolic Hex8 stiffness script 2026-05-09 18:39:46 +03:00
Jukka Aho bb03759b83 test(validation): add cantilever materials showcase 2026-05-09 18:39:46 +03:00
Jukka Aho d340d426ac test(validation): add validation topic runner 2026-05-09 18:39:46 +03:00
Jukka Aho f03587b2e1 test(topology): add triangle reference coordinate checks 2026-05-09 18:39:46 +03:00
Jukka Aho 2b92f5464b test(topology): add topology topic runner 2026-05-09 18:39:45 +03:00
Jukka Aho 2c4b50c592 test(sparse): add SparseMatrixCOO regression 2026-05-09 18:39:43 +03:00
Jukka Aho b7b74e79dd test(sparse): add sparse scratch topic runner 2026-05-09 18:39:42 +03:00