Skip to content

Commit

Permalink
Add unit tests for checking expected behavior in presence of multiple…
Browse files Browse the repository at this point in the history
… output files and expected error messages with outputs parameter
  • Loading branch information
shikhar413 committed Feb 6, 2025
1 parent fb9ecea commit 37fcdd8
Show file tree
Hide file tree
Showing 18 changed files with 211 additions and 141 deletions.
32 changes: 16 additions & 16 deletions test/tests/materials/output/block_via_outputs.i
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,48 @@
[]

[Variables]
[./u]
[../]
[u]
[]
[]

[Kernels]
[./diff]
[diff]
type = CoefDiffusion
variable = u
coef = 10
[../]
[./time]
[]
[time]
type = TimeDerivative
variable = u
[../]
[]
[]

[BCs]
[./left]
[left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
[]
[right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[]

[Materials]
[./block_1]
[block_1]
type = OutputTestMaterial
block = 1
variable = u
[../]
[./block_2]
[]
[block_2]
type = OutputTestMaterial
block = 2
variable = u
[../]
[]
[]

[Executioner]
Expand All @@ -60,9 +60,9 @@
[]

[Outputs]
[./out]
[out]
type = Exodus
output_material_properties = true
show_material_properties = real_property
[../]
[]
[]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
28 changes: 14 additions & 14 deletions test/tests/materials/output/limited_via_outputs.i
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,43 @@
[]

[Variables]
[./u]
[../]
[u]
[]
[]

[Kernels]
[./diff]
[diff]
type = CoefDiffusion
variable = u
coef = 10
[../]
[./time]
[]
[time]
type = TimeDerivative
variable = u
[../]
[]
[]

[BCs]
[./left]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[]

[Materials]
[./test_material]
[test_material]
type = OutputTestMaterial
block = 0
variable = u
[../]
[]
[]

[Executioner]
Expand All @@ -58,9 +58,9 @@
[]

[Outputs]
[./out]
[out]
type = Exodus
output_material_properties = true
show_material_properties = 'real_property vector_property'
[../]
[]
[]
24 changes: 12 additions & 12 deletions test/tests/materials/output/output.i
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,44 @@
[]

[Variables]
[./u]
[../]
[u]
[]
[]

[Kernels]
[./diff]
[diff]
type = CoefDiffusion
variable = u
coef = 10
[../]
[./time]
[]
[time]
type = TimeDerivative
variable = u
[../]
[]
[]

[BCs]
[./left]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[]

[Materials]
[./test_material]
[test_material]
type = OutputTestMaterial
block = 0
variable = u
outputs = all
[../]
[]
[]

[Executioner]
Expand Down
44 changes: 22 additions & 22 deletions test/tests/materials/output/output_block_displaced.i
Original file line number Diff line number Diff line change
Expand Up @@ -7,72 +7,72 @@
[]

[Functions]
[./disp_fn]
[disp_fn]
type = ParsedFunction
expression = x
[../]
[]
[]

[AuxVariables]
[./disp]
[../]
[disp]
[]
[]

[AuxKernels]
[./disp_ak]
[disp_ak]
type = FunctionAux
variable = disp
function = disp_fn
[../]
[]
[]

[Variables]
[./u]
[../]
[u]
[]
[]

[Kernels]
[./diff]
[diff]
type = CoefDiffusion
variable = u
coef = 0.5
[../]
[./time]
[]
[time]
type = TimeDerivative
variable = u
[../]
[]
[]

[BCs]
[./left]
[left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
[]
[right]
type = DirichletBC
variable = u
boundary = 2
value = 2
[../]
[]
[]

[Materials]
[./block_1]
[block_1]
type = OutputTestMaterial
block = 1
output_properties = 'real_property tensor_property'
outputs = exodus
variable = u
[../]
[./block_2]
[]
[block_2]
type = OutputTestMaterial
block = 2
output_properties = 'vector_property tensor_property'
outputs = exodus
variable = u
[../]
[]
[]

[Executioner]
Expand All @@ -85,9 +85,9 @@
[]

[Outputs]
[./exodus]
[exodus]
type = Exodus
use_displaced = true
sequence = false
[../]
[]
[]
30 changes: 15 additions & 15 deletions test/tests/materials/output/output_boundary.i
Original file line number Diff line number Diff line change
Expand Up @@ -6,61 +6,61 @@
[]

[Variables]
[./u]
[u]
[../]
[]

[Kernels]
[./diff]
[diff]
type = CoefDiffusion
variable = u
coef = 1
[../]
[./time]
[]
[time]
type = TimeDerivative
variable = u
[../]
[]
[]

[BCs]
[./left]
[left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
[]
[right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[]

[Materials]
[./block]
[block]
type = OutputTestMaterial
block = '1 2'
output_properties = tensor_property
variable = u
outputs = exodus
[../]
[./boundary_1]
[]
[boundary_1]
type = OutputTestMaterial
boundary = 1
output_properties = real_property
outputs = exodus
variable = u
real_factor = 2
[../]
[./boundary_2]
[]
[boundary_2]
type = OutputTestMaterial
boundary = 2
output_properties = 'real_property vector_property'
real_factor = 2
variable = u
outputs = exodus
[../]
[]
[]

[Executioner]
Expand Down
Loading

0 comments on commit 37fcdd8

Please sign in to comment.