Skip to content

Commit

Permalink
Merge pull request #28662 from GiudGiud/PR_fix_pro
Browse files Browse the repository at this point in the history
More robust check on which elements are lower D
  • Loading branch information
loganharbour authored Sep 22, 2024
2 parents 8543df8 + d1dac11 commit 1da09a0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
6 changes: 4 additions & 2 deletions framework/src/auxkernels/ProjectionAux.C
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ ProjectionAux::computeValue()
const auto & elem = _mesh.elemPtr(id);
const auto block_id = elem->subdomain_id();
// Only use higher D elements
if (_source_variable.hasBlocks(block_id) && !_mesh.isLowerD(block_id) &&
if (_source_variable.hasBlocks(block_id) &&
(!_mesh.isLowerD(block_id) && elem->dim() == _mesh.dimension()) &&
(!_use_block_restriction_for_source || hasBlocks(block_id)))
{
const auto elem_volume = elem->volume();
Expand All @@ -114,7 +115,8 @@ ProjectionAux::elemOnNodeVariableIsDefinedOn() const
{
const auto & elem = _mesh.elemPtr(elem_id);
const auto block_id = elem->subdomain_id();
if (_source_variable.hasBlocks(block_id) && !_mesh.isLowerD(block_id) &&
if (_source_variable.hasBlocks(block_id) &&
(!_mesh.isLowerD(block_id) && elem->dim() == _mesh.dimension()) &&
(!_use_block_restriction_for_source || hasBlocks(block_id)))
return elem;
}
Expand Down
7 changes: 6 additions & 1 deletion test/tests/auxkernels/projection_aux/2d_and_lower_d.i
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
type = FileMeshGenerator
file = 'mesh/cube.e'
[]
[remove_low_low_D]
type = BlockDeletionGenerator
input = cube
block = 2
[]
second_order = true
allow_renumbering = false
[]
Expand All @@ -15,7 +20,6 @@
[]
family = MONOMIAL
order = CONSTANT
block = 0
[]
[u_nodal]
[InitialCondition]
Expand All @@ -27,6 +31,7 @@
order = SECOND
[]
[v_low]
block = 0
[]
[]

Expand Down
Binary file modified test/tests/auxkernels/projection_aux/gold/2d_and_lower_d_out.e
Binary file not shown.
Binary file not shown.

0 comments on commit 1da09a0

Please sign in to comment.