Skip to content

Commit

Permalink
Add NearestPointLayeredIntegral test. Closes idaholab#14717
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentlaboure committed Feb 17, 2020
1 parent 4f40969 commit 4ddb74b
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!template load file=stubs/moose_object.md.template name=NearestPointLayeredIntegral syntax=/UserObjects/NearestPointLayeredIntegral
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
[Mesh]
type = GeneratedMesh
dim = 3
xmax = 1.5
ymax = 1.5
zmax = 1.2
nx = 10
ny = 10
nz = 10
[]

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

[AuxVariables]
[./np_layered_average]
order = CONSTANT
family = MONOMIAL
[../]
[]

[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]

[AuxKernels]
[./np_layered_average]
type = SpatialUserObjectAux
variable = np_layered_average
execute_on = timestep_end
user_object = npla
[../]
[]

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

[UserObjects]
[./npla]
type = NearestPointLayeredIntegral
direction = y
num_layers = 10
variable = u
points_file = points.txt
[../]
[]

[Executioner]
type = Steady

solve_type = 'PJFNK'

petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]

[Outputs]
exodus = true
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
0.375 0 0.3
1.125 0 0.3
0.375 0 0.9
1.125 0 0.9
10 changes: 10 additions & 0 deletions test/tests/userobjects/nearest_point_layered_integral/tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Tests]
[./from_file]
type = 'Exodiff'
input = 'nearest_point_layered_integral.i'
exodiff = 'nearest_point_layered_integral_out.e'
requirement = 'The system shall compute layered integrals that computed from the closest values for a list of points that are specified in an external file'
design = 'NearestPointLayeredIntegral.md'
issues = '#14717'
[../]
[]

0 comments on commit 4ddb74b

Please sign in to comment.