Skip to content

Commit

Permalink
Add extreme value pp test (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwen committed Feb 1, 2025
1 parent 7ba0858 commit 7c4b89f
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
51 changes: 51 additions & 0 deletions test/tests/postprocessors/extreme_value.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[Domain]
dim = 2
nx = 40
ny = 40
mesh_mode = DUMMY
device_names = cpu
[]

[TensorBuffers]
[c]
[]
[]

[TensorComputes]
[Initialize]
[c]
type = ParsedCompute
buffer = c
extra_symbols = true
expression = -x+y
[]
[]
[]

[Postprocessors]
[min_c]
type = TensorExtremeValuePostprocessor
buffer = c
value_type = MIN
execute_on = 'TIMESTEP_END'
[]
[max_c]
type = TensorExtremeValuePostprocessor
buffer = c
value_type = MAX
execute_on = 'TIMESTEP_END'
[]
[]

[Problem]
type = TensorProblem
[]

[Executioner]
type = Transient
num_steps = 1
[]

[Outputs]
csv = true
[]
3 changes: 3 additions & 0 deletions test/tests/postprocessors/gold/extreme_value_out.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
time,max_c,min_c
0,0,0
1,0.975,-0.975
9 changes: 9 additions & 0 deletions test/tests/postprocessors/tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Tests]
[extreme_value]
type = CSVDiff
input = extreme_value.i
csvdiff = extreme_value_out.csv
requirement = 'The system shall be able to determine the minimum and maximum item value in a tensor.'
issues = '#6'
design = 'TensorExtremeValuePostprocessor.md'
[]

0 comments on commit 7c4b89f

Please sign in to comment.