Skip to content

Commit 90b0b16

Browse files
committed
Adds mooseWarning for when a moving OpenMC problem is detected, but the moose mesh is fixed.
closes #1335
1 parent 0b1ff57 commit 90b0b16

3 files changed

Lines changed: 23 additions & 6 deletions

File tree

include/base/OpenMCProblemBase.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,12 @@ class OpenMCProblemBase : public CardinalProblem, public PostprocessorInterface
437437
/// Whether OpenMC cell transforms are being applied to the geometry
438438
bool hasCellTransform() const;
439439

440+
/**
441+
* Whether the OpenMC geometry is being moved by a cell transform
442+
* or a geometry changing criticality search
443+
*/
444+
bool movesOpenMCGeometry() const;
445+
440446
/// Ensure that the IDs of OpenMC objects in UserObjects don't clash
441447
void checkOpenMCUserObjectIDs() const;
442448

src/base/OpenMCCellAverageProblem.C

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -569,12 +569,17 @@ OpenMCCellAverageProblem::initialSetup()
569569

570570
getOpenMCUserObjects();
571571

572-
if (_use_displaced && !_using_skinner && !hasCellTransform())
573-
mooseWarning("Your problem has a moving mesh, but you have not provided a 'skinner' or an "
574-
"OpenMCCellTransform user object (both of which move the OpenMC geometry). The "
575-
"[Mesh] will move, but the underlying OpenMC geometry will remain unchanged. "
576-
"Unexpected behavior may occur.");
577-
572+
if (_use_displaced && !_using_skinner && !movesOpenMCGeometry())
573+
mooseWarning("Your problem has a moving mesh, but you have not provided a 'skinner', an "
574+
"OpenMCCellTransform user object, or a geometry changing criticality search "
575+
"(all of which move the OpenMC geometry). The [Mesh] will move, but the "
576+
"underlying OpenMC geometry will remain unchanged. Unexpected behavior may "
577+
"occur.");
578+
else if (!_use_displaced && movesOpenMCGeometry())
579+
mooseWarning("The OpenMC geometry is being moved (via an OpenMCCellTransform user object "
580+
"or a geometry changing criticality search), but your problem has a fixed "
581+
"mesh. The underlying OpenMC geometry will change, but the [Mesh] will not "
582+
"move. Unexpected behavior may occur.");
578583
// Coupling re-initialization should be triggered if we have cell transforms which can happen
579584
// even if the mesh isn't moving or adaptive.
580585
_need_to_reinit_coupling |= hasCellTransform();

src/base/OpenMCProblemBase.C

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -989,6 +989,12 @@ OpenMCProblemBase::hasCellTransform() const
989989
return !_cell_transform_uos.empty();
990990
}
991991

992+
bool
993+
OpenMCProblemBase::movesOpenMCGeometry() const
994+
{
995+
return hasCellTransform() || (_criticality_search && _criticality_search->changingGeometry());
996+
}
997+
992998
void
993999
OpenMCProblemBase::checkOpenMCUserObjectIDs() const
9941000
{

0 commit comments

Comments
 (0)