Skip to content

Six materials have no unit tests #34

Description

@petlenz

Measured across include/numsim-materials/materials/ — 23 material classes (26 headers, minus plasticity_utils, yield_functions and drucker_prager_yield_function, which are helpers rather than materials).

No test references these at all:

material note
exponential_isotropic_hardening linear_isotropic_hardening is well covered; the exponential variant is not
linear_damage_law exponential_damage_law is covered; this one is not
scalar_complement_weight scalar_identity_weight is covered; the complement is not
strain_energy_state_function
vector_strain_state_function
weighted_sum covered on feature/tangent-source-consumers (#29) only

Three of the six are the second variant of a pair whose first variant is tested — the exponential hardening beside the linear one, the linear damage law beside the exponential one, the complement weight beside the identity weight. That is a recognisable pattern: the first of a pair gets a test when it is written, and the second inherits the assumption that it is "the same shape".

weighted_sum and per-branch coverage

Its test exists only on #29, so whether weighted_sum is covered depends on which branch you measure. That is worth noting on its own: coverage is not currently a property of the project, it is a property of a branch.

What "no test" costs here

These are small materials and none is obviously wrong. The concrete risk is the one this repo has hit repeatedly: a material with no test is also a material whose published property names and history-vs-plain choice are unpinned. A history property costs one STATEV slot per integration point under the UMAT layer, and nothing currently asserts which materials publish history.

See the companion issue on a generic test structure — Tier 2 there covers exactly that, and would cover all six without six bespoke test files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions