diff --git a/applications/test/boundBox/Make/files b/applications/test/boundBox/Make/files
new file mode 100644
index 0000000000..ebb8e6fb12
--- /dev/null
+++ b/applications/test/boundBox/Make/files
@@ -0,0 +1,3 @@
+Test-boundBox.C
+
+EXE = $(FOAM_USER_APPBIN)/Test-boundBox
diff --git a/applications/test/boundBox/Make/options b/applications/test/boundBox/Make/options
new file mode 100644
index 0000000000..d27c95d033
--- /dev/null
+++ b/applications/test/boundBox/Make/options
@@ -0,0 +1,7 @@
+EXE_INC = \
+ -I$(LIB_SRC)/finiteVolume/lnInclude \
+ -I$(LIB_SRC)/meshTools/lnInclude
+
+EXE_LIBS = \
+ -lfiniteVolume \
+ -lmeshTools
diff --git a/applications/test/boundBox/Test-boundBox.C b/applications/test/boundBox/Test-boundBox.C
new file mode 100644
index 0000000000..cb72b9ca87
--- /dev/null
+++ b/applications/test/boundBox/Test-boundBox.C
@@ -0,0 +1,67 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+Description
+ Test bounding box behaviour
+
+\*---------------------------------------------------------------------------*/
+
+#include "argList.H"
+#include "Time.H"
+#include "polyMesh.H"
+#include "boundBox.H"
+#include "treeBoundBox.H"
+#include "cellModeller.H"
+
+using namespace Foam;
+
+//- simple helper to create a cube
+boundBox cube(scalar start, scalar width)
+{
+ return boundBox
+ (
+ point(start, start, start),
+ point(start + width, start + width, start + width)
+ );
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// Main program:
+
+int main(int argc, char *argv[])
+{
+ #include "setRootCase.H"
+ // #include "createTime.H"
+ // #include "createMesh.H"
+
+ const cellModel& hex = *(cellModeller::lookup("hex"));
+
+ Info<<"boundBox faces: " << boundBox::faces << endl;
+ Info<<"hex faces: " << hex.modelFaces() << endl;
+
+ return 0;
+}
+
+
+// ************************************************************************* //
diff --git a/applications/utilities/mesh/conversion/Optional/Allwmake b/applications/utilities/mesh/conversion/Optional/Allwmake
index adf350c5c8..6d02ede6f4 100755
--- a/applications/utilities/mesh/conversion/Optional/Allwmake
+++ b/applications/utilities/mesh/conversion/Optional/Allwmake
@@ -12,11 +12,11 @@ _foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/ccmio)
set -x
-# Build libccmio (.so)
-$WM_THIRD_PARTY_DIR/makeCCMIO
+# Build libccmio (.a|.so)
+$WM_THIRD_PARTY_DIR/makeCCMIO lib # libso
if [ -e $CCMIO_ARCH_PATH/include/libccmio/ccmio.h \
- -a -e $FOAM_EXT_LIBBIN/libccmio.so ]
+ -a \( -e $CCMIO_ARCH_PATH/lib/libccmio.a -o $FOAM_EXT_LIBBIN/libccmio.so \) ]
then
wmake ccm26ToFoam
fi
diff --git a/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/Make/options b/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/Make/options
index 410b53c73c..7e3235bf81 100644
--- a/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/Make/options
+++ b/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/Make/options
@@ -6,4 +6,4 @@ EXE_INC = \
EXE_LIBS = \
-lfiniteVolume \
-lmeshTools \
- -L$(FOAM_EXT_LIBBIN) -lccmio
+ -L$(CCMIO_ARCH_PATH)/lib -L$(FOAM_EXT_LIBBIN) -lccmio
diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C
index c35660d0be..07d6c45513 100644
--- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C
+++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.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) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@@ -425,7 +425,8 @@ int main(int argc, char *argv[])
IOobject::AUTO_WRITE
),
mesh,
- dimensionedScalar("cellDist", dimless, 0)
+ dimensionedScalar("cellDist", dimless, -1),
+ zeroGradientFvPatchScalarField::typeName
);
forAll(procIds, celli)
@@ -433,6 +434,7 @@ int main(int argc, char *argv[])
cellDist[celli] = procIds[celli];
}
+ cellDist.correctBoundaryConditions();
cellDist.write();
Info<< nl << "Wrote decomposition as volScalarField to "
diff --git a/bin/tools/RunFunctions b/bin/tools/RunFunctions
index bfbe53c9a3..2a330f6a38 100755
--- a/bin/tools/RunFunctions
+++ b/bin/tools/RunFunctions
@@ -54,7 +54,6 @@ getApplication()
runApplication()
{
- LOG_NAME=
APP_RUN=
LOG_IGNORE=false
LOG_APPEND=false
@@ -100,18 +99,18 @@ runApplication()
runParallel()
{
- LOG_NAME=
APP_RUN=
- # Store any parsed additional arguments e.g. decomposeParDict
- APP_PARARGS=
LOG_IGNORE=false
LOG_APPEND=false
LOG_SUFFIX=
+
+ # Store any parsed additional arguments e.g. decomposeParDict
+ APP_PARARGS=
# Check the default decomposeParDict if available
- nProcs=$(getNumberOfProcessors "system/decomposeParDict")
+ nProcs=$(getNumberOfProcessors system/decomposeParDict)
# Parse options and executable
- while [ $# -gt 0 ] && [ -z "$APP_RUN" ] ; do
+ while [ $# -gt 0 ] && [ -z "$APP_RUN" ]; do
key="$1"
case "$key" in
-append|-a)
@@ -144,7 +143,7 @@ runParallel()
shift
done
- if [ -f log.$SUFFIX ] && [ "$LOG_IGNORE" = "false" ]
+ if [ -f log.$LOG_SUFFIX ] && [ "$LOG_IGNORE" = "false" ]
then
echo "$APP_NAME already run on $PWD:" \
"remove log file 'log.$LOG_SUFFIX' to re-run"
diff --git a/src/Allwmake b/src/Allwmake
index cc3d1b89b7..93d82fcd91 100755
--- a/src/Allwmake
+++ b/src/Allwmake
@@ -48,7 +48,7 @@ wmake $targetType lagrangian/basic
wmake $targetType lagrangian/distributionModels
wmake $targetType genericPatchFields
-wmake $targetType conversion
+conversion/Allwmake $targetType $*
wmake $targetType mesh/extrudeModel
wmake $targetType dynamicMesh
wmake $targetType dynamicFvMesh
diff --git a/src/OpenFOAM/db/Time/TimePaths.C b/src/OpenFOAM/db/Time/TimePaths.C
index 14d004e4d4..ae5b5d182f 100644
--- a/src/OpenFOAM/db/Time/TimePaths.C
+++ b/src/OpenFOAM/db/Time/TimePaths.C
@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
- \\/ M anipulation |
+ \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@@ -26,6 +26,38 @@ License
#include "TimePaths.H"
#include "IOstreams.H"
+// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
+
+bool Foam::TimePaths::detectProcessorCase()
+{
+ if (processorCase_)
+ {
+ return processorCase_;
+ }
+
+ // Look for "processor", but should really check for following digits too
+ const std::string::size_type sep = globalCaseName_.rfind('/');
+ const std::string::size_type pos = globalCaseName_.find
+ (
+ "processor",
+ (sep == string::npos ? 0 : sep)
+ );
+
+ if (pos == 0)
+ {
+ globalCaseName_ = ".";
+ processorCase_ = true;
+ }
+ else if (pos != string::npos && sep != string::npos && sep == pos-1)
+ {
+ globalCaseName_.resize(sep);
+ processorCase_ = true;
+ }
+
+ return processorCase_;
+}
+
+
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::TimePaths::TimePaths
@@ -38,29 +70,13 @@ Foam::TimePaths::TimePaths
:
processorCase_(false),
rootPath_(rootPath),
+ globalCaseName_(caseName),
case_(caseName),
system_(systemName),
constant_(constantName)
{
// Find out from case name whether a processor directory
- std::string::size_type pos = caseName.find("processor");
- if (pos != string::npos)
- {
- processorCase_ = true;
-
- if (pos == 0)
- {
- globalCaseName_ = ".";
- }
- else
- {
- globalCaseName_ = caseName(pos-1);
- }
- }
- else
- {
- globalCaseName_ = caseName;
- }
+ detectProcessorCase();
}
@@ -81,27 +97,10 @@ Foam::TimePaths::TimePaths
system_(systemName),
constant_(constantName)
{
- if (!processorCase)
- {
- // For convenience: find out from case name whether it is a
- // processor directory and set processorCase flag so file searching
- // goes up one level.
- std::string::size_type pos = caseName.find("processor");
-
- if (pos != string::npos)
- {
- processorCase_ = true;
-
- if (pos == 0)
- {
- globalCaseName_ = ".";
- }
- else
- {
- globalCaseName_ = caseName(pos-1);
- }
- }
- }
+ // For convenience: find out from case name whether it is a
+ // processor directory and set processorCase flag so file searching
+ // goes up one level.
+ detectProcessorCase();
}
diff --git a/src/OpenFOAM/db/Time/TimePaths.H b/src/OpenFOAM/db/Time/TimePaths.H
index 88943ca61f..f7bbc25d29 100644
--- a/src/OpenFOAM/db/Time/TimePaths.H
+++ b/src/OpenFOAM/db/Time/TimePaths.H
@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
- \\/ M anipulation |
+ \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@@ -59,6 +59,12 @@ class TimePaths
const word constant_;
+ // Private Member functions
+
+ //- Determine from case name whether it is a processor directory
+ bool detectProcessorCase();
+
+
public:
// Constructors
diff --git a/src/OpenFOAM/meshes/boundBox/boundBox.C b/src/OpenFOAM/meshes/boundBox/boundBox.C
index 6c3ec8036f..a05ab018f6 100644
--- a/src/OpenFOAM/meshes/boundBox/boundBox.C
+++ b/src/OpenFOAM/meshes/boundBox/boundBox.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) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@@ -24,6 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "boundBox.H"
+#include "ListOps.H"
#include "PstreamReduceOps.H"
#include "tmp.H"
@@ -45,6 +46,27 @@ const Foam::boundBox Foam::boundBox::invertedBox
);
+//! \cond ignoreDocumentation
+//- Skip documentation : local scope only
+const Foam::label facesArray[6][4] =
+{
+ // point and face order as per hex cellmodel
+ {0, 4, 7, 3}, // x-min
+ {1, 2, 6, 5}, // x-max
+ {0, 1, 5, 4}, // y-min
+ {3, 7, 6, 2}, // y-max
+ {0, 3, 2, 1}, // z-min
+ {4, 5, 6, 7} // z-max
+};
+//! \endcond
+
+
+const Foam::faceList Foam::boundBox::faces
+(
+ initListList(facesArray)
+);
+
+
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::boundBox::calculate(const UList& points, const bool doReduce)
@@ -164,49 +186,6 @@ Foam::tmp Foam::boundBox::points() const
}
-Foam::faceList Foam::boundBox::faces()
-{
- faceList faces(6);
-
- forAll(faces, fI)
- {
- faces[fI].setSize(4);
- }
-
- faces[0][0] = 0;
- faces[0][1] = 1;
- faces[0][2] = 2;
- faces[0][3] = 3;
-
- faces[1][0] = 2;
- faces[1][1] = 6;
- faces[1][2] = 7;
- faces[1][3] = 3;
-
- faces[2][0] = 0;
- faces[2][1] = 4;
- faces[2][2] = 5;
- faces[2][3] = 1;
-
- faces[3][0] = 4;
- faces[3][1] = 7;
- faces[3][2] = 6;
- faces[3][3] = 5;
-
- faces[4][0] = 3;
- faces[4][1] = 7;
- faces[4][2] = 4;
- faces[4][3] = 0;
-
- faces[5][0] = 1;
- faces[5][1] = 5;
- faces[5][2] = 6;
- faces[5][3] = 2;
-
- return faces;
-}
-
-
void Foam::boundBox::inflate(const scalar s)
{
vector ext = vector::one*s*mag();
diff --git a/src/OpenFOAM/meshes/boundBox/boundBox.H b/src/OpenFOAM/meshes/boundBox/boundBox.H
index a340a90c04..0d4a457db0 100644
--- a/src/OpenFOAM/meshes/boundBox/boundBox.H
+++ b/src/OpenFOAM/meshes/boundBox/boundBox.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) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@@ -79,6 +79,9 @@ public:
//- A very large inverted boundBox: min/max == +/- VGREAT
static const boundBox invertedBox;
+ //- Faces to point addressing, as per a 'hex' cell
+ static const faceList faces;
+
// Constructors
@@ -158,12 +161,9 @@ public:
//- Average length/height/width dimension
inline scalar avgDim() const;
- //- Return corner points in an order corresponding to a 'hex' cell
+ //- Corner points in an order corresponding to a 'hex' cell
tmp points() const;
- //- Return faces with correct point order
- static faceList faces();
-
// Manipulate
diff --git a/src/lagrangian/basic/particle/particle.H b/src/lagrangian/basic/particle/particle.H
index ea0cc38a36..e4a6f6516a 100644
--- a/src/lagrangian/basic/particle/particle.H
+++ b/src/lagrangian/basic/particle/particle.H
@@ -322,7 +322,7 @@ public:
//- String representation of property types
DefinePropertyTypes
(
- "vector label label scalar label label label label"
+ "{vector label label scalar label label label label}"
);
//- Cumulative particle counter - used to provode unique ID
diff --git a/src/lagrangian/basic/particle/particleMacros.H b/src/lagrangian/basic/particle/particleMacros.H
index 8bb09dd133..d54b962116 100644
--- a/src/lagrangian/basic/particle/particleMacros.H
+++ b/src/lagrangian/basic/particle/particleMacros.H
@@ -66,6 +66,7 @@ namespace Foam
//- Define a static 'propertyTypes' for the types of particle properties
+// Brace brackets are used to delimit binary write groups
// \sa AddToPropertyTypes
#define DefinePropertyTypes(str) \
\
@@ -78,6 +79,7 @@ namespace Foam
//- Add to existing static 'propertyTypes' for the types of particle properties
+// Brace brackets are used to delimit binary write groups
// \sa AddToPropertyTypes
#define AddToPropertyTypes(ParcelType, str) \
\
diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcel.H b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcel.H
index 0e43224e8f..338c3186d9 100644
--- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcel.H
+++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcel.H
@@ -162,12 +162,11 @@ public:
);
//- String representation of property types
- static string propertyTypes()
- {
- // TODO: collision information types
- NotImplemented;
- return string::null;
- }
+ AddToPropertyTypes
+ (
+ ParcelType,
+ "{vector vector vector} *"
+ );
// Constructors
diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H
index 2ec40a105f..fe3d1cbf99 100644
--- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H
+++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H
@@ -325,7 +325,7 @@ public:
AddToPropertyTypes
(
ParcelType,
- " label"
+ "{label"
+ " label"
+ " scalar"
+ " scalar"
@@ -334,7 +334,7 @@ public:
+ " scalar"
+ " scalar"
+ " scalar"
- + " vector"
+ + " vector}"
);
diff --git a/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcel.H b/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcel.H
index 7ebd84fee8..22d48d5d03 100644
--- a/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcel.H
+++ b/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcel.H
@@ -184,7 +184,7 @@ public:
AddToPropertyTypes
(
ParcelType,
- " vector"
+ "{vector}"
);
diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H
index f443f14b58..4424569383 100644
--- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H
+++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H
@@ -272,9 +272,7 @@ public:
AddToPropertyTypes
(
ParcelType,
- " List"
- + " List"
- + " List"
+ " scalars scalars scalars"
);
diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H
index 8223ce2230..fda45e5f22 100644
--- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H
+++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H
@@ -226,8 +226,7 @@ public:
AddToPropertyTypes
(
ParcelType,
- " scalar"
- + " List"
+ "{scalar} scalars"
);
diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H
index 9178fbcd12..9e20ea8c0c 100644
--- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H
+++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H
@@ -282,8 +282,7 @@ public:
AddToPropertyTypes
(
ParcelType,
- " scalar"
- + " scalar"
+ "{scalar scalar}"
);
diff --git a/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.H b/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.H
index 76210b20c0..c62a9924ec 100644
--- a/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.H
+++ b/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.H
@@ -201,7 +201,7 @@ public:
AddToPropertyTypes
(
ParcelType,
- " scalar"
+ "{scalar"
+ " vector"
+ " scalar"
+ " scalar"
@@ -213,7 +213,7 @@ public:
+ " scalar"
+ " scalar"
+ " scalar"
- + " scalar"
+ + " scalar}"
);