Skip to content

Commit

Permalink
Add test (idaholab#21801)
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwen authored and MengnanLi91 committed Feb 23, 2023
1 parent 9706bd0 commit c5018f6
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
Binary file not shown.
65 changes: 65 additions & 0 deletions test/tests/userobjects/renomalize_vector/test.i
@@ -0,0 +1,65 @@
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[]

[Variables]
[v_x]
[]
[v_y]
[]
[]

[ICs]
[v_x]
type = FunctionIC
variable = v_x
function = sin(2*y*pi)
[]
[v_y]
type = FunctionIC
variable = v_y
function = cos(2*x*pi)
[]
[]

[Kernels]
[diff_x]
type = Diffusion
variable = v_x
[]
[dt_x]
type = TimeDerivative
variable = v_x
[]
[diff_y]
type = Diffusion
variable = v_y
[]
[dt_y]
type = TimeDerivative
variable = v_y
[]
[]

[UserObjects]
[renormalize]
type = RenormalizeVector
v = 'v_x v_y'
execute_on = TIMESTEP_END
[]
[]

[Executioner]
type = Transient
dt = 0.01
num_steps = 10
[]

[Outputs]
exodus = true
[]
11 changes: 11 additions & 0 deletions test/tests/userobjects/renomalize_vector/tests
@@ -0,0 +1,11 @@
[Tests]
[test]
type = Exodiff
input = test.i
exodiff = test_out.e
design = RenormalizeVector.md
issues = '#21801'
abs_zero = 1e-9
requirement = "The system shall be able to renormalize tuples of solution variables as a vector to a desired L2-norm"
[]
[]

0 comments on commit c5018f6

Please sign in to comment.