-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for skip_times option in Predictor closes #6506
- Loading branch information
Showing
6 changed files
with
180 additions
and
20 deletions.
There are no files selected for viewing
Binary file not shown.
4 changes: 4 additions & 0 deletions
4
modules/solid_mechanics/tests/predictor/gold/predictor_skip_test_csv.csv
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,4 @@ | ||
time,nonlinear_its | ||
0,0 | ||
1,2 | ||
|
4 changes: 4 additions & 0 deletions
4
modules/solid_mechanics/tests/predictor/gold/predictor_test_csv.csv
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,4 @@ | ||
time,nonlinear_its | ||
0,0 | ||
1,0 | ||
|
157 changes: 157 additions & 0 deletions
157
modules/solid_mechanics/tests/predictor/predictor_skip_test.i
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,157 @@ | ||
#The purpose of this test is to test the loadstep predictor. This is a very | ||
#small, monotonically loaded block of material. If things are working right, | ||
#the predictor should come very close to exactly nailing the solution on steps | ||
#after the first step. Because of nonlinear geometry, the predictor is slightly | ||
#off in general, but that is mitigated by setting this up so that the elements | ||
#undergo no rotations. | ||
|
||
#This test checks to see that the predictor is skipped in the last step. | ||
|
||
[Mesh] | ||
displacements = 'disp_x disp_y disp_z' | ||
file = predictor_test.e | ||
[] # Mesh | ||
|
||
[Functions] | ||
[./ramp1] | ||
type = PiecewiseLinear | ||
x = '0. 1.' | ||
y = '0. 1.' | ||
scale_factor = 0.2 | ||
[../] | ||
[] # Functions | ||
|
||
[Variables] | ||
|
||
[./disp_x] | ||
order = FIRST | ||
family = LAGRANGE | ||
[../] | ||
|
||
[./disp_y] | ||
order = FIRST | ||
family = LAGRANGE | ||
[../] | ||
|
||
[./disp_z] | ||
order = FIRST | ||
family = LAGRANGE | ||
[../] | ||
|
||
[] # Variables | ||
|
||
[SolidMechanics] | ||
[./solid] | ||
disp_x = disp_x | ||
disp_y = disp_y | ||
disp_z = disp_z | ||
[../] | ||
[] | ||
|
||
[BCs] | ||
|
||
[./ss1_x] | ||
type = PresetBC | ||
variable = disp_x | ||
boundary = 4 | ||
value = 0.0 | ||
[../] | ||
[./ss1_y] | ||
type = PresetBC | ||
variable = disp_y | ||
boundary = 4 | ||
value = 0.0 | ||
[../] | ||
[./ss1_z] | ||
type = PresetBC | ||
variable = disp_z | ||
boundary = 4 | ||
value = 0.0 | ||
[../] | ||
|
||
[./ss2_x] | ||
type = FunctionPresetBC | ||
variable = disp_x | ||
boundary = 2 | ||
function = ramp1 | ||
[../] | ||
[./ss2_y] | ||
type = FunctionPresetBC | ||
variable = disp_y | ||
boundary = 2 | ||
function = ramp1 | ||
[../] | ||
[./ss2_z] | ||
type = PresetBC | ||
variable = disp_z | ||
boundary = 2 | ||
value = 0.0 | ||
[../] | ||
|
||
[] # BCs | ||
|
||
[Materials] | ||
|
||
[./stiffStuff1] | ||
type = Elastic | ||
block = 1 | ||
|
||
disp_x = disp_x | ||
disp_y = disp_y | ||
disp_z = disp_z | ||
|
||
youngs_modulus = 1e6 | ||
poissons_ratio = 0.0 | ||
[../] | ||
[] # Materials | ||
|
||
[Executioner] | ||
|
||
type = Transient | ||
|
||
|
||
#Preconditioned JFNK (default) | ||
solve_type = 'PJFNK' | ||
|
||
|
||
|
||
|
||
# controls for linear iterations | ||
l_max_its = 100 | ||
l_tol = 1e-8 | ||
|
||
# controls for nonlinear iterations | ||
nl_max_its = 15 | ||
nl_rel_tol = 1e-5 | ||
nl_abs_tol = 1e-7 | ||
|
||
# l_max_its = 20 | ||
|
||
start_time = 0.0 | ||
dt = 0.25 | ||
num_steps = 4 | ||
end_time = 1.0 | ||
|
||
[./Predictor] | ||
type = SimplePredictor | ||
scale = 1.0 | ||
skip_times = '1.0' | ||
[../] | ||
[] # Executioner | ||
|
||
[Postprocessors] | ||
[./nonlinear_its] | ||
type = NumNonlinearIterations | ||
[../] | ||
[] | ||
|
||
[Outputs] | ||
[./out] | ||
type=Exodus | ||
interval = 4 | ||
[../] | ||
[./csv] | ||
type=CSV | ||
interval = 4 | ||
[../] | ||
[] # Outputs |
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
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 |
---|---|---|
@@ -1,8 +1,12 @@ | ||
[Tests] | ||
[./test] | ||
type = 'Exodiff' | ||
type = 'CSVDiff' | ||
input = 'predictor_test.i' | ||
exodiff = 'out.e' | ||
abs_zero = 1e-10 | ||
csvdiff = 'predictor_test_csv.csv' | ||
[../] | ||
[./test_skip] | ||
type = 'CSVDiff' | ||
input = 'predictor_skip_test.i' | ||
csvdiff = 'predictor_skip_test_csv.csv' | ||
[../] | ||
[] |