Skip to content

Conversation

@hverhelst
Copy link
Member

@hverhelst hverhelst commented Jan 22, 2025

We introduce a family of classes derived from gsMaterialBase that can be used as a black-box for constitutive laws in the gsElasticityAssembler.

The material classes implement functions like eval_stress_into and eval_matrix_into which basically return the stress and material tensors.

They can be evaluated on points (using pre-computed deformation gradients and strains)

gsMaterialBase<T> * material;
gsMaterialData<T> data;
// ...
material->precompute(&undeformedPatch,&deformedPatch,patch,u,data);
gsMatrix<T> S, C;
material->eval_stress_into(data,S);
material->eval_matrix_into(data,C);

Or via an evaluator (gsMaterialEval) is provided, which behaves as a gsFunction;

gsMaterialEval<T,gsMaterialOutput::S> evaluator(material,undeformedPatch,deformedPatch);
evaluator.piece(patch).eval_into(u,S);

@hverhelst hverhelst added this to the v25.06.0 milestone Jan 22, 2025
@hverhelst hverhelst marked this pull request as ready for review February 14, 2025 16:38
@hverhelst hverhelst added the enhancement New feature or request label Feb 14, 2025
- Add pre-computation of quantities
- Remove `undeformed` and `deformed` from base class, but use it eval class
- The above fix parallelization
- Update visitors accordingly
- Update example
@hverhelst hverhelst force-pushed the MaterialClassesClean branch from 94b7211 to 777b55c Compare March 7, 2025 12:54
@hverhelst hverhelst removed the request for review from lventavinuela March 26, 2025 12:17
@hverhelst hverhelst merged commit 425ee91 into master Mar 26, 2025
3 checks passed
@hverhelst hverhelst deleted the MaterialClassesClean branch March 26, 2025 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants