Skip to main content

conspire/domain/block/element/solid/elastic_viscoplastic/
mod.rs

1use crate::{
2    constitutive::solid::elastic_viscoplastic::ElasticViscoplastic,
3    domain::block::element::solid::{
4        SolidElement,
5        viscoplastic::{ViscoplasticEvolution, ViscoplasticStateVariables},
6    },
7    math::{Differentiable, Tensor},
8};
9
10pub trait ElasticViscoplasticElement<C, const G: usize, Y>
11where
12    C: ElasticViscoplastic<Y>,
13    Self: SolidElement,
14    Y: Differentiable + Tensor,
15{
16    type Forces;
17    type Stiffnesses;
18    type Error;
19    fn nodal_forces(
20        &self,
21        constitutive_model: &C,
22        nodal_coordinates: &Self::Coordinates,
23        state_variables: &ViscoplasticStateVariables<G, Y>,
24    ) -> Result<Self::Forces, Self::Error>;
25    fn nodal_stiffnesses(
26        &self,
27        constitutive_model: &C,
28        nodal_coordinates: &Self::Coordinates,
29        state_variables: &ViscoplasticStateVariables<G, Y>,
30    ) -> Result<Self::Stiffnesses, Self::Error>;
31    fn state_variables_evolution(
32        &self,
33        constitutive_model: &C,
34        nodal_coordinates: &Self::Coordinates,
35        state_variables: &ViscoplasticStateVariables<G, Y>,
36    ) -> Result<ViscoplasticEvolution<G, Y>, Self::Error>;
37}