forked from idaholab/moose
-
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.
Add test correct spelling (idaholab#14220)
- Loading branch information
Showing
7 changed files
with
84 additions
and
14 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
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
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
45 changes: 45 additions & 0 deletions
45
test/tests/functions/coarsened_piecewise_linear/coarsened_piecewise_linear.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,45 @@ | ||
[Mesh] | ||
type = GeneratedMesh | ||
dim = 1 | ||
[] | ||
|
||
[Variables] | ||
[./dummy] | ||
[../] | ||
[] | ||
|
||
[Problem] | ||
solve = false | ||
kernel_coverage_check = false | ||
[] | ||
|
||
[Functions] | ||
[./input] | ||
type = CoarsenedPiecewiseLinear | ||
data_file = input.csv | ||
format = columns | ||
epsilon = 0.1 | ||
x_scale = 0.03 | ||
[../] | ||
[] | ||
|
||
[VectorPostprocessors] | ||
[./F] | ||
type = PiecewiseFunctionTabulate | ||
function = input | ||
execute_on = INITIAL | ||
outputs = vpp | ||
[../] | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
num_steps = 1 | ||
[] | ||
|
||
[Outputs] | ||
[./vpp] | ||
type = CSV | ||
execute_vector_postprocessors_on = INITIAL | ||
[../] | ||
[] |
8 changes: 8 additions & 0 deletions
8
test/tests/functions/coarsened_piecewise_linear/generate_data.py
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,8 @@ | ||
#!/usr/bin/env python | ||
|
||
import numpy as np | ||
|
||
x = np.linspace(0, np.pi*10, 10000) | ||
y = np.cos(x) * np.exp(-x/10.0) | ||
|
||
np.savetxt("input.csv", np.transpose([x,y]), delimiter=",") |
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,17 @@ | ||
[Tests] | ||
issues = '#2272' | ||
design = 'source/functions/CoarsenedPiecewiseLinear.md' | ||
|
||
[./prepare_data] | ||
type = RunCommand | ||
command = './generate_data.py' | ||
requirement = "Generate the fine tabulated function data for the coarsened_piecewise_linear test" | ||
[../] | ||
[./coarsened_piecewise_linear] | ||
type = 'CSVDiff' | ||
input = 'coarsened_piecewise_linear.i' | ||
csvdiff = 'coarsened_piecewise_linear_vpp_F_0000.csv' | ||
requirement = "The Function system shall include an object that creates a function based on x- and y-data pairs and returns an explicit value from the supplied data when queried (i.e., linear interpolation is not performed)." | ||
prereq = 'prepare_data' | ||
[../] | ||
[] |