71 Commits

Author SHA1 Message Date
Jukka Aho 8c35970050 chore(test): register the io topic in the top-level test runner
Mirror the new test/io tree in TOPICS so Pkg.test and topic filtering pick up
WriteVTK coverage after mesh and before quadrature.

- Insert "io" after "mesh" in the TOPICS constant ordering
2026-05-11 03:06:10 +03:00
Jukka Aho fa762a11ec test: wire suite helpers, topics, and drop cantilever Gmsh mesh
The default harness loads shared helpers and smoke checks before topic
includes, registers poroelastic and thermo_poroelastic, drops the retired IO
topic, and removes the orphaned ASCII fixture.

- Add zero_alloc_helpers.jl, test_api_contract.jl, test_pkg_hygiene.jl, and
  test_inference_smoke.jl included once from runtests.jl
- Extend TOPICS; remove io; clarify test_args accepts topic names only
- Delete test/testdata/cantilever_beam.msh
2026-05-11 02:38:59 +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 5feb8c0dfb test: add test suites for new DOF-based architecture
Add test includes for new architecture components: fields, physics,
element interpolation, materials, topology, and validation.

- Add LocalField type test
- Add fields test suite (test_local_field.jl)
- Add physics test suite (test_strain.jl)
- Add element interpolation test suite (test_interpolate_local_fields.jl)
- Add material test suites (state variables, traits, global cache, plasticity, workspace)
- Add topology test suites (segments, triangles, quadrilaterals, entities, etc.)
- Add validation test (test_plasticity_simple.jl)
- Comment out obsolete topology type extraction test
2025-12-12 23:49:41 +02:00
Jukka Aho 555c506f17 test(continuum): Add automated allocation and trait tests
Created test/domains/continuum/runtests.jl:
- Test material trait system (6 tests)
  * LinearElastic: StatelessConstantTangent, !needs_deformation, !needs_state
  * NeoHookean: StatelessStrainDependent, needs_deformation, !needs_state
  * PerfectPlasticity: StatefulStrainDependent, needs_deformation, needs_state
- Include zero-allocation tests (27 tests)
  * Verify 0 bytes for LinearElastic integration
  * Verify 0 bytes for NeoHookean integration
  * Test full assembly loop allocations
- Include type stability tests (15 tests)
  * Verify PreparedElement type stability
  * Verify compute_block! type stability
  * Verify trait dispatch type stability

Updated test/runtests.jl:
- Include test/domains/continuum/runtests.jl in main test suite
- Automatically run on every test invocation
- Ensures zero-allocation property maintained
- Ensures material traits work correctly

Updated test/domains/continuum/test_type_stability.jl:
- Adapt to new generic integration API
- Test prepare_element!, compute_block!, compute_all_blocks!
- Verify type stability for both LinearElastic and NeoHookean
- Test material trait helper functions

Test Results:
- 57 tests passing (all tests)
- 33 continuum domain tests (including new trait tests)
- Zero-allocation verified for LinearElastic AND NeoHookean
- Type stability confirmed for generic integration
- Backward compatibility maintained (cantilever test passes)

Why: Automated tests ensure the refactoring maintains performance properties
(zero allocations, type stability) while adding new functionality (traits).
2025-11-19 10:03:46 +02:00
Jukka Aho 744b0de04e test(runtests): Reduce default test entrypoint to fast smoke checks + validation case
- Replace long list of legacy `include(...)` tests with small smoke checks asserting core types exist
- Add a single validation include: `validation/test_cantilever_regression.jl`
- Note legacy tests moved to `test/broken/` for later migration

This reduces CI turn-around time while keeping a lightweight verification of core functionality. Full integration tests can be run explicitly.
2025-11-18 15:09:51 +02:00
Jukka Aho c40fcdbb91 feat(geometry): Add strain computation function
- Implement compute_strain() for small strain tensor calculation
- Zero allocation with NTuple inputs and Tensors.jl
- Type stable (@inferred passes)
- Complete test suite with 4 test cases (uniaxial, shear, rigid body, performance)
- Performance validated: 0 allocations, ~110ns median
- Add to test suite in runtests.jl
- Export from JuliaFEM module

