Commit 573fce01 authored by graham's avatar graham
Browse files
parents b4676434 7f030f79
......@@ -30,7 +30,6 @@ Description
#include "Time.H"
#include "polyMesh.H"
#include "primitivePatch.H"
#include "faceIOList.H"
#include "IFstream.H"
#include "OFstream.H"
......
......@@ -293,11 +293,13 @@ int main(int argc, char *argv[])
// From global region number to mesh patch.
globalToPatch.setSize(surfaces.nRegions(), -1);
Info<< "Patch\tRegion" << nl
<< "-----\t------"
Info<< "Patch\tType\tRegion" << nl
<< "-----\t----\t------"
<< endl;
const labelList& surfaceGeometry = surfaces.surfaces();
const PtrList<dictionary>& surfacePatchInfo = surfaces.patchInfo();
forAll(surfaceGeometry, surfI)
{
label geomI = surfaceGeometry[surfI];
......@@ -308,15 +310,34 @@ int main(int argc, char *argv[])
forAll(regNames, i)
{
label patchI = meshRefiner.addMeshedPatch
(
regNames[i],
wallPolyPatch::typeName
);
Info<< patchI << '\t' << regNames[i] << nl;
globalToPatch[surfaces.globalRegion(surfI, i)] = patchI;
label globalRegionI = surfaces.globalRegion(surfI, i);
label patchI;
if (surfacePatchInfo.set(globalRegionI))
{
patchI = meshRefiner.addMeshedPatch
(
regNames[i],
surfacePatchInfo[globalRegionI]
);
}
else
{
dictionary patchInfo;
patchInfo.set("type", wallPolyPatch::typeName);
patchI = meshRefiner.addMeshedPatch
(
regNames[i],
patchInfo
);
}
Info<< patchI << '\t' << mesh.boundaryMesh()[patchI].type()
<< '\t' << regNames[i] << nl;
globalToPatch[globalRegionI] = patchI;
}
Info<< nl;
......@@ -431,7 +452,7 @@ int main(int argc, char *argv[])
{
cpuTime timer;
autoLayerDriver layerDriver(meshRefiner);
autoLayerDriver layerDriver(meshRefiner, globalToPatch);
// Layer addition parameters
layerParameters layerParams(layerDict, mesh.boundaryMesh());
......
......@@ -343,7 +343,8 @@ meshQualityControls
//- Minimum quality of the tet formed by the face-centre
// and variable base point minimum decomposition triangles and
// the cell centre. Set to very negative number (e.g. -1E30) to
// the cell centre. This has to be a positive number for tracking
// to work. Set to very negative number (e.g. -1E30) to
// disable.
// <0 = inside out tet,
// 0 = flat tet
......
......@@ -166,10 +166,10 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << endl;
// Convert all the standard mesh files
writeMeshObject<cellIOList>("cells", meshDir, runTime);
writeMeshObject<cellCompactIOList>("cells", meshDir, runTime);
writeMeshObject<labelIOList>("owner", meshDir, runTime);
writeMeshObject<labelIOList>("neighbour", meshDir, runTime);
writeMeshObject<faceIOList>("faces", meshDir, runTime);
writeMeshObject<faceCompactIOList>("faces", meshDir, runTime);
writeMeshObject<pointIOField>("points", meshDir, runTime);
writeMeshObject<labelIOList>("pointProcAddressing", meshDir, runTime);
writeMeshObject<labelIOList>("faceProcAddressing", meshDir, runTime);
......
......@@ -311,7 +311,7 @@ void rewriteField
{
IOWarningIn("rewriteField(..)", patchDict)
<< "Cyclic patch " << patchName
<< " has value entry. Please removed this and rerun."
<< " has value entry. Please remove this and rerun."
<< endl;
}
......
......@@ -131,7 +131,8 @@ unset WM_COMPILER_ARCH WM_COMPILER_LIB_ARCH
# WM_COMPILE_OPTION = Opt | Debug | Prof
: ${WM_COMPILE_OPTION:=Opt}; export WM_COMPILE_OPTION
# WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI
# WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA
# | MPI | QSMPI
: ${WM_MPLIB:=OPENMPI}; export WM_MPLIB
......@@ -241,7 +242,8 @@ foamClean=$WM_PROJECT_DIR/bin/foamCleanPath
cleaned=`$foamClean "$PATH" "$foamOldDirs"` && PATH="$cleaned"
#- Clean LD_LIBRARY_PATH
cleaned=`$foamClean "$LD_LIBRARY_PATH" "$foamOldDirs"` && LD_LIBRARY_PATH="$cleaned"
cleaned=`$foamClean "$LD_LIBRARY_PATH" "$foamOldDirs"` \
&& LD_LIBRARY_PATH="$cleaned"
#- Clean MANPATH
cleaned=`$foamClean "$MANPATH" "$foamOldDirs"` && MANPATH="$cleaned"
......@@ -257,8 +259,13 @@ _foamSource $WM_PROJECT_DIR/etc/aliases.sh
# Source user setup files for optional packages
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamSource $WM_PROJECT_DIR/etc/apps/paraview3/bashrc
_foamSource $WM_PROJECT_DIR/etc/apps/ensight/bashrc
paraview3=`$WM_PROJECT_DIR/bin/foamEtcFile apps/paraview3/bashrc` \
&& _foamSource $paraview3
unset paraview3
ensight=`$WM_PROJECT_DIR/bin/foamEtcFile apps/ensight/bashrc` \
&& _foamSource $ensight
unset ensight
# Clean environment paths again. Only remove duplicates
......
......@@ -255,8 +255,17 @@ _foamSource $WM_PROJECT_DIR/etc/aliases.csh
# Source user setup files for optional packages
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamSource $WM_PROJECT_DIR/etc/apps/paraview3/cshrc
# _foamSource $WM_PROJECT_DIR/etc/apps/ensight/cshrc
set paraview3=`$WM_PROJECT_DIR/bin/foamEtcFile apps/paraview3/cshrc`
if ( $status == 0 ) then
_foamSource $paraview3
endif
unset paraview3
set ensight=`$WM_PROJECT_DIR/bin/foamEtcFile apps/ensight/cshrc`
if ( $status == 0 ) then
_foamSource $ensight
endif
unset ensight
# Clean environment paths again. Only remove duplicates
......
......@@ -23,13 +23,13 @@ License
\*---------------------------------------------------------------------------*/
#include "IOListList.H"
#include "CompactIOList.H"
#include "labelList.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class T, class BaseType>
void Foam::IOListList<T, BaseType>::readFromStream()
void Foam::CompactIOList<T, BaseType>::readFromStream()
{
Istream& is = readStream(word::null);
......@@ -47,7 +47,7 @@ void Foam::IOListList<T, BaseType>::readFromStream()
{
FatalIOErrorIn
(
"IOListList<T, BaseType>::readFromStream()",
"CompactIOList<T, BaseType>::readFromStream()",
is
) << "unexpected class name " << headerClassName()
<< " expected " << typeName << " or " << IOList<T>::typeName
......@@ -61,7 +61,7 @@ void Foam::IOListList<T, BaseType>::readFromStream()
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
template<class T, class BaseType>
Foam::IOListList<T, BaseType>::IOListList(const IOobject& io)
Foam::CompactIOList<T, BaseType>::CompactIOList(const IOobject& io)
:
regIOobject(io)
{
......@@ -77,7 +77,11 @@ Foam::IOListList<T, BaseType>::IOListList(const IOobject& io)
template<class T, class BaseType>
Foam::IOListList<T, BaseType>::IOListList(const IOobject& io, const label size)
Foam::CompactIOList<T, BaseType>::CompactIOList
(
const IOobject& io,
const label size
)
:
regIOobject(io)
{
......@@ -97,7 +101,7 @@ Foam::IOListList<T, BaseType>::IOListList(const IOobject& io, const label size)
template<class T, class BaseType>
Foam::IOListList<T, BaseType>::IOListList
Foam::CompactIOList<T, BaseType>::CompactIOList
(
const IOobject& io,
const List<T>& list
......@@ -121,7 +125,7 @@ Foam::IOListList<T, BaseType>::IOListList
template<class T, class BaseType>
Foam::IOListList<T, BaseType>::IOListList
Foam::CompactIOList<T, BaseType>::CompactIOList
(
const IOobject& io,
const Xfer<List<T> >& list
......@@ -145,7 +149,7 @@ Foam::IOListList<T, BaseType>::IOListList
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
template<class T, class BaseType>
Foam::IOListList<T, BaseType>::~IOListList()
Foam::CompactIOList<T, BaseType>::~CompactIOList()
{}
......@@ -153,7 +157,7 @@ Foam::IOListList<T, BaseType>::~IOListList()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class T, class BaseType>
bool Foam::IOListList<T, BaseType>::writeObject
bool Foam::CompactIOList<T, BaseType>::writeObject
(
IOstream::streamFormat fmt,
IOstream::versionNumber ver,
......@@ -182,7 +186,7 @@ bool Foam::IOListList<T, BaseType>::writeObject
template<class T, class BaseType>
bool Foam::IOListList<T, BaseType>::writeData(Ostream& os) const
bool Foam::CompactIOList<T, BaseType>::writeData(Ostream& os) const
{
return (os << *this).good();
}
......@@ -191,9 +195,9 @@ bool Foam::IOListList<T, BaseType>::writeData(Ostream& os) const
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class T, class BaseType>
void Foam::IOListList<T, BaseType>::operator=
void Foam::CompactIOList<T, BaseType>::operator=
(
const IOListList<T, BaseType>& rhs
const CompactIOList<T, BaseType>& rhs
)
{
List<T>::operator=(rhs);
......@@ -201,7 +205,7 @@ void Foam::IOListList<T, BaseType>::operator=
template<class T, class BaseType>
void Foam::IOListList<T, BaseType>::operator=(const List<T>& rhs)
void Foam::CompactIOList<T, BaseType>::operator=(const List<T>& rhs)
{
List<T>::operator=(rhs);
}
......@@ -213,7 +217,7 @@ template<class T, class BaseType>
Foam::Istream& Foam::operator>>
(
Foam::Istream& is,
Foam::IOListList<T, BaseType>& L
Foam::CompactIOList<T, BaseType>& L
)
{
// Read compact
......@@ -244,7 +248,7 @@ template<class T, class BaseType>
Foam::Ostream& Foam::operator<<
(
Foam::Ostream& os,
const Foam::IOListList<T, BaseType>& L
const Foam::CompactIOList<T, BaseType>& L
)
{
// Keep ascii writing same.
......
......@@ -22,18 +22,22 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::IOListList
Foam::CompactIOList
Description
A List of objects of type \<T\> with automated input and output.
A List of objects of type \<T\> with automated input and output using
a compact storage. Behaves like IOList except when binary output in
case it writes a CompactListList.
Useful for lists of small sublists e.g. faceList, cellList.
SourceFiles
IOListList.C
CompactIOList.C
\*---------------------------------------------------------------------------*/
#ifndef IOListList_H
#define IOListList_H
#ifndef CompactIOList_H
#define CompactIOList_H
#include "IOList.H"
#include "regIOobject.H"
......@@ -47,25 +51,25 @@ class Istream;
class Ostream;
// Forward declaration of friend functions and operators
template<class T, class BaseType> class IOListList;
template<class T, class BaseType> class CompactIOList;
template<class T, class BaseType> Istream& operator>>
(
Istream&,
IOListList<T, BaseType>&
CompactIOList<T, BaseType>&
);
template<class T, class BaseType> Ostream& operator<<
(
Ostream&,
const IOListList<T, BaseType>&
const CompactIOList<T, BaseType>&
);
/*---------------------------------------------------------------------------*\
Class IOListList Declaration
Class CompactIOList Declaration
\*---------------------------------------------------------------------------*/
template<class T, class BaseType>
class IOListList
class CompactIOList
:
public regIOobject,
public List<T>
......@@ -78,27 +82,27 @@ class IOListList
public:
//- Runtime type information
TypeName("ListList");
TypeName("CompactList");
// Constructors
//- Construct from IOobject
IOListList(const IOobject&);
CompactIOList(const IOobject&);
//- Construct from IOobject and size of IOListList
IOListList(const IOobject&, const label);
//- Construct from IOobject and size of CompactIOList
CompactIOList(const IOobject&, const label);
//- Construct from IOobject and a List
IOListList(const IOobject&, const List<T>&);
CompactIOList(const IOobject&, const List<T>&);
//- Construct by transferring the List contents
IOListList(const IOobject&, const Xfer<List<T> >&);
CompactIOList(const IOobject&, const Xfer<List<T> >&);
// Destructor
virtual ~IOListList();
virtual ~CompactIOList();
// Member functions
......@@ -115,7 +119,7 @@ public:
// Member operators
void operator=(const IOListList<T, BaseType>&);
void operator=(const CompactIOList<T, BaseType>&);
void operator=(const List<T>&);
......@@ -126,14 +130,14 @@ public:
friend Istream& operator>> <T, BaseType>
(
Istream&,
IOListList<T, BaseType>&
CompactIOList<T, BaseType>&
);
// Write List to Ostream.
friend Ostream& operator<< <T, BaseType>
(
Ostream&,
const IOListList<T, BaseType>&
const CompactIOList<T, BaseType>&
);
};
......@@ -145,7 +149,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "IOListList.C"
# include "CompactIOList.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -35,7 +35,8 @@ namespace Foam
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTemplateTypeNameAndDebugWithName(cellIOList, "cellList", 0);
defineTemplateTypeNameAndDebugWithName(cellIOList, "cellList", 0);
defineTemplateTypeNameAndDebugWithName(cellCompactIOList, "cellCompactList", 0);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -33,13 +33,14 @@ Description
#define cellIOList_H
#include "cell.H"
#include "IOList.H"
#include "CompactIOList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IOList<cell> cellIOList;
typedef CompactIOList<cell, label> cellCompactIOList;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -33,10 +33,14 @@ Description
namespace Foam
{
defineCompoundTypeName(List<edge>, edgeList);
addCompoundToRunTimeSelectionTable(List<edge>, edgeList);
defineTemplateTypeNameAndDebugWithName(edgeIOList, "edgeList", 0);
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineCompoundTypeName(List<edge>, edgeList);
addCompoundToRunTimeSelectionTable(List<edge>, edgeList);
defineTemplateTypeNameAndDebugWithName(edgeIOList, "edgeList", 0);
defineTemplateTypeNameAndDebugWithName(edgeCompactIOList, "edgeCompactList", 0);
}
// ************************************************************************* //
......@@ -33,13 +33,14 @@ Description
#define edgeIOList_H
#include "edge.H"
#include "IOList.H"
#include "CompactIOList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IOList<edge> edgeIOList;
typedef CompactIOList<edge, label> edgeCompactIOList;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -36,6 +36,12 @@ namespace Foam
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTemplateTypeNameAndDebugWithName(faceIOList, "faceList", 0);
defineTemplateTypeNameAndDebugWithName
(
faceCompactIOList,
"faceCompactList",
0
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -33,13 +33,14 @@ Description
#define faceIOList_H
#include "face.H"
#include "IOList.H"
#include "CompactIOList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IOList<face> faceIOList;
typedef CompactIOList<face, label> faceCompactIOList;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -272,7 +272,7 @@ Foam::polyMesh::polyMesh(const IOobject& io)
}
else
{
cellIOList cLst
cellCompactIOList cLst
(
IOobject
(
......
......@@ -101,7 +101,7 @@ private:
pointIOField points_;
//- Faces
faceIOList faces_;
faceCompactIOList faces_;
//- Face owner
labelIOList owner_;
......
......@@ -112,7 +112,7 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
)
);
faces_ = faceIOList
faces_ = faceCompactIOList
(
IOobject
(
......@@ -238,7 +238,7 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
}
else
{
cellIOList cells
cellCompactIOList cells
(
IOobject
(
......
......@@ -21,10 +21,6 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Description
Declaration of IOList and IOListList ClassNames for IOListLists that
do not have .C files.
\*---------------------------------------------------------------------------*/
#include "labelListIOList.H"
......@@ -38,8 +34,8 @@ namespace Foam
defineTemplateTypeNameAndDebugWithName
(
labelIOListList,
"labelCompactListList",
labelListCompactIOList,
"labelListCompactList",
0
);
}
......
......@@ -33,15 +33,14 @@ Description
#define labelListIOList_H
#include "labelList.H"
#include "IOList.H"
#include "IOListList.H"
#include "CompactIOList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IOList<labelList> labelListIOList;
typedef IOListList<labelList, label> labelIOListList;
typedef CompactIOList<labelList, label> labelListCompactIOList;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment