conspire/constitutive/hybrid/hyperelastic/additive/
mod.rs1#[cfg(test)]
2mod test;
3
4use crate::{
5 constitutive::{ConstitutiveError, hybrid::ElasticAdditive, solid::hyperelastic::Hyperelastic},
6 mechanics::{DeformationGradient, Scalar},
7};
8
9impl<C1, C2> Hyperelastic for ElasticAdditive<C1, C2>
10where
11 C1: Hyperelastic,
12 C2: Hyperelastic,
13{
14 fn helmholtz_free_energy_density(
20 &self,
21 deformation_gradient: &DeformationGradient,
22 ) -> Result<Scalar, ConstitutiveError> {
23 Ok(self.0.helmholtz_free_energy_density(deformation_gradient)?
24 + self.1.helmholtz_free_energy_density(deformation_gradient)?)
25 }
26}