Geometry, meshes, and numerical integration for finite element analyses
This repository contains structures and functions to perform geometry computations, generate meshes, and perform numerical integration for finite element analyses (FEM/FEA).
We use Vector and Matrix from Russell Lab, thus some Debian packages are required.
Documentation:
Installation
Install some libraries:
👆 Check the crate version and update your Cargo.toml accordingly:
[]
= "*"
Examples
use default_integ_points;
use ;
use ;
use StrError;
use HashSet;
Todo
- Implement read/write mesh functions
- Add tests for the numerical integrations
- Implement triangle and tetrahedron generators
- Implement drawing functions
Appendix
Geometry versus space dimensions
The following table shows what combinations of geometry-number-of-dimensions (geo_ndim) and
space-number-of-dimensions (space_ndim) are possible. There are three cases:
- Case
CABLE--geo_ndim = 1andspace_ndim = 2 or 3; e.g., line in 2D or 3D (cables and rods) - Case
SHELL--geo_ndim = 2andspace_ndim = 3; e.g. Tri or Qua in 3D (shells and surfaces) - Case
SOLID--geo_ndim = space_ndim; e.g., Tri and Qua in 2D or Tet and Hex in 3D
geo_ndim |
space_ndim = 2 |
space_ndim = 3 |
|---|---|---|
| 1 | CABLE |
CABLE |
| 2 | SOLID |
SHELL |
| 3 | impossible | SOLID |
Coverage tool
The coverage tool cannot properly handle the macros in russell_chk such as assert_approx_eq!
and assert_vec_approx_eq! We could use the #[no_coverage] decorator on
the testing function to stop the coverage tool assessing the region coverage within the test function.
However, we let the coverage tool report incorrect Region Coverage anyway. Sometimes, the coverage
tool also fails to report line coverage even when all lines have been run.