forked from openturns/openturns
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a666306
commit a7010a1
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#! /usr/bin/env python | ||
|
||
import openturns as ot | ||
from openturns.testing import assert_almost_equal | ||
from openturns.usecases import stiffened_panel as stiffened_panel | ||
|
||
|
||
ot.TESTPREAMBLE() | ||
ot.PlatformInfo.SetNumericalPrecision(20) | ||
|
||
print("Test the FloodModel data class.") | ||
sp = stiffened_panel.StiffenedPanel() | ||
|
||
print(sp.inputDistribution) | ||
# test parameter | ||
assert sp.dim == 10 | ||
|
||
# test marginals means | ||
assert_almost_equal(sp.E.getMean()[0], 1338.1299666394023, 1e-12) | ||
assert_almost_equal(sp.nu.getMean()[0], 30.001003758482675, 1e-12) | ||
assert_almost_equal(sp.h_c.getMean()[0], 50.0, 1e-12) | ||
assert_almost_equal(sp.ell.getMean()[0], 55.0, 1e-12) | ||
assert_almost_equal(sp.f_1.getMean()[0], 300.0, 1e-12) | ||
assert_almost_equal(sp.f_2.getMean()[0], 5000.0, 1e-12) | ||
assert_almost_equal(sp.t.getMean()[0], 55.5, 1e-12) | ||
assert_almost_equal(sp.a.getMean()[0], 3.0, 1e-12) | ||
assert_almost_equal(sp.b_0.getMean()[0], 3.0, 1e-12) | ||
assert_almost_equal(sp.p.getMean()[0], 3.0, 1e-12) | ||
|
||
meanInput = sp.distribution.getMean() | ||
print("meanInput = ", meanInput) | ||
meanOutput = sp.model(meanInput) | ||
print("meanOutput = ", meanOutput) | ||
assert_almost_equal(meanOutput, [2.5313, -5.96869, 1.0362], 1.0e-4) |