Merge remote branch 'OpenCFD/master' into olesenm

This commit is contained in:
Mark Olesen
2011-01-27 11:22:14 +01:00
26 changed files with 254 additions and 115 deletions

View File

@ -1,6 +1,9 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
makeOption=libso
[ $# -ge 1 ] && makeOption=$1
wmakeCheckPwd "$WM_PROJECT_DIR/src" || {
echo "Error: Current directory is not \$WM_PROJECT_DIR/src"
echo " The environment variables are inconsistent with the installation."
@ -21,53 +24,53 @@ wmakePrintBuild -check || /bin/rm -f OpenFOAM/Make/*/global.? 2>/dev/null
wmakeLnInclude OpenFOAM
wmakeLnInclude OSspecific/${WM_OSTYPE:-POSIX}
Pstream/Allwmake
Pstream/Allwmake $*
OSspecific/${WM_OSTYPE:-POSIX}/Allwmake
wmake libso OpenFOAM
wmake $makeOption OpenFOAM
wmake libso fileFormats
wmake libso triSurface
wmake libso meshTools
wmake libso edgeMesh
wmake libso surfMesh
wmake $makeOption fileFormats
wmake $makeOption triSurface
wmake $makeOption meshTools
wmake $makeOption edgeMesh
wmake $makeOption surfMesh
# Decomposition methods needed by dummyThirdParty
parallel/decompose/AllwmakeLnInclude
# dummyThirdParty (dummy metisDecomp, scotchDecomp etc) needed by e.g. meshTools
dummyThirdParty/Allwmake
dummyThirdParty/Allwmake $*
wmake libso lagrangian/basic
wmake libso finiteVolume
wmake libso genericPatchFields
wmake $makeOption lagrangian/basic
wmake $makeOption finiteVolume
wmake $makeOption genericPatchFields
# Build the proper scotchDecomp, metisDecomp etc.
parallel/Allwmake
parallel/Allwmake $*
wmake libso conversion
wmake $makeOption conversion
wmake libso sampling
wmake $makeOption sampling
wmake libso dynamicMesh
wmake libso dynamicFvMesh
wmake libso topoChangerFvMesh
wmake $makeOption dynamicMesh
wmake $makeOption dynamicFvMesh
wmake $makeOption topoChangerFvMesh
wmake libso ODE
wmake libso randomProcesses
wmake $makeOption ODE
wmake $makeOption randomProcesses
thermophysicalModels/Allwmake
transportModels/Allwmake
turbulenceModels/Allwmake
wmake libso surfaceFilmModels
lagrangian/Allwmake
postProcessing/Allwmake
mesh/Allwmake
thermophysicalModels/Allwmake $*
transportModels/Allwmake $*
turbulenceModels/Allwmake $*
wmake $makeOption surfaceFilmModels
lagrangian/Allwmake $*
postProcessing/Allwmake $*
mesh/Allwmake $*
wmake libso errorEstimation
wmake $makeOption errorEstimation
fvAgglomerationMethods/Allwmake
fvAgglomerationMethods/Allwmake $*
wmake libso fvMotionSolver
wmake libso engine
wmake $makeOption fvMotionSolver
wmake $makeOption engine
# ----------------------------------------------------------------- end-of-file

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "Time.H"
#include "PstreamReduceOps.H"
#include "Pstream.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //

View File

@ -222,7 +222,7 @@ void Foam::mapDistribute::printLayout(Ostream& os) const
localSize = maxIndex[Pstream::myProcNo()]+1;
}
os << "Layout:" << endl
os << "Layout: (constructSize:" << constructSize_ << ")" << endl
<< "local (processor " << Pstream::myProcNo() << "):" << endl
<< " start : 0" << endl
<< " size : " << localSize << endl;

View File

@ -966,8 +966,6 @@ void Foam::mapDistribute::reverseDistribute
const bool dummyTransform
) const
{
fld.setSize(constructSize);
if (dummyTransform)
{
applyDummyInverseTransforms(fld);
@ -1024,8 +1022,6 @@ void Foam::mapDistribute::reverseDistribute
const bool dummyTransform
) const
{
fld.setSize(constructSize);
if (dummyTransform)
{
applyDummyInverseTransforms(fld);

View File

@ -2,7 +2,10 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso dummy
makeOption=libso
[ $# -ge 1 ] && makeOption=$1
wmake $makeOption dummy
case "$WM_MPLIB" in
*MPI*)
@ -11,11 +14,11 @@ case "$WM_MPLIB" in
echo "Note: ignore spurious warnings about missing mpicxx.h headers"
set -x
# force compilation into qualified directory
WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB wmake libso mpi
WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB wmake $makeOption mpi
;;
#GAMMA)
# wmake libso gamma
# wmake $makeOption gamma
# ;;
esac

View File

@ -2,6 +2,9 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso
makeOption=libso
[ $# -ge 1 ] && makeOption=$1
wmake $makeOption
# ----------------------------------------------------------------- end-of-file

View File

@ -2,10 +2,13 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso scotchDecomp
wmake libso ptscotchDecomp
wmake libso metisDecomp
wmake libso MGridGen
makeOption=libso
[ $# -ge 1 ] && makeOption=$1
wmake $makeOption scotchDecomp
wmake $makeOption ptscotchDecomp
wmake $makeOption metisDecomp
wmake $makeOption MGridGen
# ----------------------------------------------------------------- end-of-file

View File

@ -120,7 +120,7 @@ void volPointInterpolation::pushUntransformedData
const labelList& slavePoints = slaves[i];
// Copy master data to slave slots
forAll(slaves, j)
forAll(slavePoints, j)
{
elems[slavePoints[j]] = elems[i];
}

View File

@ -2,6 +2,9 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso MGridGenGamgAgglomeration
makeOption=libso
[ $# -ge 1 ] && makeOption=$1
wmake $makeOption MGridGenGamgAgglomeration
# ----------------------------------------------------------------- end-of-file

View File

@ -2,13 +2,16 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso basic
wmake libso solidParticle
wmake libso intermediate
wmake libso dieselSpray
wmake libso dsmc
wmake libso coalCombustion
makeOption=libso
[ $# -ge 1 ] && makeOption=$1
molecularDynamics/Allwmake
wmake $makeOption basic
wmake $makeOption solidParticle
wmake $makeOption intermediate
wmake $makeOption dieselSpray
wmake $makeOption dsmc
wmake $makeOption coalCombustion
molecularDynamics/Allwmake $*
# ----------------------------------------------------------------- end-of-file

View File

@ -2,8 +2,11 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso potential
wmake libso molecularMeasurements
wmake libso molecule
makeOption=libso
[ $# -ge 1 ] && makeOption=$1
wmake $makeOption potential
wmake $makeOption molecularMeasurements
wmake $makeOption molecule
# ----------------------------------------------------------------- end-of-file

View File

@ -2,7 +2,10 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso autoMesh
wmake libso blockMesh
makeOption=libso
[ $# -ge 1 ] && makeOption=$1
wmake $makeOption autoMesh
wmake $makeOption blockMesh
# ----------------------------------------------------------------- end-of-file

View File

@ -2,9 +2,12 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
decompose/Allwmake
reconstruct/Allwmake
wmake libso distributed
makeOption=libso
[ $# -ge 1 ] && makeOption=$1
decompose/Allwmake $*
reconstruct/Allwmake $*
wmake $makeOption distributed
# ----------------------------------------------------------------- end-of-file

View File

@ -1,6 +1,9 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
makeOption=libso
[ $# -ge 1 ] && makeOption=$1
# get SCOTCH_VERSION, SCOTCH_ARCH_PATH
settings=`$WM_PROJECT_DIR/bin/foamEtcFile apps/scotch/bashrc`
if [ -f "$settings" ]
@ -16,17 +19,17 @@ set -x
wmakeLnInclude decompositionMethods
wmake libso scotchDecomp
wmake $makeOption scotchDecomp
if [ -d "$FOAM_LIBBIN/$FOAM_MPI" ]
then
(
WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB
wmake libso ptscotchDecomp
wmake $makeOption ptscotchDecomp
)
fi
wmake libso decompositionMethods
wmake $makeOption decompositionMethods
# ----------------------------------------------------------------- end-of-file

View File

@ -2,7 +2,10 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso reconstruct
makeOption=libso
[ $# -ge 1 ] && makeOption=$1
wmake $makeOption reconstruct
# ----------------------------------------------------------------- end-of-file

View File

@ -2,9 +2,12 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libo postCalc
wmake libso foamCalcFunctions
makeOption=libso
[ $# -ge 1 ] && makeOption=$1
functionObjects/Allwmake
wmake libo postCalc
wmake $makeOption foamCalcFunctions
functionObjects/Allwmake $*
# ----------------------------------------------------------------- end-of-file

View File

@ -2,11 +2,14 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso field
wmake libso forces
wmake libso IO
wmake libso utilities
wmake libso jobControl
wmake libso systemCall
makeOption=libso
[ $# -ge 1 ] && makeOption=$1
wmake $makeOption field
wmake $makeOption forces
wmake $makeOption IO
wmake $makeOption utilities
wmake $makeOption jobControl
wmake $makeOption systemCall
# ----------------------------------------------------------------- end-of-file

View File

@ -76,6 +76,63 @@ namespace Foam
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
const Foam::indexedOctree<Foam::treeDataFace>&
Foam::sampledTriSurfaceMesh::nonCoupledboundaryTree() const
{
// Variant of meshSearch::boundaryTree() that only does non-coupled
// boundary faces.
if (!boundaryTreePtr_.valid())
{
// all non-coupled boundary faces (not just walls)
const polyBoundaryMesh& patches = mesh().boundaryMesh();
labelList bndFaces(mesh().nFaces()-mesh().nInternalFaces());
label bndI = 0;
forAll(patches, patchI)
{
const polyPatch& pp = patches[patchI];
if (!pp.coupled())
{
forAll(pp, i)
{
bndFaces[bndI++] = pp.start()+i;
}
}
}
bndFaces.setSize(bndI);
treeBoundBox overallBb(mesh().points());
Random rndGen(123456);
overallBb = overallBb.extend(rndGen, 1E-4);
overallBb.min() -= point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);
overallBb.max() += point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);
boundaryTreePtr_.reset
(
new indexedOctree<treeDataFace>
(
treeDataFace // all information needed to search faces
(
false, // do not cache bb
mesh(),
bndFaces // boundary faces only
),
overallBb, // overall search domain
8, // maxLevel
10, // leafsize
3.0 // duplicity
)
);
}
return boundaryTreePtr_();
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::sampledTriSurfaceMesh::sampledTriSurfaceMesh
@ -159,6 +216,8 @@ bool Foam::sampledTriSurfaceMesh::expire()
sampledSurface::clearGeom();
MeshStorage::clear();
boundaryTreePtr_.clear();
sampleElements_.clear();
samplePoints_.clear();
@ -224,7 +283,10 @@ bool Foam::sampledTriSurfaceMesh::update()
{
// Search for nearest boundaryFace
const indexedOctree<treeDataFace>& bTree = meshSearcher.boundaryTree();
////- Search on all (including coupled) boundary faces
//const indexedOctree<treeDataFace>& bTree = meshSearcher.boundaryTree()
//- Search on all non-coupled boundary faces
const indexedOctree<treeDataFace>& bTree = nonCoupledboundaryTree();
forAll(fc, triI)
{

View File

@ -28,12 +28,31 @@ Description
A sampledSurface from a triSurfaceMesh. It samples on the points/triangles
of the triSurface.
It samples using the cell nearest to the triangle centre so does
not check the cell the centre is actually in ...
- it either samples cells or (non-coupled) boundary faces
In parallel every processor just operates on the part of the surface
where the face centres are inside the mesh. It is then up to the
caller to stitch the partial surfaces together.
- 4 different modes:
- source=cells, interpolate=false:
finds per triangle centre the nearest cell centre and uses its value
- source=cells, interpolate=true
finds per triangle centre the nearest cell centre.
Per surface point checks if this nearest cell is the one containing
point; otherwise projects the point onto the nearest point on
the boundary of the cell (to make sure interpolateCellPoint
gets a valid location)
- source=boundaryFaces, interpolate=false:
finds per triangle centre the nearest point on the boundary
(uncoupled faces only) and uses the value (or 0 if the nearest
is on an empty boundary)
- source=boundaryFaces, interpolate=true:
finds per triangle centre the nearest point on the boundary
(uncoupled faces only).
Per surface point projects the point onto this boundary face
(to make sure interpolateCellPoint gets a valid location)
- since it finds a nearest per triangle each triangle is guaranteed
to be on one processor only. So after stitching (by sampledSurfaces)
the original surface should be complete.
SourceFiles
sampledTriSurfaceMesh.C
@ -52,6 +71,8 @@ SourceFiles
namespace Foam
{
class treeDataFace;
/*---------------------------------------------------------------------------*\
Class sampledTriSurfaceMesh Declaration
\*---------------------------------------------------------------------------*/
@ -88,6 +109,9 @@ private:
//- Track if the surface needs an update
mutable bool needsUpdate_;
//- Search tree for all non-coupled boundary faces
mutable autoPtr<indexedOctree<treeDataFace> > boundaryTreePtr_;
//- From local surface triangle to mesh cell/face.
labelList sampleElements_;
@ -97,6 +121,9 @@ private:
// Private Member Functions
//- Get tree of all non-coupled boundary faces
const indexedOctree<treeDataFace>& nonCoupledboundaryTree() const;
//- sample field on faces
template <class Type>
tmp<Field<Type> > sampleField

View File

@ -2,27 +2,30 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso specie
wmake libso solid
wmake libso thermophysicalFunctions
wmake libso liquids
wmake libso liquidMixture
wmake libso pointSolids
wmake libso pointSolidMixture
makeOption=libso
[ $# -ge 1 ] && makeOption=$1
wmake libso basic
wmake libso reactionThermo
wmake libso laminarFlameSpeed
wmake libso chemistryModel
wmake libso pdfs
wmake libso radiation
wmake libso barotropicCompressibilityModel
wmake libso thermalPorousZone
wmake $makeOption specie
wmake $makeOption solid
wmake $makeOption thermophysicalFunctions
wmake $makeOption liquids
wmake $makeOption liquidMixture
wmake $makeOption pointSolids
wmake $makeOption pointSolidMixture
wmake libso SLGThermo
wmake $makeOption basic
wmake $makeOption reactionThermo
wmake $makeOption laminarFlameSpeed
wmake $makeOption chemistryModel
wmake $makeOption pdfs
wmake $makeOption radiation
wmake $makeOption barotropicCompressibilityModel
wmake $makeOption thermalPorousZone
wmake $makeOption SLGThermo
# Should be combined with solids&solidMixture
wmake libso basicSolidThermo
wmake $makeOption basicSolidThermo
# ----------------------------------------------------------------- end-of-file

View File

@ -2,9 +2,12 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso incompressible
wmake libso interfaceProperties
wmake libso twoPhaseInterfaceProperties
# wmake libso compressible
makeOption=libso
[ $# -ge 1 ] && makeOption=$1
wmake $makeOption incompressible
wmake $makeOption interfaceProperties
wmake $makeOption twoPhaseInterfaceProperties
# wmake $makeOption compressible
# ----------------------------------------------------------------- end-of-file

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -146,7 +146,7 @@ public:
return nu_;
}
//- Return the face-interpolated dynamic laminar viscosity
//- Return the face-interpolated kinematic laminar viscosity
tmp<surfaceScalarField> nuf() const;
//- Correct the laminar viscosity

View File

@ -2,8 +2,8 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
LES/Allwmake
incompressible/Allwmake
compressible/Allwmake
LES/Allwmake $*
incompressible/Allwmake $*
compressible/Allwmake $*
# ----------------------------------------------------------------- end-of-file

View File

@ -2,9 +2,12 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
makeOption=libso
[ $# -ge 1 ] && makeOption=$1
wmakeLnInclude ../incompressible/LES
wmake libso LESfilters
wmake libso LESdeltas
wmake $makeOption LESfilters
wmake $makeOption LESdeltas
# ----------------------------------------------------------------- end-of-file

View File

@ -2,8 +2,11 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso turbulenceModel
wmake libso RAS
wmake libso LES
makeOption=libso
[ $# -ge 1 ] && makeOption=$1
wmake $makeOption turbulenceModel
wmake $makeOption RAS
wmake $makeOption LES
# ----------------------------------------------------------------- end-of-file

View File

@ -2,8 +2,11 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso turbulenceModel
wmake libso RAS
wmake libso LES
makeOption=libso
[ $# -ge 1 ] && makeOption=$1
wmake $makeOption turbulenceModel
wmake $makeOption RAS
wmake $makeOption LES
# ----------------------------------------------------------------- end-of-file