Skip to content

Commit

Permalink
Set subdomain ID in LineMaterialSamplerBase
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuahansel authored and jain651 committed Apr 19, 2021
1 parent 7a13e9d commit 0588964
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 12 deletions.
Expand Up @@ -172,6 +172,7 @@ LineMaterialSamplerBase<T>::execute()
if (!hasBlocks(elem->subdomain_id()))
continue;

_subproblem.setCurrentSubdomainID(elem, _tid);
_subproblem.prepare(elem, _tid);
_subproblem.reinitElem(elem, _tid);

Expand Down Expand Up @@ -205,4 +206,3 @@ LineMaterialSamplerBase<T>::finalize()
{
SamplerBase::finalize();
}

@@ -1,13 +1,30 @@
[Mesh]
type = GeneratedMesh
parallel_type = replicated # Until RayTracing.C is fixed
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 4
ny = 4
[genmesh]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 4
ny = 4
[]
[mesh0]
type = SubdomainBoundingBoxGenerator
input = genmesh
block_id = 0
location = INSIDE
bottom_left = '0 0 0'
top_right = '1 0.5 0'
[]
[mesh01]
type = SubdomainBoundingBoxGenerator
input = mesh0
block_id = 1
location = INSIDE
bottom_left = '0 0.5 0'
top_right = '1 1 0'
[]
[]

[Variables]
Expand Down Expand Up @@ -71,7 +88,7 @@
[Materials]
[./mat]
type = MTMaterial
block = 0
block = '0 1'
[../]
[]

Expand Down
3 changes: 2 additions & 1 deletion test/tests/vectorpostprocessors/line_material_sampler/tests
Expand Up @@ -4,9 +4,10 @@
input = 'line_material_real_sampler.i'
csvdiff = 'out_mat_0001.csv'
compiler = '!INTEL'
mesh_mode = 'REPLICATED'

requirement = 'The system shall support the ability to sample a scalar material along an arbitrary line through the mesh domain.'
design = 'LineMaterialRealSampler.md'
issues = '#4462'
issues = '#4462 #16959'
[../]
[]

0 comments on commit 0588964

Please sign in to comment.