From c301cf49a12c19ef8e64ed3305fd24e87836880a Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 8 Oct 2008 07:52:08 +0100 Subject: [PATCH] parallel postChannel --- .../miscellaneous/postChannel/Make/options | 2 + .../miscellaneous/postChannel/channelIndex.C | 307 ++++++++++++++------- .../miscellaneous/postChannel/channelIndex.H | 112 +++++--- .../postChannel/channelIndexTemplates.C | 101 +++++++ .../miscellaneous/postChannel/collapse.H | 8 +- .../miscellaneous/postChannel/postChannel.C | 15 +- .../miscellaneous/postChannel/postChannelDict | 15 +- .../miscellaneous/postChannel/sumData.C | 49 ++++ .../miscellaneous/postChannel/sumData.H | 200 ++++++++++++++ .../miscellaneous/postChannel/sumDataI.H | 227 +++++++++++++++ .../channel395/constant/postChannelDict | 14 +- 11 files changed, 894 insertions(+), 156 deletions(-) create mode 100644 applications/utilities/postProcessing/miscellaneous/postChannel/channelIndexTemplates.C create mode 100644 applications/utilities/postProcessing/miscellaneous/postChannel/sumData.C create mode 100644 applications/utilities/postProcessing/miscellaneous/postChannel/sumData.H create mode 100644 applications/utilities/postProcessing/miscellaneous/postChannel/sumDataI.H diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/Make/options b/applications/utilities/postProcessing/miscellaneous/postChannel/Make/options index d38cd8b..b90b6fd 100644 --- a/applications/utilities/postProcessing/miscellaneous/postChannel/Make/options +++ b/applications/utilities/postProcessing/miscellaneous/postChannel/Make/options @@ -1,7 +1,9 @@ EXE_INC = \ + -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ + -lmeshTools \ -lfiniteVolume \ -lsampling diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C index 74315de..cdba8c0 100644 --- a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C +++ b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C @@ -25,156 +25,269 @@ License \*---------------------------------------------------------------------------*/ #include "channelIndex.H" +#include "boolList.H" +#include "syncTools.H" +#include "OFstream.H" +#include "meshTools.H" +#include "Time.H" +#include "SortableList.H" -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * // -channelIndex::channelIndex(const fvMesh& m) -: - indexingDict_ - ( - IOobject - ( - "postChannelDict", - m.time().constant(), - m, - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ), - nx_(readLabel(indexingDict_.lookup("Nx"))), - ny_(indexingDict_.lookup("Ny")), - nz_(readLabel(indexingDict_.lookup("Nz"))), - symmetric_ - ( - readBool(indexingDict_.lookup("symmetric")) - ), - cumNy_(ny_.size()), - nLayers_(ny_[0]) +template<> +const char* Foam::NamedEnum::names[] = { - // initialise the layers - cumNy_[0] = ny_[0]; - - for (label j=1; j + Foam::channelIndex::vectorComponentsNames_; -channelIndex::~channelIndex() -{} +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -scalarField channelIndex::collapse +// Determines face blocking +void Foam::channelIndex::walkOppositeFaces ( - const volScalarField& vsf, - const bool asymmetric -) const + const polyMesh& mesh, + const labelList& startFaces, + boolList& blockedFace +) { - scalarField cs(nLayers(), 0.0); + const cellList& cells = mesh.cells(); + const faceList& faces = mesh.faces(); + label nBnd = mesh.nFaces() - mesh.nInternalFaces(); + + DynamicList