Skip to content

Commit

Permalink
Fixed the settings for layered tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ankushaggarwal committed Aug 22, 2024
1 parent 2da2af6 commit d8bc761
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ def test_layered_samples():
material = MatModel('goh','nh')
mm = material.models
mm[0].fiber_dirs = [np.array([cos(0.),sin(0.),0])]
sample = LayeredUniaxial(UniaxialExtension(material),UniaxialExtension(material))
sample = LayeredUniaxial(UniaxialExtension(material, disp_measure='length', force_measure='force'),UniaxialExtension(material,disp_measure='length', force_measure='force'))
assert isinstance(sample, LayeredSamples)
assert len(sample._samples) == 2
assert sample._samples[0]._mat_model == material
assert sample._samples[1]._mat_model == material
assert sample.disp_controlled(sample._samples[0]._x0, sample.parameters) == pytest.approx(0.0)
assert sample.force_controlled(np.zeros_like(sample._samples[0]._x0), sample.parameters) == pytest.approx(sample._samples[0]._x0)

sample = LayeredPlanarBiaxial(PlanarBiaxialExtension(material,force_measure='force'),PlanarBiaxialExtension(material,force_measure='force'))
sample = LayeredPlanarBiaxial(PlanarBiaxialExtension(material,disp_measure='length',force_measure='force'),PlanarBiaxialExtension(material,disp_measure='length',force_measure='force'))
assert isinstance(sample, LayeredSamples)
assert len(sample._samples) == 2
assert sample._samples[0]._mat_model == material
Expand Down

0 comments on commit d8bc761

Please sign in to comment.