-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't add redundant GhostBoundary objects
Closes #28330
- Loading branch information
Showing
7 changed files
with
124 additions
and
3 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
test/include/userobjects/TestGhostBoundarySideUserObject.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//* This file is part of the MOOSE framework | ||
//* https://www.mooseframework.org | ||
//* | ||
//* All rights reserved, see COPYRIGHT for full restrictions | ||
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT | ||
//* | ||
//* Licensed under LGPL 2.1, please see LICENSE for details | ||
//* https://www.gnu.org/licenses/lgpl-2.1.html | ||
|
||
#pragma once | ||
|
||
#include "SideUserObject.h" | ||
|
||
class TestGhostBoundarySideUserObject : public SideUserObject | ||
{ | ||
public: | ||
static InputParameters validParams(); | ||
|
||
TestGhostBoundarySideUserObject(const InputParameters & parameters); | ||
virtual void initialize() override {} | ||
virtual void execute() override {} | ||
virtual void finalize() override {} | ||
virtual void threadJoin(const UserObject &) override {} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//* This file is part of the MOOSE framework | ||
//* https://www.mooseframework.org | ||
//* | ||
//* All rights reserved, see COPYRIGHT for full restrictions | ||
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT | ||
//* | ||
//* Licensed under LGPL 2.1, please see LICENSE for details | ||
//* https://www.gnu.org/licenses/lgpl-2.1.html | ||
|
||
#include "TestGhostBoundarySideUserObject.h" | ||
#include "MooseMesh.h" | ||
|
||
registerMooseObject("MooseTestApp", TestGhostBoundarySideUserObject); | ||
|
||
InputParameters | ||
TestGhostBoundarySideUserObject::validParams() | ||
{ | ||
InputParameters params = SideUserObject::validParams(); | ||
params.addRelationshipManager("GhostBoundary", | ||
Moose::RelationshipManagerType::GEOMETRIC, | ||
[](const InputParameters & obj_params, InputParameters & rm_params) | ||
{ | ||
rm_params.set<std::vector<BoundaryName>>("boundary") = | ||
obj_params.get<std::vector<BoundaryName>>("boundary"); | ||
}); | ||
return params; | ||
} | ||
|
||
TestGhostBoundarySideUserObject::TestGhostBoundarySideUserObject(const InputParameters & parameters) | ||
: SideUserObject(parameters) | ||
{ | ||
} |
3 changes: 3 additions & 0 deletions
3
test/tests/relationship_managers/ghost_boundary/gold/test_out.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
time,num_rms | ||
0,0 | ||
1,2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
[Mesh] | ||
[gen] | ||
type = GeneratedMeshGenerator | ||
dim = 2 | ||
nx = 5 | ||
ny = 5 | ||
[] | ||
[] | ||
|
||
[UserObjects] | ||
[all] | ||
type = TestGhostBoundarySideUserObject | ||
boundary = 'left right top bottom' | ||
[] | ||
[some] | ||
type = TestGhostBoundarySideUserObject | ||
boundary = 'left right' | ||
[] | ||
[] | ||
|
||
[Postprocessors] | ||
[num_rms] | ||
type = NumRelationshipManagers | ||
rm_type = 'geometric' | ||
[] | ||
[] | ||
|
||
[Problem] | ||
solve = false | ||
[] | ||
|
||
[Executioner] | ||
type = Steady | ||
[] | ||
|
||
[Outputs] | ||
[info] | ||
type = Console | ||
system_info = 'relationship' | ||
[] | ||
csv = true | ||
[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[Tests] | ||
design = 'RelationshipManager.md' | ||
issues = '#28330' | ||
[test] | ||
type = CSVDiff | ||
input = test.i | ||
csvdiff = test_out.csv | ||
requirement = 'The system shall not add a relationship manager ghosting boundaries that are a subset of the boundaries ghosted by another relationship manager.' | ||
[] | ||
[] |