diff --git a/framework/src/auxkernels/ProjectionAux.C b/framework/src/auxkernels/ProjectionAux.C index 5494c1d82f9d..615c84e8906b 100644 --- a/framework/src/auxkernels/ProjectionAux.C +++ b/framework/src/auxkernels/ProjectionAux.C @@ -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(); @@ -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; } diff --git a/test/tests/auxkernels/projection_aux/2d_and_lower_d.i b/test/tests/auxkernels/projection_aux/2d_and_lower_d.i index 34908d066035..2d062bd4a213 100644 --- a/test/tests/auxkernels/projection_aux/2d_and_lower_d.i +++ b/test/tests/auxkernels/projection_aux/2d_and_lower_d.i @@ -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 [] @@ -15,7 +20,6 @@ [] family = MONOMIAL order = CONSTANT - block = 0 [] [u_nodal] [InitialCondition] @@ -27,6 +31,7 @@ order = SECOND [] [v_low] + block = 0 [] [] diff --git a/test/tests/auxkernels/projection_aux/gold/2d_and_lower_d_out.e b/test/tests/auxkernels/projection_aux/gold/2d_and_lower_d_out.e index 017549d6e62a..ebb5b6c4ef58 100644 Binary files a/test/tests/auxkernels/projection_aux/gold/2d_and_lower_d_out.e and b/test/tests/auxkernels/projection_aux/gold/2d_and_lower_d_out.e differ diff --git a/test/tests/auxkernels/projection_aux/gold/2d_restrict_source.e b/test/tests/auxkernels/projection_aux/gold/2d_restrict_source.e deleted file mode 100644 index 51725e37821c..000000000000 Binary files a/test/tests/auxkernels/projection_aux/gold/2d_restrict_source.e and /dev/null differ diff --git a/test/tests/auxkernels/projection_aux/gold/2d_restrict_source.e b/test/tests/auxkernels/projection_aux/gold/2d_restrict_source.e new file mode 120000 index 000000000000..e7528db1ecd8 --- /dev/null +++ b/test/tests/auxkernels/projection_aux/gold/2d_restrict_source.e @@ -0,0 +1 @@ +2d_and_lower_d_out.e \ No newline at end of file