Resolves user story #0001
2025-11-12 02:19:45 +02:00
Jukka Aho 724ed52923 Add Manifest.toml 2025-11-08 08:50:59 +02:00
Jukka Aho d781b00da1 Merge branch 'master' into kc/local_buffer 2019-11-26 15:29:02 +07:00
Jukka Aho e462fa2862 Documentation deployment fix (#230)
Similar work done in FEMQuad.jl and FEMBase.jl
2019-04-08 21:35:13 +03:00
Kristoffer Carlsson 09c355b916 make backwards compatible 2018-11-29 17:40:55 -05:00
Jukka Aho 005a2440bb Update runtests.jl
* Explicitly call test files instead of for loop
* Call Documenter before and after unit tests
2018-09-06 13:34:26 +03:00
Jukka Aho 79170fcf23 Use package HeatTransfer.jl for heat problems (#194)
Heat transfer analysis is moved to its own package where the development continues. Two small modifications are needed for test files:

- Instead of `problem.properties.formulation`, we have two separate problems, `PlaneHeat` for two-dimensional problems and `Heat` for three-dimensional problems.
- Unnecessary prefixing of field names is changed. For example, now we simply have only "thermal conductivity" and not prefixed "temperature thermal conductivity".
2018-05-03 15:37:37 +03:00
Tony Kelman 4038c2f0ce Use @__DIR__ instead of Pkg.dir
this allows installing and loading the package from elsewhere
2017-08-05 12:02:00 +03:00
Jukka Aho 49b9642e6a Measure testing time for each test file separately (#126)
Uses TimerOutputs.
2017-07-20 17:11:37 +03:00
Jukka Aho 40ef9388c3 Fix FactCheck dependencies (issue #80)
- Remove some obsolete tests related to Field.
- Fixed a test checking is header information found from source files
  (was using FactCheck and commented out).
- Add header information for all files (was missing from
  materials_plasticity.jl)
2017-01-27 10:15:52 +02:00
Jukka Aho c935725d3a julia v0.5 compatibility. test -> testing. new elements tri7 and wedge6. abaqus inp reading. more integration rules. 2016-07-10 04:26:21 +03:00
Jukka Aho 8af9cd1c1d removed obsolete code 2016-07-03 23:40:12 +03:00
Jukka Aho 757ba2b3d9 all tests pass now 2016-07-03 21:16:03 +03:00
Jukka Aho 778c167bba refactor contact and tests 2016-06-25 04:12:53 +03:00
Jukka Aho c02d510673 fixed a lot of tests 2016-06-19 20:01:37 +03:00
Jukka Aho 046eb40943 little bug in result printing 2015-11-01 18:54:59 +02:00
Jukka Aho 3cac7d9b83 data structures, new testing concept 2015-11-01 18:44:50 +02:00
Jukka Aho 548eecb759 updated how to investigate all test files from test folder 2015-07-07 21:15:49 +03:00
Jukka Aho 85f1f6a689 fixing paths 2015-06-27 19:53:49 +03:00
Jukka Aho 784bd66a23 test_ files are now automatically tested 2015-06-27 19:42:20 +03:00
Tero Frondelius 8274200728 more tests 2015-06-26 22:04:40 +03:00
Tero Frondelius ecdff7f880 Hard work 2015-06-26 21:34:42 +03:00
Tero Frondelius dc0c9a9215 More hard coding 2015-06-26 21:29:18 +03:00
Tero Frondelius 2071b95f9d Very labourous coding session 2015-06-26 21:21:18 +03:00
Tero Frondelius 8c182e45bb fixed the path problems in few general tests 2015-06-25 18:35:16 +03:00
Tero Frondelius b9b1b5218a fixing a copy-paste error 2015-06-24 23:43:00 +03:00
Tero Frondelius 96736d8cc0 File header license test added 2015-06-24 23:33:42 +03:00
Tero Frondelius 51d5e20dc7 FactCheck summary at the end 2015-06-24 19:37:28 +03:00
Tero Frondelius 0cf02f7b4e added a test to find non ascii characters from src 2015-06-24 18:32:47 +03:00
Jukka Aho 15c4c52c01 added elasticity solver 2015-06-23 20:41:25 +03:00
Tero Frondelius e9f859cb8e Testing code coverage with FactCheck.jl 2015-06-23 08:17:07 +03:00
Tero Frondelius 8dd0135b8d commenting out also includes 2015-06-22 23:46:49 +03:00
Jukka Aho 732b164405 is it now better 2015-06-22 23:34:48 +03:00
Jukka Aho d3e33c9310 what happened? 2015-06-22 23:19:58 +03:00
Jukka Aho 9949c894ed testing test 2015-06-22 23:19:10 +03:00
Tero Frondelius 01d6543209 Small fix to runtests.jl 2015-06-22 22:57:22 +03:00
Tero Frondelius d59a584cc6 using FactCheck 2015-06-22 20:49:01 +03:00
Jukka Aho a802deec31 Merge branch 'master' of https://github.com/ovainola/JuliaFEM 2015-06-21 00:02:46 +03:00
Jukka Aho c69357066d asdf 2015-06-21 00:02:15 +03:00
Tero Frondelius 9420d76294 debug to @debug in order to avoid overhead 2015-06-20 23:30:33 +03:00
Tero Frondelius 9ed4d1e2b7 added Logging in runtests.jl 2015-06-20 22:14:04 +03:00
Jukka Aho 76ae202d32 typo 2015-06-20 21:51:50 +03:00
Jukka Aho 7cb81b1291 Merge branch 'master' of https://github.com/ovainola/JuliaFEM 2015-06-20 21:48:31 +03:00
Jukka Aho a961a1f48b xdmf test 2015-06-20 21:47:54 +03:00