From 7b6572b483c13afd8668d5bd579198bc18d3f590 Mon Sep 17 00:00:00 2001 From: "Scheufler, Henning" Date: Thu, 9 Dec 2021 17:08:03 +0100 Subject: [PATCH] ENH: geometricVoF: added profiling --- .../advectionSchemes/isoAdvection/isoAdvection.C | 3 +++ .../advectionSchemes/isoAdvection/isoAdvectionTemplates.C | 3 +++ .../reconstructionSchemes/isoSchemes/isoAlpha/isoAlpha.C | 2 ++ .../reconstructionSchemes/plicSchemes/gradAlpha/gradAlpha.C | 4 +++- .../reconstructionSchemes/plicSchemes/plicRDF/plicRDF.C | 6 ++++++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/transportModels/geometricVoF/advectionSchemes/isoAdvection/isoAdvection.C b/src/transportModels/geometricVoF/advectionSchemes/isoAdvection/isoAdvection.C index 39d57acdfb..dc5cbeaece 100644 --- a/src/transportModels/geometricVoF/advectionSchemes/isoAdvection/isoAdvection.C +++ b/src/transportModels/geometricVoF/advectionSchemes/isoAdvection/isoAdvection.C @@ -39,6 +39,7 @@ License #include "meshTools.H" #include "OBJstream.H" #include "syncTools.H" +#include "profiling.H" #include "addToRunTimeSelectionTable.H" @@ -241,6 +242,7 @@ void Foam::isoAdvection::extendMarkedCells void Foam::isoAdvection::timeIntegratedFlux() { + addProfilingInFunction(geometricVoF); // Get time step const scalar dt = mesh_.time().deltaTValue(); @@ -607,6 +609,7 @@ void Foam::isoAdvection::checkIfOnProcPatch(const label facei) void Foam::isoAdvection::applyBruteForceBounding() { + addProfilingInFunction(geometricVoF); bool alpha1Changed = false; const scalar snapAlphaTol = dict_.getOrDefault("snapTol", 0); diff --git a/src/transportModels/geometricVoF/advectionSchemes/isoAdvection/isoAdvectionTemplates.C b/src/transportModels/geometricVoF/advectionSchemes/isoAdvection/isoAdvectionTemplates.C index cb5a071b84..cf2d4c0d4a 100644 --- a/src/transportModels/geometricVoF/advectionSchemes/isoAdvection/isoAdvectionTemplates.C +++ b/src/transportModels/geometricVoF/advectionSchemes/isoAdvection/isoAdvectionTemplates.C @@ -119,6 +119,7 @@ void Foam::isoAdvection::limitFluxes const SuType& Su ) { + addProfilingInFunction(geometricVoF); DebugInFunction << endl; const scalar aTol = 100*SMALL; // Note: tolerances @@ -232,6 +233,7 @@ void Foam::isoAdvection::boundFlux const SuType& Su ) { + addProfilingInFunction(geometricVoF); DebugInFunction << endl; scalar rDeltaT = 1/mesh_.time().deltaTValue(); @@ -389,6 +391,7 @@ void Foam::isoAdvection::boundFlux template void Foam::isoAdvection::advect(const SpType& Sp, const SuType& Su) { + addProfilingInFunction(geometricVoF); DebugInFunction << endl; if (mesh_.topoChanging()) diff --git a/src/transportModels/geometricVoF/reconstructionSchemes/isoSchemes/isoAlpha/isoAlpha.C b/src/transportModels/geometricVoF/reconstructionSchemes/isoSchemes/isoAlpha/isoAlpha.C index 8dcd46b87d..e73aa3bfb4 100644 --- a/src/transportModels/geometricVoF/reconstructionSchemes/isoSchemes/isoAlpha/isoAlpha.C +++ b/src/transportModels/geometricVoF/reconstructionSchemes/isoSchemes/isoAlpha/isoAlpha.C @@ -28,6 +28,7 @@ License #include "isoAlpha.H" #include "addToRunTimeSelectionTable.H" #include "cutCellPLIC.H" +#include "profiling.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -76,6 +77,7 @@ Foam::reconstruction::isoAlpha::isoAlpha void Foam::reconstruction::isoAlpha::reconstruct(bool forceUpdate) { + addProfilingInFunction(geometricVoF); const bool uptodate = alreadyReconstructed(forceUpdate); if (uptodate && !forceUpdate) diff --git a/src/transportModels/geometricVoF/reconstructionSchemes/plicSchemes/gradAlpha/gradAlpha.C b/src/transportModels/geometricVoF/reconstructionSchemes/plicSchemes/gradAlpha/gradAlpha.C index ea414981c8..14d899b4b3 100644 --- a/src/transportModels/geometricVoF/reconstructionSchemes/plicSchemes/gradAlpha/gradAlpha.C +++ b/src/transportModels/geometricVoF/reconstructionSchemes/plicSchemes/gradAlpha/gradAlpha.C @@ -29,7 +29,7 @@ License #include "fvc.H" #include "leastSquareGrad.H" #include "addToRunTimeSelectionTable.H" - +#include "profiling.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam @@ -46,6 +46,7 @@ namespace reconstruction void Foam::reconstruction::gradAlpha::gradSurf(const volScalarField& phi) { + addProfilingInFunction(geometricVoF); leastSquareGrad lsGrad("polyDegree1",mesh_.geometricD()); zoneDistribute& exchangeFields = zoneDistribute::New(mesh_); @@ -123,6 +124,7 @@ Foam::reconstruction::gradAlpha::gradAlpha void Foam::reconstruction::gradAlpha::reconstruct(bool forceUpdate) { + addProfilingInFunction(geometricVoF); const bool uptodate = alreadyReconstructed(forceUpdate); if (uptodate && !forceUpdate) diff --git a/src/transportModels/geometricVoF/reconstructionSchemes/plicSchemes/plicRDF/plicRDF.C b/src/transportModels/geometricVoF/reconstructionSchemes/plicSchemes/plicRDF/plicRDF.C index fd766484c2..dbdcb9b21a 100644 --- a/src/transportModels/geometricVoF/reconstructionSchemes/plicSchemes/plicRDF/plicRDF.C +++ b/src/transportModels/geometricVoF/reconstructionSchemes/plicSchemes/plicRDF/plicRDF.C @@ -30,6 +30,7 @@ License #include "fvc.H" #include "leastSquareGrad.H" #include "addToRunTimeSelectionTable.H" +#include "profiling.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -47,6 +48,7 @@ namespace reconstruction void Foam::reconstruction::plicRDF::interpolateNormal() { + addProfilingInFunction(geometricVoF); scalar dt = mesh_.time().deltaTValue(); zoneDistribute& exchangeFields = zoneDistribute::New(mesh_); @@ -159,6 +161,7 @@ void Foam::reconstruction::plicRDF::interpolateNormal() void Foam::reconstruction::plicRDF::gradSurf(const volScalarField& phi) { + addProfilingInFunction(geometricVoF); leastSquareGrad lsGrad("polyDegree1", mesh_.geometricD()); zoneDistribute& exchangeFields = zoneDistribute::New(mesh_); @@ -205,6 +208,7 @@ void Foam::reconstruction::plicRDF::gradSurf(const volScalarField& phi) void Foam::reconstruction::plicRDF::setInitNormals(bool interpolate) { + addProfilingInFunction(geometricVoF); zoneDistribute& exchangeFields = zoneDistribute::New(mesh_); interfaceLabels_.clear(); @@ -239,6 +243,7 @@ void Foam::reconstruction::plicRDF::calcResidual List& normalResidual ) { + addProfilingInFunction(geometricVoF); zoneDistribute& exchangeFields = zoneDistribute::New(mesh_); exchangeFields.setUpCommforZone(interfaceCell_,false); @@ -377,6 +382,7 @@ Foam::reconstruction::plicRDF::plicRDF void Foam::reconstruction::plicRDF::reconstruct(bool forceUpdate) { + addProfilingInFunction(geometricVoF); zoneDistribute& exchangeFields = zoneDistribute::New(mesh_); const bool uptodate = alreadyReconstructed(forceUpdate);