Skip to content
Snippets Groups Projects
Commit 513fe05c authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: GeometricBoundaryField - added evaluateSelected function

Provides a mechanism to update specific boundary conditions
parent 6c0ee5d1
No related branches found
No related tags found
No related merge requests found
......@@ -645,6 +645,29 @@ void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::evaluate()
}
template<class Type, template<class> class PatchField, class GeoMesh>
void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::evaluateSelected
(
const UList<label>& patchIDs
)
{
for (const label patchi : patchIDs)
{
auto& pf = (*this)[patchi];
DebugInfo<< "Updating " << pf.patch().name() << endl;
const label startOfRequests = UPstream::nRequests();
pf.initEvaluate(UPstream::commsTypes::nonBlocking);
UPstream::waitRequests(startOfRequests);
pf.evaluate(UPstream::commsTypes::nonBlocking);
}
}
template<class Type, template<class> class PatchField, class GeoMesh>
void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::evaluateLocal()
{
......
......@@ -196,6 +196,9 @@ public:
template<class CoupledPatchType>
void evaluateCoupled();
//- Evaluate boundary conditions for selected patches
void evaluateSelected(const UList<label>& patchIDs);
//- Return a list of the patch types
wordList types() const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment