Skip to content

Commit

Permalink
Add element functor integral (with elemQp) test testing FE, FE higher…
Browse files Browse the repository at this point in the history
… order, FV variables, functions, functor matprop, refs idaholab#16099
  • Loading branch information
GiudGiud authored and maxnezdyur committed Feb 12, 2023
1 parent e507279 commit a8e3667
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 0 deletions.
@@ -0,0 +1,103 @@
[Mesh]
second_order = true
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
[block]
type = ParsedSubdomainMeshGenerator
input = square
block_id = 1
combinatorial_geometry = 'x > 0.5'
[]
[]

[Problem]
solve = false
[]

[Executioner]
type = Steady
[]

[AuxVariables]
[nodal]
[InitialCondition]
type = FunctionIC
function = '1 + x*x + y*y*y'
[]
[]
[fe_higher_order]
order = SECOND
[InitialCondition]
type = FunctionIC
function = '1 + x*x + y*y*y'
[]
[]
[fe_elemental]
family = MONOMIAL
order = SECOND
[InitialCondition]
type = FunctionIC
function = '1 + x*x + y*y*y'
[]
[]
[fv_var]
type = MooseVariableFVReal
[InitialCondition]
type = FunctionIC
function = '1 + x*x + y*y*y'
[]
[]
[]

[Functions]
[f]
type = ParsedFunction
value = '1 + x*x + y*y*y'
[]
[]

[Materials]
[two_piece]
type = ADPiecewiseByBlockFunctorMaterial
prop_name = 'mat'
subdomain_to_prop_value = '0 nodal 1 fv_var'
[]
[]

[Postprocessors]
[fe]
type = ADElementIntegralFunctorPostprocessor
functor = nodal
[]
[fe_higher_order]
type = ADElementIntegralFunctorPostprocessor
functor = fe_higher_order
[]
[fe_elemental]
type = ADElementIntegralFunctorPostprocessor
functor = fe_elemental
[]
[fv]
type = ADElementIntegralFunctorPostprocessor
functor = fv_var
[]
[function]
type = ElementIntegralFunctorPostprocessor
functor = f
prefactor = f
[]
[functor_matprop]
type = ADElementIntegralFunctorPostprocessor
functor = mat
[]
[]

[Outputs]
file_base = out
exodus = false
csv = true
[]
@@ -0,0 +1,3 @@
time,fe,fe_elemental,fe_higher_order,function,functor_matprop,fv
0,0,0,0,0,0,0
1,1.6875,1.5833333333333,1.5833333333333,2.6761848958333,1.609375,1.53125
12 changes: 12 additions & 0 deletions test/tests/postprocessors/element_integral/functors/tests
@@ -0,0 +1,12 @@
[Tests]
design = 'ElementIntegralFunctorPostprocessor.md'
issues = '#16099'

[element_integral]
type = 'CSVDiff'
input = 'element_integral_test.i'
csvdiff = 'out.csv'
requirement = 'The system shall compute the element integral of a functor'
ad_indexing_type = 'global'
[]
[]

0 comments on commit a8e3667

Please sign in to comment.