Module: src/physics/database Purpose: Index of documentation for BELFEM's precomputed lookup-table module
The database module turns an expensive property function into a cheap one. A property is sampled once onto a structured tensor grid, projected onto a smooth basis, stored, and thereafter read by shape-function interpolation — so the cost is paid at setup instead of at every quadrature point of every Newton iteration.
Its principal consumer is physics/materials, where the field- and temperature-dependent resistivity of normal metals is served from such a table.
| Document | Read it for |
|---|---|
| database_usage_guide.md | what the module is, how to build and query a table, why the projection step exists, the parallel contract, and the consumer pitfalls |
| Class | File | Role |
|---|---|---|
| Database | cl_Database.hpp / .cpp | holds the finished table; evaluate, evaluate_deriv{x,y,z}, min, max, save |
| database::Projector | cl_DatabaseProjector.hpp / .cpp | build-time only: L2-projects sampled values onto a B-spline basis and returns node values |
| Question | Answer |
|---|---|
| Why project at all, instead of storing the samples? | so the derivative accessors return a continuous field — raw Lagrange interpolation of samples is only C⁰, and its jumps degrade Newton tangents |
| Is the build parallel? | the call is collective, the work is not — rank 0 builds, all ranks receive |
| Which solver? | compile-time preference MUMPS → PARDISO → SUPERLU → UMFPACK; STRUMPACK deliberately excluded (matrices too small) |
| Who clamps the query to the grid? | the caller, always |