From b73c57f6bec47d67c41a3ddf51fffc0ce966dd44 Mon Sep 17 00:00:00 2001 From: crswong888 Date: Fri, 6 Nov 2020 21:10:37 -0700 Subject: [PATCH] modified half sine unit test such that it returns the adjusted displacement time history (refs #296) --- .../gold/half_sine_scaled_out.csv | 22 +++++++++---------- .../baselinecorrection/half_sine_scaled.i | 5 +++-- test/tests/functions/baselinecorrection/tests | 4 ++-- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/test/tests/functions/baselinecorrection/gold/half_sine_scaled_out.csv b/test/tests/functions/baselinecorrection/gold/half_sine_scaled_out.csv index aea1e2641e..cdedb92d29 100644 --- a/test/tests/functions/baselinecorrection/gold/half_sine_scaled_out.csv +++ b/test/tests/functions/baselinecorrection/gold/half_sine_scaled_out.csv @@ -1,12 +1,12 @@ time,check_func_value -0,-30.4475976 -0.1,-15.5452976 -0.2,-2.1039116 -0.3,8.5671124 -0.4,15.4172844 -0.5,17.7772224 -0.6,15.4172844 -0.7,8.5671124 -0.8,-2.1039116 -0.9,-15.5452976 -1,-30.4475976 +0,0 +0.1,-0.114982238 +0.2,-0.389069737 +0.3,-0.691122257 +0.4,-0.917055783 +0.5,-1.00004205 +0.6,-0.917055783 +0.7,-0.691122257 +0.8,-0.389069737 +0.9,-0.114982238 +1,-1.1866202465072e-16 diff --git a/test/tests/functions/baselinecorrection/half_sine_scaled.i b/test/tests/functions/baselinecorrection/half_sine_scaled.i index 3ae23e5680..6c9ef37b8f 100644 --- a/test/tests/functions/baselinecorrection/half_sine_scaled.i +++ b/test/tests/functions/baselinecorrection/half_sine_scaled.i @@ -11,8 +11,9 @@ [] [Functions] - [corrected_accel_func] + [corrected_disp_func] type = BaselineCorrection + series_type = displacement time_values = '0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0' acceleration_values = '0.000 3.050 5.801 7.985 9.387 9.870 9.387 7.985 5.801 3.050 0.000' gamma = 0.5 @@ -31,7 +32,7 @@ [Postprocessors] [check_func_value] type = FunctionValuePostprocessor - function = corrected_accel_func + function = corrected_disp_func execute_on = 'INITIAL TIMESTEP_END' [] [] diff --git a/test/tests/functions/baselinecorrection/tests b/test/tests/functions/baselinecorrection/tests index f976f2eca8..802068547f 100644 --- a/test/tests/functions/baselinecorrection/tests +++ b/test/tests/functions/baselinecorrection/tests @@ -10,14 +10,14 @@ input = half_sine_scaled.i csvdiff = half_sine_scaled_out.csv - detail = "The corrected output should be scaled by a factor of 4.886. The input acceleration time history is a half cycle of `9.87 \sin(\pi t)`." + detail = "The output should be a displacement time history scaled by a factor of 4.886 that does not exhibit drifting behavior. The input acceleration time history is a half cycle of `9.87 \sin(\pi t)`." [] [twenty_sines_with_bc] type = CSVDiff input = twenty_sines_with_bc.i csvdiff = twenty_sines_with_bc_out.csv - detail = "The corrected output shall support use in ICs and BCs and the displacement at a boundary should be characteristic of a baseline corrected time history. The input acceleration time history is twenty cycles of `-250 \pi^{2} \sin(50 \pi t)`." + detail = "The output should be an adjusted acceleration time history that is compatible with ICs and BCs objects and the displacement at the mesh boundary where it is prescribed should not exhibit drifting behavior. The input acceleration time history is twenty cycles of `-250 \pi^{2} \sin(50 \pi t)`." [] []