diff --git a/etc/caseDicts/postProcessing/catalyst/default.cfg b/etc/caseDicts/insitu/catalyst/catalyst.cfg similarity index 91% rename from etc/caseDicts/postProcessing/catalyst/default.cfg rename to etc/caseDicts/insitu/catalyst/catalyst.cfg index e9ace6b706..f3defd4b90 100644 --- a/etc/caseDicts/postProcessing/catalyst/default.cfg +++ b/etc/caseDicts/insitu/catalyst/catalyst.cfg @@ -5,7 +5,7 @@ | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ -// Insitu processing of finiteVolume fields with ParaView Catalyst +// Insitu processing with ParaView Catalyst type catalyst; libs ("libcatalystFoam.so"); diff --git a/etc/caseDicts/insitu/catalyst/printChannels.py b/etc/caseDicts/insitu/catalyst/printChannels.py new file mode 100644 index 0000000000..b9f4e61753 --- /dev/null +++ b/etc/caseDicts/insitu/catalyst/printChannels.py @@ -0,0 +1,68 @@ +from paraview.simple import * +from paraview import coprocessing + +# The frequency to output everything +outputfrequency = 1 + +# Simply print out all channel names that our function object is producing + +# ----------------------- CoProcessor definition ----------------------- + +def CreateCoProcessor(): + def _CreatePipeline(coprocessor, datadescription): + class Pipeline: + for i in range(datadescription.GetNumberOfInputDescriptions()): + name = datadescription.GetInputDescriptionName(i) + input = coprocessor.CreateProducer(datadescription, name) + grid = input.GetClientSideObject().GetOutputDataObject(0) + print "Channel <" + name + "> is", grid.GetClassName() + + return Pipeline() + + class CoProcessor(coprocessing.CoProcessor): + def CreatePipeline(self, datadescription): + self.Pipeline = _CreatePipeline(self, datadescription) + + return CoProcessor() + +#-------------------------------------------------------------- +# Global variables that will hold the pipeline for each timestep +# Creating the CoProcessor object, doesn't actually create the ParaView pipeline. +# It will be automatically setup when coprocessor.UpdateProducers() is called the +# first time. +coprocessor = CreateCoProcessor() + +#-------------------------------------------------------------- +# Enable Live-Visualizaton with ParaView +coprocessor.EnableLiveVisualization(False) + + +# ---------------------- Data Selection method ---------------------- + +def RequestDataDescription(datadescription): + "Callback to populate the request for current timestep" + global coprocessor + if datadescription.GetForceOutput() == True or datadescription.GetTimeStep() % outputfrequency == 0: + # We are just going to request all fields and meshes from the simulation + # code/adaptor. + for i in range(datadescription.GetNumberOfInputDescriptions()): + datadescription.GetInputDescription(i).AllFieldsOn() + datadescription.GetInputDescription(i).GenerateMeshOn() + return + + # setup requests for all inputs based on the requirements of the + # pipeline. + coprocessor.LoadRequestedData(datadescription) + +# ------------------------ Processing method ------------------------ + +def DoCoProcessing(datadescription): + "Callback to do co-processing for current timestep" + global coprocessor + + # Update the coprocessor by providing it the newly generated simulation data. + # If the pipeline hasn't been setup yet, this will setup the pipeline. + coprocessor.UpdateProducers(datadescription) + + # Write output data, if appropriate. + coprocessor.WriteData(datadescription); diff --git a/etc/caseDicts/insitu/catalyst/writeAll.py b/etc/caseDicts/insitu/catalyst/writeAll.py new file mode 100644 index 0000000000..658ae6e554 --- /dev/null +++ b/etc/caseDicts/insitu/catalyst/writeAll.py @@ -0,0 +1,77 @@ +from paraview.simple import * +from paraview import coprocessing + +# The frequency to output everything +outputfrequency = 5 + +# This is largely identical to the Catalyst allinputsgridwriter.py example +# but only handle vtkMultiBlockDataSet, since that is what we generate + +# ----------------------- CoProcessor definition ----------------------- + +def CreateCoProcessor(): + def _CreatePipeline(coprocessor, datadescription): + class Pipeline: + for i in range(datadescription.GetNumberOfInputDescriptions()): + name = datadescription.GetInputDescriptionName(i) + input = coprocessor.CreateProducer(datadescription, name) + grid = input.GetClientSideObject().GetOutputDataObject(0) + if grid.IsA('vtkMultiBlockDataSet'): + writer = servermanager.writers.XMLMultiBlockDataWriter(Input=input) + coprocessor.RegisterWriter(writer, filename=name+'_%t.vtm', freq=outputfrequency) + + return Pipeline() + + class CoProcessor(coprocessing.CoProcessor): + def CreatePipeline(self, datadescription): + self.Pipeline = _CreatePipeline(self, datadescription) + + return CoProcessor() + +#-------------------------------------------------------------- +# Global variables that will hold the pipeline for each timestep +# Creating the CoProcessor object, doesn't actually create the ParaView pipeline. +# It will be automatically setup when coprocessor.UpdateProducers() is called the +# first time. +coprocessor = CreateCoProcessor() + +#-------------------------------------------------------------- +# Enable Live-Visualizaton with ParaView +coprocessor.EnableLiveVisualization(False) + + +# ---------------------- Data Selection method ---------------------- + +def RequestDataDescription(datadescription): + "Callback to populate the request for current timestep" + global coprocessor + if datadescription.GetForceOutput() == True or datadescription.GetTimeStep() % outputfrequency == 0: + # We are just going to request all fields and meshes from the simulation + # code/adaptor. + for i in range(datadescription.GetNumberOfInputDescriptions()): + datadescription.GetInputDescription(i).AllFieldsOn() + datadescription.GetInputDescription(i).GenerateMeshOn() + return + + # setup requests for all inputs based on the requirements of the + # pipeline. + coprocessor.LoadRequestedData(datadescription) + +# ------------------------ Processing method ------------------------ + +def DoCoProcessing(datadescription): + "Callback to do co-processing for current timestep" + global coprocessor + + # Update the coprocessor by providing it the newly generated simulation data. + # If the pipeline hasn't been setup yet, this will setup the pipeline. + coprocessor.UpdateProducers(datadescription) + + # Write output data, if appropriate. + coprocessor.WriteData(datadescription); + + # Write image capture (Last arg: rescale lookup table), if appropriate. + coprocessor.WriteImages(datadescription, rescale_lookuptable=False) + + # Live Visualization, if enabled. + coprocessor.DoLiveVisualization(datadescription, "localhost", 22222) diff --git a/etc/caseDicts/insitu/catalyst/writeMesh.py b/etc/caseDicts/insitu/catalyst/writeMesh.py new file mode 100644 index 0000000000..a8517e26bb --- /dev/null +++ b/etc/caseDicts/insitu/catalyst/writeMesh.py @@ -0,0 +1,78 @@ +from paraview.simple import * +from paraview import coprocessing + +# The frequency to output everything +outputfrequency = 5 + +# As per writeAll, but only for "/mesh" sub-channels. + +# ----------------------- CoProcessor definition ----------------------- + +def CreateCoProcessor(): + def _CreatePipeline(coprocessor, datadescription): + class Pipeline: + for i in range(datadescription.GetNumberOfInputDescriptions()): + name = datadescription.GetInputDescriptionName(i) + if not name.endswith('/mesh'): + continue + input = coprocessor.CreateProducer(datadescription, name) + grid = input.GetClientSideObject().GetOutputDataObject(0) + if grid.IsA('vtkMultiBlockDataSet'): + writer = servermanager.writers.XMLMultiBlockDataWriter(Input=input) + coprocessor.RegisterWriter(writer, filename=name+'_%t.vtm', freq=outputfrequency) + + return Pipeline() + + class CoProcessor(coprocessing.CoProcessor): + def CreatePipeline(self, datadescription): + self.Pipeline = _CreatePipeline(self, datadescription) + + return CoProcessor() + +#-------------------------------------------------------------- +# Global variables that will hold the pipeline for each timestep +# Creating the CoProcessor object, doesn't actually create the ParaView pipeline. +# It will be automatically setup when coprocessor.UpdateProducers() is called the +# first time. +coprocessor = CreateCoProcessor() + +#-------------------------------------------------------------- +# Enable Live-Visualizaton with ParaView +coprocessor.EnableLiveVisualization(False) + + +# ---------------------- Data Selection method ---------------------- + +def RequestDataDescription(datadescription): + "Callback to populate the request for current timestep" + global coprocessor + if datadescription.GetForceOutput() == True or datadescription.GetTimeStep() % outputfrequency == 0: + # We are just going to request all fields and meshes from the simulation + # code/adaptor. + for i in range(datadescription.GetNumberOfInputDescriptions()): + datadescription.GetInputDescription(i).AllFieldsOn() + datadescription.GetInputDescription(i).GenerateMeshOn() + return + + # setup requests for all inputs based on the requirements of the + # pipeline. + coprocessor.LoadRequestedData(datadescription) + +# ------------------------ Processing method ------------------------ + +def DoCoProcessing(datadescription): + "Callback to do co-processing for current timestep" + global coprocessor + + # Update the coprocessor by providing it the newly generated simulation data. + # If the pipeline hasn't been setup yet, this will setup the pipeline. + coprocessor.UpdateProducers(datadescription) + + # Write output data, if appropriate. + coprocessor.WriteData(datadescription); + + # Write image capture (Last arg: rescale lookup table), if appropriate. + coprocessor.WriteImages(datadescription, rescale_lookuptable=False) + + # Live Visualization, if enabled. + coprocessor.DoLiveVisualization(datadescription, "localhost", 22222) diff --git a/etc/caseDicts/insitu/catalyst/writePatches.py b/etc/caseDicts/insitu/catalyst/writePatches.py new file mode 100644 index 0000000000..404267de18 --- /dev/null +++ b/etc/caseDicts/insitu/catalyst/writePatches.py @@ -0,0 +1,78 @@ +from paraview.simple import * +from paraview import coprocessing + +# The frequency to output everything +outputfrequency = 5 + +# As per writeAll, but only for "/patches" sub-channels. + +# ----------------------- CoProcessor definition ----------------------- + +def CreateCoProcessor(): + def _CreatePipeline(coprocessor, datadescription): + class Pipeline: + for i in range(datadescription.GetNumberOfInputDescriptions()): + name = datadescription.GetInputDescriptionName(i) + if not name.endswith('/patches'): + continue + input = coprocessor.CreateProducer(datadescription, name) + grid = input.GetClientSideObject().GetOutputDataObject(0) + if grid.IsA('vtkMultiBlockDataSet'): + writer = servermanager.writers.XMLMultiBlockDataWriter(Input=input) + coprocessor.RegisterWriter(writer, filename=name+'_%t.vtm', freq=outputfrequency) + + return Pipeline() + + class CoProcessor(coprocessing.CoProcessor): + def CreatePipeline(self, datadescription): + self.Pipeline = _CreatePipeline(self, datadescription) + + return CoProcessor() + +#-------------------------------------------------------------- +# Global variables that will hold the pipeline for each timestep +# Creating the CoProcessor object, doesn't actually create the ParaView pipeline. +# It will be automatically setup when coprocessor.UpdateProducers() is called the +# first time. +coprocessor = CreateCoProcessor() + +#-------------------------------------------------------------- +# Enable Live-Visualizaton with ParaView +coprocessor.EnableLiveVisualization(False) + + +# ---------------------- Data Selection method ---------------------- + +def RequestDataDescription(datadescription): + "Callback to populate the request for current timestep" + global coprocessor + if datadescription.GetForceOutput() == True or datadescription.GetTimeStep() % outputfrequency == 0: + # We are just going to request all fields and meshes from the simulation + # code/adaptor. + for i in range(datadescription.GetNumberOfInputDescriptions()): + datadescription.GetInputDescription(i).AllFieldsOn() + datadescription.GetInputDescription(i).GenerateMeshOn() + return + + # setup requests for all inputs based on the requirements of the + # pipeline. + coprocessor.LoadRequestedData(datadescription) + +# ------------------------ Processing method ------------------------ + +def DoCoProcessing(datadescription): + "Callback to do co-processing for current timestep" + global coprocessor + + # Update the coprocessor by providing it the newly generated simulation data. + # If the pipeline hasn't been setup yet, this will setup the pipeline. + coprocessor.UpdateProducers(datadescription) + + # Write output data, if appropriate. + coprocessor.WriteData(datadescription); + + # Write image capture (Last arg: rescale lookup table), if appropriate. + coprocessor.WriteImages(datadescription, rescale_lookuptable=False) + + # Live Visualization, if enabled. + coprocessor.DoLiveVisualization(datadescription, "localhost", 22222) diff --git a/etc/caseDicts/postProcessing/catalyst/area.cfg b/etc/caseDicts/postProcessing/catalyst/area.cfg deleted file mode 100644 index 2f6850f995..0000000000 --- a/etc/caseDicts/postProcessing/catalyst/area.cfg +++ /dev/null @@ -1,16 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: plus | -| \\ / A nd | Web: www.OpenFOAM.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -// Insitu processing of finiteArea fields with ParaView Catalyst - -type catalyst::area; -libs ("libcatalystFoam.so"); - -executeControl timeStep; -writeControl none; - -// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/catalyst/cloud.cfg b/etc/caseDicts/postProcessing/catalyst/cloud.cfg deleted file mode 100644 index d860e901a9..0000000000 --- a/etc/caseDicts/postProcessing/catalyst/cloud.cfg +++ /dev/null @@ -1,16 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: plus | -| \\ / A nd | Web: www.OpenFOAM.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -// Insitu processing of lagrangian clouds with ParaView Catalyst - -type catalyst::cloud; -libs ("libcatalystFoam.so"); - -executeControl timeStep; -writeControl none; - -// ************************************************************************* // diff --git a/etc/config.csh/example/paraview b/etc/config.csh/example/paraview index 98d7ad3cd8..d2c0ba0b14 100644 --- a/etc/config.csh/example/paraview +++ b/etc/config.csh/example/paraview @@ -13,8 +13,8 @@ # config.csh/example/paraview # # Description -# Example of defining a different ParaView_VERSION but retaining -# the standard config.csh/paraview mechanism +# Example of defining a different ParaView_VERSION but retaining the +# standard config.csh/paraview mechanism # # Note # This file could be copied to a user or site location, but should never @@ -25,7 +25,8 @@ set pv=5.5.0 set pv=5.5.0-mpipy +set qt=qt-5.9.0 -eval `foamEtcFile -csh -config -mode=o paraview -- ParaView_VERSION=$pv` +eval `foamEtcFile -csh -config -mode=o paraview -- ParaView_VERSION=$pv ParaView_QT=$qt` #------------------------------------------------------------------------------ diff --git a/etc/config.csh/paraview b/etc/config.csh/paraview index c3710b59fe..19239e6980 100644 --- a/etc/config.csh/paraview +++ b/etc/config.csh/paraview @@ -120,8 +120,16 @@ if ( $?ParaView_VERSION ) then #OBSOLETE? endif # QT libraries as required + # Set Qt5_DIR to root directory. + # Another possibility: "qtpaths --qt-version" + set qtDir="$archDir/$ParaView_QT" if ( -d "$qtDir" ) then + switch ($ParaView_QT) + case *-qt*: + setenv Qt5_DIR $qtDir + breaksw + endsw foreach qtLibDir ("$qtDir/lib$WM_COMPILER_LIB_ARCH" "$qtDir/lib") if ( -d "$qtLibDir" ) then setenv LD_LIBRARY_PATH "${qtLibDir}:${LD_LIBRARY_PATH}" diff --git a/etc/config.csh/unset b/etc/config.csh/unset index 9d4a22b6b6..92cef08d00 100644 --- a/etc/config.csh/unset +++ b/etc/config.csh/unset @@ -111,6 +111,7 @@ unsetenv ParaView_INCLUDE_DIR unsetenv ParaView_VERSION unsetenv PV_PLUGIN_PATH unsetenv VTK_DIR +unsetenv Qt5_DIR # Perhaps only unset if it is in WM_THIRD_PARTY_DIR? #------------------------------------------------------------------------------ # Unset other ThirdParty environment variables diff --git a/etc/config.sh/example/paraview b/etc/config.sh/example/paraview index c1526e8c54..fb91cc1699 100644 --- a/etc/config.sh/example/paraview +++ b/etc/config.sh/example/paraview @@ -13,8 +13,8 @@ # config.sh/example/paraview # # Description -# Example of defining a different ParaView_VERSION but retaining -# the standard config.sh/paraview mechanism +# Example of defining a different ParaView_VERSION but retaining the +# standard config.sh/paraview mechanism # # Note # This file could be copied to a user or site location, but should never @@ -25,7 +25,8 @@ pv=5.5.0 pv=5.5.0-mpipy +qt=qt-5.9.0 -eval $(foamEtcFile -sh -config -mode=o paraview -- ParaView_VERSION=$pv) +eval $(foamEtcFile -sh -config -mode=o paraview -- ParaView_VERSION=$pv ParaView_QT=$qt) #------------------------------------------------------------------------------ diff --git a/etc/config.sh/paraview b/etc/config.sh/paraview index 553378c472..33a8b32755 100644 --- a/etc/config.sh/paraview +++ b/etc/config.sh/paraview @@ -127,10 +127,16 @@ then #OBSOLETE? export PYTHONPATH=$PYTHONPATH:${PYTHONPATH:+:}$pvPython:$pvLibDir #OBSOLETE? fi - # QT libraries as required + # QT libraries as required, and Qt5_DIR for the root directory. + # Another possibility: "qtpaths --qt-version" qtDir="$archDir/$ParaView_QT" if [ -d "$qtDir" ] then + case "$ParaView_QT" in + *-5*) + export Qt5_DIR=$qtDir + ;; + esac for qtLibDir in $qtDir/lib$WM_COMPILER_LIB_ARCH $qtDir/lib do if [ -d "$qtLibDir" ] diff --git a/etc/config.sh/unset b/etc/config.sh/unset index 024ba63160..09aa585579 100644 --- a/etc/config.sh/unset +++ b/etc/config.sh/unset @@ -97,7 +97,6 @@ then unset OPAL_PREFIX fi - #------------------------------------------------------------------------------ # Unset Ensight/ParaView-related environment variables @@ -108,6 +107,12 @@ unset ParaView_VERSION unset PV_PLUGIN_PATH unset VTK_DIR +# Undefine Qt5_DIR if set to one of the paths on foamOldDirs +if [ -z "$($foamClean -env=Qt5_DIR "$foamOldDirs")" ] +then + unset Qt5_DIR +fi + #------------------------------------------------------------------------------ # Unset other ThirdParty environment variables diff --git a/etc/controlDict b/etc/controlDict index 98a281c5d3..704374a5fa 100644 --- a/etc/controlDict +++ b/etc/controlDict @@ -39,8 +39,8 @@ InfoSwitches writeDictionaries 0; writeOptionalEntries 0; - // Write lagrangian "positions" file in v1706 format (at earlier) - writeLagrangianPositions 0; + // Write lagrangian "positions" file in v1706 format (and earlier) + writeLagrangianPositions 1; // Report hosts used (parallel) // - 0 = none diff --git a/modules/avalanche b/modules/avalanche index 99e68179fa..6e6e105844 160000 --- a/modules/avalanche +++ b/modules/avalanche @@ -1 +1 @@ -Subproject commit 99e68179fa946476f0be4f957f8d6a2b78887925 +Subproject commit 6e6e105844897d4bf780bbc8d14031bc827e4b04 diff --git a/modules/catalyst b/modules/catalyst index 3c0a2e7959..5828d45108 160000 --- a/modules/catalyst +++ b/modules/catalyst @@ -1 +1 @@ -Subproject commit 3c0a2e7959755a84f48e25bbe3436ec6437f7cf6 +Subproject commit 5828d4510816948b034aa9afdf0b7b05659a9f59 diff --git a/modules/cfmesh b/modules/cfmesh index 8f6e65ae7c..288f05e08f 160000 --- a/modules/cfmesh +++ b/modules/cfmesh @@ -1 +1 @@ -Subproject commit 8f6e65ae7c71a95948b53679e57a73899b1dc999 +Subproject commit 288f05e08f07e693d4222e7b84ea12430947e5bf diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctions.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctions.C index 4113b1d752..ff44c9ab37 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctions.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctions.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -86,6 +86,7 @@ void pow gf.oriented() = pow(gf1.oriented(), r); } + template < class Type, @@ -181,6 +182,7 @@ void sqr gf.oriented() = sqr(gf1.oriented()); } + template class PatchField, class GeoMesh> tmp < @@ -217,6 +219,7 @@ sqr(const GeometricField& gf) return tSqr; } + template class PatchField, class GeoMesh> tmp < @@ -270,6 +273,7 @@ void magSqr gsf.oriented() = magSqr(gf.oriented()); } + template class PatchField, class GeoMesh> tmp> magSqr ( @@ -343,6 +347,7 @@ void mag gsf.oriented() = mag(gf.oriented()); } + template class PatchField, class GeoMesh> tmp> mag ( @@ -458,6 +463,7 @@ cmptAv(const GeometricField& gf) return CmptAv; } + template class PatchField, class GeoMesh> tmp < @@ -500,7 +506,7 @@ cmptAv(const tmp>& tgf) } -#define UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(returnType, func, gFunc) \ +#define UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(returnType, func, binaryOp) \ \ template class PatchField, class GeoMesh> \ dimensioned func \ @@ -512,7 +518,15 @@ dimensioned func \ ( \ #func "(" + gf.name() + ')', \ gf.dimensions(), \ - Foam::func(gFunc(gf.primitiveField()), gFunc(gf.boundaryField())) \ + returnReduce \ + ( \ + Foam::func \ + ( \ + Foam::func(gf.primitiveField()), \ + Foam::func(gf.boundaryField()) \ + ), \ + binaryOp() \ + ) \ ); \ } \ \ @@ -527,8 +541,8 @@ dimensioned func \ return res; \ } -UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(Type, max, gMax) -UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(Type, min, gMin) +UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(Type, max, maxOp) +UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(Type, min, minOp) #undef UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctions.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctions.H index a98f4a6083..63cdbdd8a9 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctions.H +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctions.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -212,7 +212,7 @@ tmp cmptAv(const tmp>& tgf); -#define UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(returnType, func, gFunc) \ +#define UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(returnType, func, binaryOp) \ \ template class PatchField, class GeoMesh> \ dimensioned func \ @@ -226,8 +226,8 @@ dimensioned func \ const tmp>& tgf1 \ ); -UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(Type, max, gMax) -UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(Type, min, gMin) +UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(Type, max, maxOp) +UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(Type, min, minOp) #undef UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C index cd2fac95cb..8bf7480557 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C @@ -266,7 +266,7 @@ Foam::faceZone::faceZone ( const word& name, const labelUList& addr, - const boolList& fm, + const boolUList& fm, const label index, const faceZoneMesh& zm ) @@ -328,7 +328,7 @@ Foam::faceZone::faceZone ( const faceZone& origZone, const labelUList& addr, - const boolList& fm, + const boolUList& fm, const label index, const faceZoneMesh& zm ) @@ -468,7 +468,7 @@ void Foam::faceZone::resetAddressing void Foam::faceZone::resetAddressing ( const labelUList& addr, - const boolList& flipMap + const boolUList& flipMap ) { clearAddressing(); diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H index 50a06cc512..770e018b10 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H @@ -177,7 +177,7 @@ public: ( const word& name, const labelUList& addr, - const boolList& fm, + const boolUList& fm, const label index, const faceZoneMesh& zm ); @@ -208,7 +208,7 @@ public: ( const faceZone& origZone, const labelUList& addr, - const boolList& fm, + const boolUList& fm, const label index, const faceZoneMesh& zm ); @@ -236,7 +236,7 @@ public: virtual autoPtr clone ( const labelUList& addr, - const boolList& fm, + const boolUList& fm, const label index, const faceZoneMesh& zm ) const @@ -309,7 +309,7 @@ public: virtual void resetAddressing ( const labelUList& addr, - const boolList& flipMap + const boolUList& flipMap ); //- Move reset addressing - use uniform flip map value diff --git a/src/Pstream/mpi/Make/options b/src/Pstream/mpi/Make/options index 43a48312c4..8fcb7016f8 100644 --- a/src/Pstream/mpi/Make/options +++ b/src/Pstream/mpi/Make/options @@ -1,5 +1,5 @@ sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB) -sinclude $(RULES)/mplib$(WM_MPLIB) +sinclude $(DEFAULT_RULES)/mplib$(WM_MPLIB) EXE_INC = $(PFLAGS) $(PINC) $(c++LESSWARN) LIB_LIBS = $(PLIBS) diff --git a/src/conversion/vtk/part/foamVtuSizingTemplates.C b/src/conversion/vtk/part/foamVtuSizingTemplates.C index 4bfda81ac6..b070ab67da 100644 --- a/src/conversion/vtk/part/foamVtuSizingTemplates.C +++ b/src/conversion/vtk/part/foamVtuSizingTemplates.C @@ -571,7 +571,8 @@ void Foam::vtk::vtuSizing::populateArrays if (output == contentType::LEGACY) { // Update size for legacy face stream - faceOutput[startLabel] = (faceIndexer - startLabel); + // (subtract 1 to avoid counting the storage location) + faceOutput[startLabel] = (faceIndexer - 1 - startLabel); } else { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C index ebe4ebdd58..89c1ce0008 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C @@ -75,7 +75,7 @@ swirlFlowRateInletVelocityFvPatchVectorField dict.lookupOrDefault ( "axis", - patch().size() + returnReduce(patch().size(), maxOp