Skip to content

Commit

Permalink
a test for checking the material property coverage with DG idaholab#9482
Browse files Browse the repository at this point in the history
  • Loading branch information
YaqiWang committed Jul 14, 2017
1 parent a374dc6 commit b674654
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 0 deletions.
88 changes: 88 additions & 0 deletions test/tests/dgkernels/2d_diffusion_dg/dg_material_coverage.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]

[Debug]
show_material_props = true
[]

[MeshModifiers]
[./subdomain1]
type = SubdomainBoundingBox
bottom_left = '0 0 0'
top_right = '0.5 0.5 0'
block_id = 1
[../]
[]

[Variables]
[./u]
order = FIRST
family = MONOMIAL
[../]
[]

[Kernels]
[./diff]
type = DiffMKernel
variable = u
mat_prop = prop1
offset = 0
[../]
[./force]
type = BodyForce
variable = u
[../]
[]

[DGKernels]
[./dgdiffusion]
type = DGDiffusion
variable = u
epsilon = 1
sigma = 4
diff = prop2
[../]
[]

[BCs]
[./vacuum]
type = VacuumBC
variable = u
boundary = 'left right top bottom'
[../]
[]

[Materials]
[./mat1]
type = GenericConstantMaterial
block = '0 1'
prop_names = 'prop1'
prop_values = '1'
[../]
[./mat2]
type = GenericConstantMaterial
# missing block 0 here, we should see an error!
block = '1'
prop_names = 'prop2'
prop_values = '2'
[../]
[]

[Postprocessors]
[./unorm]
type = ElementL2Norm
variable = u
[../]
[]

[Executioner]
type = Steady
[]

[Outputs]
exodus = true
[]
5 changes: 5 additions & 0 deletions test/tests/dgkernels/2d_diffusion_dg/tests
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@
group = 'requirements adaptive'
max_parallel = 1
[../]
[./coverage_test]
type = 'RunException'
input = 'dg_material_coverage.i'
expect_err = "Material property 'prop2', requested by 'dgdiffusion' is not defined on block 0"
[../]
[]

0 comments on commit b674654

Please sign in to comment.