Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
d01a7a51
Commit
d01a7a51
authored
Nov 23, 2010
by
Andrew Heather
Browse files
Merge branch 'master' of
ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev
parents
d21d66ef
eddccf3e
Changes
33
Hide whitespace changes
Inline
Side-by-side
ReleaseNotes-dev
View file @
d01a7a51
...
...
@@ -35,6 +35,9 @@
*** Core library
+ Large number of code refinements and consistency improvements to support
other developments.
Parallel : using non-blocking communications wherever possible. This will
lead to lower requirements for MPI_BUFFER_SIZE and possibly better
start-up performance on larger numbers of processors.
*** Turbulence modelling
*** *Updated* thermophysical libraries
+ Now use the more descriptive dictionary input format, e.g. for a single
...
...
@@ -102,15 +105,28 @@
+ Parallel aware
*** *New* ptscotch decomposition method
*** *Updated* particle tracking algorithm
+ uses non-blocking parallel transfers
+ does 'minimum-tet' decomposition of face to work with warped faces (snappyHexMesh!)
+ reuses tracking state in interpolation - improves consistency and speed
*** *Updated* split cyclics into two separate patches. See doc/changed/splitCyclics.txt
* *Updated* interpolation (volPointInterpolation) now works without the
globalPointPatch. Moving mesh cases can now be run non-parallel and
continued in parallel and reconstructed without any limitation.
*** *New* compact binary I/O for faces and cells. This speeds up reading/writing meshes in binary.
*** *Updated* runTimeModifiable
+ on linux uses inotify instead of time stamps - more efficient for large
+ user selectable model to use for checking run-time modifiable
dictionaries:
+ timeStamp : use time stamp as before
+ inotify : use inotify instead of time stamp
+ timeStampMaster : only master checks and reads file. Slaves get file
contents from master.
+ inotifyMaster : only master checks and reads file. Slaves get file
contents from master.
+ on linux optionally uses inotify instead of time stamps - more efficient for large
numbers of monitored files. No more fileModificationSkew needed.
+ single integer reduction instead of one reduction per monitored file.
+ only files that can be re-read are being checked. Drastic reduction of
number of files to check.
* Solvers
A number of new solvers have been developed for a range of engineering
applications. There has been a set of improvements to certain classes of
...
...
applications/utilities/surface/surfaceFeatureExtract/Make/options
View file @
d01a7a51
EXE_INC = \
-I$(LIB_SRC)/cfdTools/general/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude
EXE_LIBS = \
-lmeshTools \
-ledgeMesh \
-ltriSurface
applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C
View file @
d01a7a51
...
...
@@ -29,10 +29,13 @@ Description
\*---------------------------------------------------------------------------*/
#include
"triangle.H"
#include
"triSurface.H"
#include
"argList.H"
#include
"Time.H"
#include
"surfaceFeatures.H"
#include
"featureEdgeMesh.H"
#include
"treeBoundBox.H"
#include
"meshTools.H"
#include
"OFstream.H"
...
...
@@ -135,7 +138,8 @@ int main(int argc, char *argv[])
"remove edges within specified bounding box"
);
argList
args
(
argc
,
argv
);
# include "setRootCase.H"
# include "createTime.H"
Info
<<
"Feature line extraction is only valid on closed manifold surfaces."
<<
endl
;
...
...
@@ -282,7 +286,6 @@ int main(int argc, char *argv[])
Info
<<
endl
<<
"Writing edge objs."
<<
endl
;
newSet
.
writeObj
(
"final"
);
Info
<<
nl
<<
"Final feature set:"
<<
nl
<<
" feature points : "
<<
newSet
.
featurePoints
().
size
()
<<
nl
...
...
@@ -293,6 +296,22 @@ int main(int argc, char *argv[])
<<
" internal edges : "
<<
newSet
.
nInternalEdges
()
<<
nl
<<
endl
;
// Extracting and writing a featureEdgeMesh
Pout
<<
nl
<<
"Writing featureEdgeMesh to constant/featureEdgeMesh."
<<
endl
;
featureEdgeMesh
feMesh
(
newSet
,
runTime
,
surfFileName
.
lessExt
().
name
()
+
".featureEdgeMesh"
);
feMesh
.
writeObj
(
surfFileName
.
lessExt
().
name
());
feMesh
.
write
();
Info
<<
"End
\n
"
<<
endl
;
return
0
;
...
...
src/Allwmake
View file @
d01a7a51
...
...
@@ -38,6 +38,8 @@ wmake libso genericPatchFields
# Build the proper scotchDecomp, metisDecomp etc.
parallel/Allwmake
wmake libso conversion
wmake libso sampling
wmake libso dynamicMesh
...
...
@@ -53,7 +55,6 @@ turbulenceModels/Allwmake
wmake libso surfaceFilmModels
lagrangian/Allwmake
postProcessing/Allwmake
conversion/Allwmake
mesh/Allwmake
wmake libso errorEstimation
...
...
src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C
View file @
d01a7a51
...
...
@@ -67,8 +67,16 @@ void Foam::IOdictionary::readFile(const bool masterOnly)
slave
++
)
{
OPstream
toSlave
(
Pstream
::
scheduled
,
slave
);
// Note: use ASCII for now - binary IO of dictionaries is
// not currently supported
OPstream
toSlave
(
Pstream
::
scheduled
,
slave
,
0
,
UPstream
::
msgType
(),
IOstream
::
ASCII
);
IOdictionary
::
writeData
(
toSlave
);
}
}
...
...
@@ -79,7 +87,13 @@ void Foam::IOdictionary::readFile(const bool masterOnly)
Pout
<<
"IOdictionary : Reading "
<<
objectPath
()
<<
" from master processor "
<<
Pstream
::
masterNo
()
<<
endl
;
}
IPstream
fromMaster
(
Pstream
::
scheduled
,
Pstream
::
masterNo
());
IPstream
fromMaster
(
Pstream
::
scheduled
,
Pstream
::
masterNo
(),
0
,
IOstream
::
ASCII
);
IOdictionary
::
readData
(
fromMaster
);
}
}
...
...
src/OpenFOAM/db/IOstreams/Pstreams/UOPstream.C
View file @
d01a7a51
...
...
@@ -213,9 +213,20 @@ Foam::Ostream& Foam::UOPstream::write(const string& str)
}
Foam
::
Ostream
&
Foam
::
UOPstream
::
writeQuoted
(
const
std
::
string
&
str
,
const
bool
)
Foam
::
Ostream
&
Foam
::
UOPstream
::
writeQuoted
(
const
std
::
string
&
str
,
const
bool
quoted
)
{
write
(
char
(
token
::
STRING
));
if
(
quoted
)
{
write
(
char
(
token
::
STRING
));
}
else
{
write
(
char
(
token
::
WORD
));
}
size_t
len
=
str
.
size
();
writeToBuffer
(
len
);
...
...
src/OpenFOAM/db/regIOobject/regIOobjectRead.C
View file @
d01a7a51
...
...
@@ -196,8 +196,16 @@ bool Foam::regIOobject::read()
slave
++
)
{
OPstream
toSlave
(
Pstream
::
scheduled
,
slave
);
// Note: use ASCII for now - binary IO of dictionaries is
// not currently supported
OPstream
toSlave
(
Pstream
::
scheduled
,
slave
,
0
,
UPstream
::
msgType
(),
IOstream
::
ASCII
);
writeData
(
toSlave
);
}
}
...
...
@@ -210,7 +218,13 @@ bool Foam::regIOobject::read()
<<
" from master processor "
<<
Pstream
::
masterNo
()
<<
endl
;
}
IPstream
fromMaster
(
Pstream
::
scheduled
,
Pstream
::
masterNo
());
IPstream
fromMaster
(
Pstream
::
scheduled
,
Pstream
::
masterNo
(),
0
,
IOstream
::
ASCII
);
ok
=
readData
(
fromMaster
);
}
}
...
...
src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C
View file @
d01a7a51
...
...
@@ -63,8 +63,6 @@ Foam::processorPolyPatch::processorPolyPatch
neighbFaceCentres_
(),
neighbFaceAreas_
(),
neighbFaceCellCentres_
()
// neighbPointsPtr_(NULL),
// neighbEdgesPtr_(NULL)
{}
...
...
@@ -82,8 +80,6 @@ Foam::processorPolyPatch::processorPolyPatch
neighbFaceCentres_
(),
neighbFaceAreas_
(),
neighbFaceCellCentres_
()
// neighbPointsPtr_(NULL),
// neighbEdgesPtr_(NULL)
{}
...
...
@@ -99,8 +95,6 @@ Foam::processorPolyPatch::processorPolyPatch
neighbFaceCentres_
(),
neighbFaceAreas_
(),
neighbFaceCellCentres_
()
// neighbPointsPtr_(NULL),
// neighbEdgesPtr_(NULL)
{}
...
...
@@ -119,8 +113,6 @@ Foam::processorPolyPatch::processorPolyPatch
neighbFaceCentres_
(),
neighbFaceAreas_
(),
neighbFaceCellCentres_
()
// neighbPointsPtr_(NULL),
// neighbEdgesPtr_(NULL)
{}
...
...
@@ -139,8 +131,6 @@ Foam::processorPolyPatch::processorPolyPatch
neighbFaceCentres_
(),
neighbFaceAreas_
(),
neighbFaceCellCentres_
()
// neighbPointsPtr_(NULL),
// neighbEdgesPtr_(NULL)
{}
...
...
@@ -157,7 +147,6 @@ Foam::processorPolyPatch::~processorPolyPatch()
void
Foam
::
processorPolyPatch
::
initGeometry
(
PstreamBuffers
&
pBufs
)
{
//Pout<< "**processorPolyPatch::initGeometry()" << endl;
if
(
Pstream
::
parRun
())
{
UOPstream
toNeighbProc
(
neighbProcNo
(),
pBufs
);
...
...
@@ -172,7 +161,6 @@ void Foam::processorPolyPatch::initGeometry(PstreamBuffers& pBufs)
void
Foam
::
processorPolyPatch
::
calcGeometry
(
PstreamBuffers
&
pBufs
)
{
//Pout<< "processorPolyPatch::calcGeometry() for " << name() << endl;
if
(
Pstream
::
parRun
())
{
{
...
...
@@ -184,8 +172,6 @@ void Foam::processorPolyPatch::calcGeometry(PstreamBuffers& pBufs)
>>
neighbFaceCellCentres_
;
}
//Pout<< "processorPolyPatch::calcGeometry() : received data for "
// << neighbFaceCentres_.size() << " faces." << endl;
// My normals
vectorField
faceNormals
(
size
());
...
...
@@ -252,9 +238,6 @@ void Foam::processorPolyPatch::calcGeometry(PstreamBuffers& pBufs)
nbrFaceNormals
,
calcFaceTol
(
*
this
,
points
(),
faceCentres
())
);
//Pout<< "**neighbFaceCentres_:" << neighbFaceCentres_ << endl;
//Pout<< "**neighbFaceAreas_:" << neighbFaceAreas_ << endl;
//Pout<< "**neighbFaceCellCentres_:" << neighbFaceCellCentres_ << endl;
}
}
...
...
src/conversion/Make/files
View file @
d01a7a51
...
...
@@ -4,6 +4,7 @@ ensight/part/ensightPart.C
ensight/part/ensightPartIO.C
ensight/part/ensightPartCells.C
ensight/part/ensightPartFaces.C
ensight/part/ensightPartNonMeshFaces.C
ensight/part/ensightParts.C
meshTables/boundaryRegion.C
...
...
src/conversion/ensight/part/ensightPart.H
View file @
d01a7a51
...
...
@@ -267,6 +267,12 @@ public:
matId_
=
value
;
}
//- simple labelList with a name
const
labelListList
&
elemLists
()
const
{
return
elemLists_
;
}
//- offset for element ids
label
offset
()
const
{
...
...
@@ -285,8 +291,12 @@ public:
//- write reconstruction information for the object
bool
writeData
(
Ostream
&
)
const
;
//- write geometry
void
writeGeometry
(
ensightGeoFile
&
)
const
;
//- Write geometry
virtual
void
writeGeometry
(
ensightGeoFile
&
)
const
{}
//- Helper: write geometry given the pointField
void
writeGeometry
(
ensightGeoFile
&
,
const
pointField
&
points
)
const
;
//- write scalar field
void
writeScalarField
...
...
src/conversion/ensight/part/ensightPartCells.C
View file @
d01a7a51
...
...
@@ -427,4 +427,11 @@ void Foam::ensightPartCells::writeConnectivity
}
void
Foam
::
ensightPartCells
::
writeGeometry
(
ensightGeoFile
&
os
)
const
{
const
polyMesh
&
mesh
=
*
meshPtr_
;
ensightPart
::
writeGeometry
(
os
,
mesh
.
points
());
}
// ************************************************************************* //
src/conversion/ensight/part/ensightPartCells.H
View file @
d01a7a51
...
...
@@ -74,6 +74,9 @@ class ensightPartCells
const
labelList
&
pointMap
)
const
;
//- write geometry
virtual
void
writeGeometry
(
ensightGeoFile
&
os
)
const
;
protected:
...
...
src/conversion/ensight/part/ensightPartFaces.C
View file @
d01a7a51
...
...
@@ -47,41 +47,18 @@ Foam::List<Foam::word> Foam::ensightPartFaces::elemTypes_
);
// * * * * * * * * * * * *
* * * * Constructors * * *
* * * * * * * * * * * //
// * * * * * * * * * * * *
Protected Member Functions
* * * * * * * * * * * //
Foam
::
ensightPartFaces
::
ensightPartFaces
(
label
partNumber
,
const
string
&
partDescription
)
:
ensightPart
(
partNumber
,
partDescription
)
void
Foam
::
ensightPartFaces
::
binShapes
(
const
faceList
&
faces
)
{
isCellData_
=
false
;
}
Foam
::
ensightPartFaces
::
ensightPartFaces
(
label
partNumber
,
const
polyMesh
&
pMesh
,
const
polyPatch
&
pPatch
)
:
ensightPart
(
partNumber
,
pPatch
.
name
(),
pMesh
)
{
isCellData_
=
false
;
offset_
=
pPatch
.
start
();
size_
=
pPatch
.
size
();
// count the shapes
label
nTri
=
0
;
label
nQuad
=
0
;
label
nPoly
=
0
;
forAll
(
pPatch
,
patch
faceI
)
forAll
(
faces
,
faceI
)
{
const
face
&
f
=
pMesh
.
faces
()[
patchfaceI
+
offset_
];
const
face
&
f
=
faces
[
faceI
];
if
(
f
.
size
()
==
3
)
{
...
...
@@ -108,21 +85,21 @@ Foam::ensightPartFaces::ensightPartFaces
nPoly
=
0
;
// classify the shapes
forAll
(
pPatch
,
patch
faceI
)
forAll
(
faces
,
faceI
)
{
const
face
&
f
=
pMesh
.
faces
()[
patchfaceI
+
offset_
];
const
face
&
f
=
faces
[
faceI
];
if
(
f
.
size
()
==
3
)
{
triCells
[
nTri
++
]
=
patch
faceI
;
triCells
[
nTri
++
]
=
faceI
;
}
else
if
(
f
.
size
()
==
4
)
{
quadCells
[
nQuad
++
]
=
patch
faceI
;
quadCells
[
nQuad
++
]
=
faceI
;
}
else
{
polygonCells
[
nPoly
++
]
=
patch
faceI
;
polygonCells
[
nPoly
++
]
=
faceI
;
}
}
...
...
@@ -133,10 +110,45 @@ Foam::ensightPartFaces::ensightPartFaces
elemLists_
[
tria3Elements
].
transfer
(
triCells
);
elemLists_
[
quad4Elements
].
transfer
(
quadCells
);
elemLists_
[
nsidedElements
].
transfer
(
polygonCells
);
size_
=
faces
.
size
();
}
Foam
::
ensightPartFaces
::
ensightPartFaces
(
const
ensightPartFaces
&
part
)
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam
::
ensightPartFaces
::
ensightPartFaces
(
label
partNumber
,
const
string
&
partDescription
)
:
ensightPart
(
partNumber
,
partDescription
)
{
isCellData_
=
false
;
offset_
=
0
;
size_
=
0
;
}
Foam
::
ensightPartFaces
::
ensightPartFaces
(
label
partNumber
,
const
polyMesh
&
pMesh
,
const
polyPatch
&
pPatch
)
:
ensightPart
(
partNumber
,
pPatch
.
name
(),
pMesh
)
{
isCellData_
=
false
;
offset_
=
pPatch
.
start
();
// count the shapes
binShapes
(
pPatch
);
}
Foam
::
ensightPartFaces
::
ensightPartFaces
(
const
ensightPartFaces
&
part
)
:
ensightPart
(
part
)
{}
...
...
@@ -206,6 +218,7 @@ void Foam::ensightPartFaces::writeConnectivity
(
ensightGeoFile
&
os
,
const
word
&
key
,
const
faceList
&
faces
,
const
labelList
&
idList
,
const
labelList
&
pointMap
)
const
...
...
@@ -214,8 +227,6 @@ void Foam::ensightPartFaces::writeConnectivity
os
.
write
(
idList
.
size
());
os
.
newline
();
const
faceList
&
meshFaces
=
meshPtr_
->
faces
();
// write (polygon) face sizes
if
(
key
==
"nsided"
)
{
...
...
@@ -223,7 +234,7 @@ void Foam::ensightPartFaces::writeConnectivity
forAll
(
idList
,
i
)
{
label
id
=
idList
[
i
]
+
offset_
;
const
face
&
f
=
meshF
aces
[
id
];
const
face
&
f
=
f
aces
[
id
];
os
.
write
(
f
.
size
()
);
os
.
newline
();
...
...
@@ -234,7 +245,7 @@ void Foam::ensightPartFaces::writeConnectivity
forAll
(
idList
,
i
)
{
label
id
=
idList
[
i
]
+
offset_
;
const
face
&
f
=
meshF
aces
[
id
];
const
face
&
f
=
f
aces
[
id
];
// convert global -> local index
// (note: Ensight indices start with 1)
...
...
@@ -247,4 +258,31 @@ void Foam::ensightPartFaces::writeConnectivity
}
void
Foam
::
ensightPartFaces
::
writeConnectivity
(
ensightGeoFile
&
os
,
const
word
&
key
,
const
labelList
&
idList
,
const
labelList
&
pointMap
)
const
{
writeConnectivity
(
os
,
key
,
meshPtr_
->
faces
(),
idList
,
pointMap
);
}
void
Foam
::
ensightPartFaces
::
writeGeometry
(
ensightGeoFile
&
os
)
const
{
const
polyMesh
&
mesh
=
*
meshPtr_
;
const
pointField
&
points
=
mesh
.
points
();
ensightPart
::
writeGeometry
(
os
,
points
);
}
// ************************************************************************* //
src/conversion/ensight/part/ensightPartFaces.H
View file @
d01a7a51
...
...
@@ -67,6 +67,9 @@ class ensightPartFaces
const
labelList
&
pointMap
)
const
;
//- write geometry
virtual
void
writeGeometry
(
ensightGeoFile
&
os
)
const
;
protected:
...
...
@@ -81,6 +84,19 @@ protected:
// Static data members
static
List
<
word
>
elemTypes_
;
//- Divide the shapes, set elemLists.
void
binShapes
(
const
faceList
&
faces
);
//- Helper: write connectivity
void
writeConnectivity
(
ensightGeoFile
&
os
,
const
word
&
key
,
const
faceList
&
faces
,
const
labelList
&
idList
,
const
labelList
&
pointMap
)
const
;
public:
...
...
src/conversion/ensight/part/ensightPartIO.C
View file @
d01a7a51
...
...
@@ -118,15 +118,16 @@ bool Foam::ensightPart::writeData(Ostream& os) const
}
void
Foam
::
ensightPart
::
writeGeometry
(
ensightGeoFile
&
os
)
const
void
Foam
::
ensightPart
::
writeGeometry
(
ensightGeoFile
&
os
,
const
pointField
&
points
)
const
{
if
(
size
()
&&
meshPtr_
)
if
(
size
())
{
const
polyMesh
&
mesh
=
*
meshPtr_
;
const
pointField
&
meshPoints
=
mesh
.
points
();
localPoints
ptList
=
calcLocalPoints
();
labelList
&
pointMap
=
ptList
.
list
;
const
localPoints
ptList
=
calcLocalPoints
();
const
labelList
&
pointMap
=
ptList
.
list
;
writeHeader
(
os
,
true
);
...
...
@@ -141,7 +142,7 @@ void Foam::ensightPart::writeGeometry(ensightGeoFile& os) const
{
if
(
pointMap
[
ptI
]
>
-
1
)
{
os
.
write
(
meshP
oints
[
ptI
].
component
(
cmpt
)
);
os
.
write
(
p
oints
[
ptI
].
component
(
cmpt
)
);
os
.
newline
();
}
}
...
...
src/conversion/ensight/part/ensightPartNonMeshFaces.C
0 → 100644
View file @
d01a7a51
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 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