mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://dm/home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
6
Allwmake
6
Allwmake
@ -26,12 +26,12 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# build OpenFOAM libraries and applications
|
# build OpenFOAM libraries and applications
|
||||||
src/Allwmake
|
src/Allwmake $*
|
||||||
applications/Allwmake
|
applications/Allwmake $*
|
||||||
|
|
||||||
if [ "$1" = doc ]
|
if [ "$1" = doc ]
|
||||||
then
|
then
|
||||||
doc/Allwmake
|
doc/Allwmake $*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -16,7 +16,7 @@ wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
|
|||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
wmake all utilities
|
wmake all utilities $*
|
||||||
wmake all solvers
|
wmake all solvers $*
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,8 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::XiGModel::basicSubGrid
|
Foam::XiGModels::basicSubGrid
|
||||||
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
@ -39,13 +38,14 @@ Description
|
|||||||
|
|
||||||
and the removal:
|
and the removal:
|
||||||
|
|
||||||
\f[ - k_{1} /frac{\vert \dwea{\vec{U}} \vert}{L_{sub}}
|
\f[
|
||||||
\frac{\Xi_{sub}-1}{\Xi_{sub}} \f]
|
- k_{1} /frac{\vert \dwea{\vec{U}} \vert}{L_{sub}}
|
||||||
|
\frac{\Xi_{sub}-1}{\Xi_{sub}}
|
||||||
|
\f]
|
||||||
|
|
||||||
Finally, \f$ G_{sub} \f$ is added to generation rate \f$ G_{in} \f$
|
Finally, \f$ G_{sub} \f$ is added to generation rate \f$ G_{in} \f$
|
||||||
due to the turbulence.
|
due to the turbulence.
|
||||||
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
basicSubGrid.C
|
basicSubGrid.C
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ namespace XiGModels
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class basicSubGrid Declaration
|
Class basicSubGrid Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class basicSubGrid
|
class basicSubGrid
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::XiEqModel::SCOPEXiEq
|
Foam::XiEqModels::SCOPEXiEq
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Simple SCOPEXiEq model for XiEq based on SCOPEXiEqs correlation
|
Simple SCOPEXiEq model for XiEq based on SCOPEXiEqs correlation
|
||||||
@ -120,7 +120,6 @@ public:
|
|||||||
|
|
||||||
//- Update properties from given dictionary
|
//- Update properties from given dictionary
|
||||||
virtual bool read(const dictionary& XiEqProperties);
|
virtual bool read(const dictionary& XiEqProperties);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -26,6 +26,10 @@ License
|
|||||||
#include "DelaunayMesh.H"
|
#include "DelaunayMesh.H"
|
||||||
#include "labelPair.H"
|
#include "labelPair.H"
|
||||||
#include "PrintTable.H"
|
#include "PrintTable.H"
|
||||||
|
#include "pointIOField.H"
|
||||||
|
#include "scalarIOField.H"
|
||||||
|
#include "labelIOField.H"
|
||||||
|
#include "pointConversion.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -36,14 +40,121 @@ License
|
|||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Triangulation>
|
template<class Triangulation>
|
||||||
Foam::DelaunayMesh<Triangulation>::DelaunayMesh()
|
Foam::DelaunayMesh<Triangulation>::DelaunayMesh(const Time& runTime)
|
||||||
:
|
:
|
||||||
Triangulation(),
|
Triangulation(),
|
||||||
vertexCount_(0),
|
vertexCount_(0),
|
||||||
cellCount_(0)
|
cellCount_(0),
|
||||||
|
runTime_(runTime)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Triangulation>
|
||||||
|
Foam::DelaunayMesh<Triangulation>::DelaunayMesh
|
||||||
|
(
|
||||||
|
const Time& runTime,
|
||||||
|
const word& meshName
|
||||||
|
)
|
||||||
|
:
|
||||||
|
Triangulation(),
|
||||||
|
vertexCount_(0),
|
||||||
|
cellCount_(0),
|
||||||
|
runTime_(runTime)
|
||||||
|
{
|
||||||
|
pointIOField pts
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"points",
|
||||||
|
runTime.timeName(),
|
||||||
|
meshName/polyMesh::meshSubDir,
|
||||||
|
runTime,
|
||||||
|
IOobject::READ_IF_PRESENT,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
labelIOField types
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"types",
|
||||||
|
runTime.timeName(),
|
||||||
|
meshName,
|
||||||
|
runTime,
|
||||||
|
IOobject::READ_IF_PRESENT,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
labelIOField indices
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"indices",
|
||||||
|
runTime.timeName(),
|
||||||
|
meshName,
|
||||||
|
runTime,
|
||||||
|
IOobject::READ_IF_PRESENT,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
labelIOField processorIndices
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"processorIndices",
|
||||||
|
runTime.timeName(),
|
||||||
|
meshName,
|
||||||
|
runTime,
|
||||||
|
IOobject::READ_IF_PRESENT,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (pts.headerOk())
|
||||||
|
{
|
||||||
|
forAll(pts, ptI)
|
||||||
|
{
|
||||||
|
Vertex_handle vh = this->insert(toPoint<Point>(pts[ptI]));
|
||||||
|
|
||||||
|
if (indices.headerOk())
|
||||||
|
{
|
||||||
|
vh->index() = indices[ptI];
|
||||||
|
vertexCount()++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vh->index() = getNewVertexIndex();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (processorIndices.headerOk())
|
||||||
|
{
|
||||||
|
vh->procIndex() = processorIndices[ptI];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vh->procIndex() = Pstream::myProcNo();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (types.headerOk())
|
||||||
|
{
|
||||||
|
vh->type() =
|
||||||
|
static_cast<Foam::indexedVertexEnum::vertexType>
|
||||||
|
(
|
||||||
|
types[ptI]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vh->type() = Vb::vtUnassigned;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Triangulation>
|
template<class Triangulation>
|
||||||
|
|||||||
@ -43,6 +43,7 @@ SourceFiles
|
|||||||
#include "boundBox.H"
|
#include "boundBox.H"
|
||||||
#include "indexedVertex.H"
|
#include "indexedVertex.H"
|
||||||
#include "CGALTriangulation3Ddefs.H"
|
#include "CGALTriangulation3Ddefs.H"
|
||||||
|
#include "Time.H"
|
||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -82,6 +83,12 @@ public:
|
|||||||
FixedList<label, 2>::Hash<>
|
FixedList<label, 2>::Hash<>
|
||||||
> labelPairHashSet;
|
> labelPairHashSet;
|
||||||
|
|
||||||
|
typedef HashTable
|
||||||
|
<
|
||||||
|
label,
|
||||||
|
labelPair,
|
||||||
|
FixedList<label, 2>::Hash<>
|
||||||
|
> labelTolabelPairHashTable;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -95,6 +102,9 @@ private:
|
|||||||
// This allows a unique index to be assigned to each cell.
|
// This allows a unique index to be assigned to each cell.
|
||||||
mutable label cellCount_;
|
mutable label cellCount_;
|
||||||
|
|
||||||
|
//- Reference to Time
|
||||||
|
const Time& runTime_;
|
||||||
|
|
||||||
//- Spatial sort traits to use with a pair of point pointers and an int.
|
//- Spatial sort traits to use with a pair of point pointers and an int.
|
||||||
// Taken from a post on the CGAL lists: 2010-01/msg00004.html by
|
// Taken from a post on the CGAL lists: 2010-01/msg00004.html by
|
||||||
// Sebastien Loriot (Geometry Factory).
|
// Sebastien Loriot (Geometry Factory).
|
||||||
@ -159,7 +169,13 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
DelaunayMesh();
|
explicit DelaunayMesh(const Time& runTime);
|
||||||
|
|
||||||
|
DelaunayMesh
|
||||||
|
(
|
||||||
|
const Time& runTime,
|
||||||
|
const word& meshName
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
@ -168,6 +184,14 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
inline const Time& time() const;
|
||||||
|
|
||||||
|
inline void timeCheck
|
||||||
|
(
|
||||||
|
const string& description,
|
||||||
|
const bool check = true
|
||||||
|
) const;
|
||||||
|
|
||||||
inline label getNewVertexIndex() const;
|
inline label getNewVertexIndex() const;
|
||||||
|
|
||||||
inline label getNewCellIndex() const;
|
inline label getNewCellIndex() const;
|
||||||
@ -177,6 +201,7 @@ public:
|
|||||||
inline void resetCellCount();
|
inline void resetCellCount();
|
||||||
|
|
||||||
inline label vertexCount() const;
|
inline label vertexCount() const;
|
||||||
|
inline label& vertexCount();
|
||||||
|
|
||||||
inline void resetVertexCount();
|
inline void resetVertexCount();
|
||||||
|
|
||||||
@ -209,12 +234,12 @@ public:
|
|||||||
|
|
||||||
//- Create an fvMesh from the triangulation.
|
//- Create an fvMesh from the triangulation.
|
||||||
// The mesh is not parallel consistent - only used for viewing
|
// The mesh is not parallel consistent - only used for viewing
|
||||||
autoPtr<fvMesh> createMesh
|
autoPtr<polyMesh> createMesh
|
||||||
(
|
(
|
||||||
const fileName& name,
|
const fileName& name,
|
||||||
const Time& runTime,
|
labelTolabelPairHashTable& vertexMap,
|
||||||
labelList& vertexMap,
|
labelList& cellMap,
|
||||||
labelList& cellMap
|
const bool writeDelaunayData = true
|
||||||
) const;
|
) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -36,6 +36,40 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Triangulation>
|
||||||
|
inline const Foam::Time& Foam::DelaunayMesh<Triangulation>::time() const
|
||||||
|
{
|
||||||
|
return runTime_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Triangulation>
|
||||||
|
void Foam::DelaunayMesh<Triangulation>::timeCheck
|
||||||
|
(
|
||||||
|
const string& description,
|
||||||
|
const bool check
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
if (check)
|
||||||
|
{
|
||||||
|
Info<< nl << "--- [ cpuTime "
|
||||||
|
<< time().elapsedCpuTime() << " s, "
|
||||||
|
<< "delta " << time().cpuTimeIncrement()<< " s";
|
||||||
|
|
||||||
|
if (description != word::null)
|
||||||
|
{
|
||||||
|
Info<< ", " << description << " ";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< " ";
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "] --- " << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Triangulation>
|
template<class Triangulation>
|
||||||
inline Foam::label Foam::DelaunayMesh<Triangulation>::getNewVertexIndex() const
|
inline Foam::label Foam::DelaunayMesh<Triangulation>::getNewVertexIndex() const
|
||||||
{
|
{
|
||||||
@ -90,6 +124,12 @@ Foam::label Foam::DelaunayMesh<Triangulation>::vertexCount() const
|
|||||||
return vertexCount_;
|
return vertexCount_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class Triangulation>
|
||||||
|
Foam::label& Foam::DelaunayMesh<Triangulation>::vertexCount()
|
||||||
|
{
|
||||||
|
return vertexCount_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Triangulation>
|
template<class Triangulation>
|
||||||
void Foam::DelaunayMesh<Triangulation>::resetVertexCount()
|
void Foam::DelaunayMesh<Triangulation>::resetVertexCount()
|
||||||
|
|||||||
@ -28,6 +28,7 @@ License
|
|||||||
#include "pointConversion.H"
|
#include "pointConversion.H"
|
||||||
#include "wallPolyPatch.H"
|
#include "wallPolyPatch.H"
|
||||||
#include "processorPolyPatch.H"
|
#include "processorPolyPatch.H"
|
||||||
|
#include "labelIOField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -331,13 +332,13 @@ void Foam::DelaunayMesh<Triangulation>::printVertexInfo(Ostream& os) const
|
|||||||
|
|
||||||
|
|
||||||
template<class Triangulation>
|
template<class Triangulation>
|
||||||
Foam::autoPtr<Foam::fvMesh>
|
Foam::autoPtr<Foam::polyMesh>
|
||||||
Foam::DelaunayMesh<Triangulation>::createMesh
|
Foam::DelaunayMesh<Triangulation>::createMesh
|
||||||
(
|
(
|
||||||
const fileName& name,
|
const fileName& name,
|
||||||
const Time& runTime,
|
labelTolabelPairHashTable& vertexMap,
|
||||||
labelList& vertexMap,
|
labelList& cellMap,
|
||||||
labelList& cellMap
|
const bool writeDelaunayData
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
pointField points(Triangulation::number_of_vertices());
|
pointField points(Triangulation::number_of_vertices());
|
||||||
@ -354,12 +355,54 @@ Foam::DelaunayMesh<Triangulation>::createMesh
|
|||||||
List<DynamicList<face> > patchFaces(1, DynamicList<face>());
|
List<DynamicList<face> > patchFaces(1, DynamicList<face>());
|
||||||
List<DynamicList<label> > patchOwners(1, DynamicList<label>());
|
List<DynamicList<label> > patchOwners(1, DynamicList<label>());
|
||||||
|
|
||||||
vertexMap.setSize(vertexCount(), -1);
|
vertexMap.resize(vertexCount());
|
||||||
cellMap.setSize(Triangulation::number_of_finite_cells(), -1);
|
cellMap.setSize(Triangulation::number_of_finite_cells(), -1);
|
||||||
|
|
||||||
// Calculate pts and a map of point index to location in pts.
|
// Calculate pts and a map of point index to location in pts.
|
||||||
label vertI = 0;
|
label vertI = 0;
|
||||||
|
|
||||||
|
labelIOField indices
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"indices",
|
||||||
|
time().timeName(),
|
||||||
|
name,
|
||||||
|
time(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
Triangulation::number_of_vertices()
|
||||||
|
);
|
||||||
|
|
||||||
|
labelIOField types
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"types",
|
||||||
|
time().timeName(),
|
||||||
|
name,
|
||||||
|
time(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
Triangulation::number_of_vertices()
|
||||||
|
);
|
||||||
|
|
||||||
|
labelIOField processorIndices
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"processorIndices",
|
||||||
|
time().timeName(),
|
||||||
|
name,
|
||||||
|
time(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
Triangulation::number_of_vertices()
|
||||||
|
);
|
||||||
|
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
Finite_vertices_iterator vit = Triangulation::finite_vertices_begin();
|
Finite_vertices_iterator vit = Triangulation::finite_vertices_begin();
|
||||||
@ -369,13 +412,20 @@ Foam::DelaunayMesh<Triangulation>::createMesh
|
|||||||
{
|
{
|
||||||
if (!vit->farPoint())
|
if (!vit->farPoint())
|
||||||
{
|
{
|
||||||
vertexMap[vit->index()] = vertI;
|
vertexMap(labelPair(vit->index(), vit->procIndex())) = vertI;
|
||||||
points[vertI] = topoint(vit->point());
|
points[vertI] = topoint(vit->point());
|
||||||
|
indices[vertI] = vit->index();
|
||||||
|
types[vertI] = static_cast<label>(vit->type());
|
||||||
|
processorIndices[vertI] = vit->procIndex();
|
||||||
vertI++;
|
vertI++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
points.setSize(vertI);
|
points.setSize(vertI);
|
||||||
|
indices.setSize(vertI);
|
||||||
|
types.setSize(vertI);
|
||||||
|
processorIndices.setSize(vertI);
|
||||||
|
|
||||||
|
|
||||||
// Index the cells
|
// Index the cells
|
||||||
label cellI = 0;
|
label cellI = 0;
|
||||||
@ -391,6 +441,7 @@ Foam::DelaunayMesh<Triangulation>::createMesh
|
|||||||
(
|
(
|
||||||
!cit->hasFarPoint()
|
!cit->hasFarPoint()
|
||||||
&& !Triangulation::is_infinite(cit)
|
&& !Triangulation::is_infinite(cit)
|
||||||
|
&& cit->real()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
cellMap[cit->cellIndex()] = cellI++;
|
cellMap[cit->cellIndex()] = cellI++;
|
||||||
@ -424,7 +475,12 @@ Foam::DelaunayMesh<Triangulation>::createMesh
|
|||||||
|
|
||||||
label c1I = Cb::ctFar;
|
label c1I = Cb::ctFar;
|
||||||
bool c1Real = false;
|
bool c1Real = false;
|
||||||
if (!c1->hasFarPoint() && !Triangulation::is_infinite(c1))
|
if
|
||||||
|
(
|
||||||
|
!c1->hasFarPoint()
|
||||||
|
&& !Triangulation::is_infinite(c1)
|
||||||
|
&& c1->real()
|
||||||
|
)
|
||||||
{
|
{
|
||||||
c1I = cellMap[c1->cellIndex()];
|
c1I = cellMap[c1->cellIndex()];
|
||||||
c1Real = true;
|
c1Real = true;
|
||||||
@ -432,7 +488,12 @@ Foam::DelaunayMesh<Triangulation>::createMesh
|
|||||||
|
|
||||||
label c2I = Cb::ctFar;
|
label c2I = Cb::ctFar;
|
||||||
bool c2Real = false;
|
bool c2Real = false;
|
||||||
if (!c2->hasFarPoint() && !Triangulation::is_infinite(c2))
|
if
|
||||||
|
(
|
||||||
|
!c2->hasFarPoint()
|
||||||
|
&& !Triangulation::is_infinite(c2)
|
||||||
|
&& c2->real()
|
||||||
|
)
|
||||||
{
|
{
|
||||||
c2I = cellMap[c2->cellIndex()];
|
c2I = cellMap[c2->cellIndex()];
|
||||||
c2Real = true;
|
c2Real = true;
|
||||||
@ -451,10 +512,17 @@ Foam::DelaunayMesh<Triangulation>::createMesh
|
|||||||
{
|
{
|
||||||
verticesOnTriFace[i] = vertexMap
|
verticesOnTriFace[i] = vertexMap
|
||||||
[
|
[
|
||||||
c1->vertex
|
labelPair
|
||||||
(
|
(
|
||||||
Triangulation::vertex_triple_index(oppositeVertex, i)
|
c1->vertex
|
||||||
)->index()
|
(
|
||||||
|
Triangulation::vertex_triple_index(oppositeVertex, i)
|
||||||
|
)->index(),
|
||||||
|
c1->vertex
|
||||||
|
(
|
||||||
|
Triangulation::vertex_triple_index(oppositeVertex, i)
|
||||||
|
)->procIndex()
|
||||||
|
)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -524,15 +592,15 @@ Foam::DelaunayMesh<Triangulation>::createMesh
|
|||||||
|
|
||||||
Info<< "Creating mesh" << endl;
|
Info<< "Creating mesh" << endl;
|
||||||
|
|
||||||
autoPtr<fvMesh> meshPtr
|
autoPtr<polyMesh> meshPtr
|
||||||
(
|
(
|
||||||
new fvMesh
|
new polyMesh
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
name,
|
name,
|
||||||
runTime.timeName(),
|
time().timeName(),
|
||||||
runTime,
|
time(),
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
@ -565,7 +633,14 @@ Foam::DelaunayMesh<Triangulation>::createMesh
|
|||||||
|
|
||||||
patches.setSize(nValidPatches);
|
patches.setSize(nValidPatches);
|
||||||
|
|
||||||
meshPtr().addFvPatches(patches);
|
meshPtr().addPatches(patches);
|
||||||
|
|
||||||
|
if (writeDelaunayData)
|
||||||
|
{
|
||||||
|
indices.write();
|
||||||
|
types.write();
|
||||||
|
processorIndices.write();
|
||||||
|
}
|
||||||
|
|
||||||
Info<< "Mesh created" << endl;
|
Info<< "Mesh created" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -126,9 +126,24 @@ Foam::DistributedDelaunayMesh<Triangulation>::buildMap
|
|||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Triangulation>
|
template<class Triangulation>
|
||||||
Foam::DistributedDelaunayMesh<Triangulation>::DistributedDelaunayMesh()
|
Foam::DistributedDelaunayMesh<Triangulation>::DistributedDelaunayMesh
|
||||||
|
(
|
||||||
|
const Time& runTime
|
||||||
|
)
|
||||||
:
|
:
|
||||||
DelaunayMesh<Triangulation>(),
|
DelaunayMesh<Triangulation>(runTime),
|
||||||
|
allBackgroundMeshBounds_()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Triangulation>
|
||||||
|
Foam::DistributedDelaunayMesh<Triangulation>::DistributedDelaunayMesh
|
||||||
|
(
|
||||||
|
const Time& runTime,
|
||||||
|
const word& meshName
|
||||||
|
)
|
||||||
|
:
|
||||||
|
DelaunayMesh<Triangulation>(runTime, meshName),
|
||||||
allBackgroundMeshBounds_()
|
allBackgroundMeshBounds_()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -254,47 +269,85 @@ void Foam::DistributedDelaunayMesh<Triangulation>::findProcessorBoundaryCells
|
|||||||
/Pstream::nProcs()
|
/Pstream::nProcs()
|
||||||
);
|
);
|
||||||
|
|
||||||
std::list<Cell_handle> infinite_cells;
|
// std::list<Cell_handle> infinite_cells;
|
||||||
Triangulation::incident_cells
|
// Triangulation::incident_cells
|
||||||
(
|
// (
|
||||||
Triangulation::infinite_vertex(),
|
// Triangulation::infinite_vertex(),
|
||||||
std::back_inserter(infinite_cells)
|
// std::back_inserter(infinite_cells)
|
||||||
);
|
// );
|
||||||
|
//
|
||||||
for
|
// for
|
||||||
(
|
// (
|
||||||
typename std::list<Cell_handle>::iterator vcit = infinite_cells.begin();
|
// typename std::list<Cell_handle>::iterator vcit
|
||||||
vcit != infinite_cells.end();
|
// = infinite_cells.begin();
|
||||||
++vcit
|
// vcit != infinite_cells.end();
|
||||||
)
|
// ++vcit
|
||||||
{
|
// )
|
||||||
Cell_handle cit = *vcit;
|
// {
|
||||||
|
// Cell_handle cit = *vcit;
|
||||||
// Index of infinite vertex in this cell.
|
//
|
||||||
int i = cit->index(Triangulation::infinite_vertex());
|
// // Index of infinite vertex in this cell.
|
||||||
|
// int i = cit->index(Triangulation::infinite_vertex());
|
||||||
Cell_handle c = cit->neighbor(i);
|
//
|
||||||
|
// Cell_handle c = cit->neighbor(i);
|
||||||
if (c->unassigned())
|
//
|
||||||
{
|
// if (c->unassigned())
|
||||||
c->cellIndex() = this->getNewCellIndex();
|
// {
|
||||||
|
// c->cellIndex() = this->getNewCellIndex();
|
||||||
if (checkProcBoundaryCell(c, circumsphereOverlaps))
|
//
|
||||||
{
|
// if (checkProcBoundaryCell(c, circumsphereOverlaps))
|
||||||
cellToCheck.insert(c->cellIndex());
|
// {
|
||||||
}
|
// cellToCheck.insert(c->cellIndex());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// for
|
||||||
|
// (
|
||||||
|
// Finite_cells_iterator cit = Triangulation::finite_cells_begin();
|
||||||
|
// cit != Triangulation::finite_cells_end();
|
||||||
|
// ++cit
|
||||||
|
// )
|
||||||
|
// {
|
||||||
|
// if (cit->parallelDualVertex())
|
||||||
|
// {
|
||||||
|
// if (cit->unassigned())
|
||||||
|
// {
|
||||||
|
// if (checkProcBoundaryCell(cit, circumsphereOverlaps))
|
||||||
|
// {
|
||||||
|
// cellToCheck.insert(cit->cellIndex());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
Finite_cells_iterator cit = Triangulation::finite_cells_begin();
|
All_cells_iterator cit = Triangulation::all_cells_begin();
|
||||||
cit != Triangulation::finite_cells_end();
|
cit != Triangulation::all_cells_end();
|
||||||
++cit
|
++cit
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (cit->parallelDualVertex())
|
if (Triangulation::is_infinite(cit))
|
||||||
|
{
|
||||||
|
// Index of infinite vertex in this cell.
|
||||||
|
int i = cit->index(Triangulation::infinite_vertex());
|
||||||
|
|
||||||
|
Cell_handle c = cit->neighbor(i);
|
||||||
|
|
||||||
|
if (c->unassigned())
|
||||||
|
{
|
||||||
|
c->cellIndex() = this->getNewCellIndex();
|
||||||
|
|
||||||
|
if (checkProcBoundaryCell(c, circumsphereOverlaps))
|
||||||
|
{
|
||||||
|
cellToCheck.insert(c->cellIndex());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (cit->parallelDualVertex())
|
||||||
{
|
{
|
||||||
if (cit->unassigned())
|
if (cit->unassigned())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -135,13 +135,25 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
DistributedDelaunayMesh();
|
explicit DistributedDelaunayMesh(const Time& runTime);
|
||||||
|
|
||||||
|
DistributedDelaunayMesh
|
||||||
|
(
|
||||||
|
const Time& runTime,
|
||||||
|
const word& meshName
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
~DistributedDelaunayMesh();
|
~DistributedDelaunayMesh();
|
||||||
|
|
||||||
|
|
||||||
|
// Queries
|
||||||
|
|
||||||
|
//- Use DelaunayMesh timeCheck function
|
||||||
|
using DelaunayMesh<Triangulation>::timeCheck;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Build a mapDistribute for the supplied destination processor data
|
//- Build a mapDistribute for the supplied destination processor data
|
||||||
|
|||||||
@ -791,10 +791,11 @@ Foam::backgroundMeshDecomposition::backgroundMeshDecomposition
|
|||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
fvMesh::defaultRegion,
|
"backgroundMeshDecomposition",
|
||||||
runTime_.timeName(),
|
runTime_.timeName(),
|
||||||
runTime_,
|
runTime_,
|
||||||
IOobject::MUST_READ
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
meshCutter_
|
meshCutter_
|
||||||
|
|||||||
@ -27,7 +27,7 @@ License
|
|||||||
#include "cellSizeAndAlignmentControls.H"
|
#include "cellSizeAndAlignmentControls.H"
|
||||||
#include "pointIOField.H"
|
#include "pointIOField.H"
|
||||||
#include "scalarIOField.H"
|
#include "scalarIOField.H"
|
||||||
#include "tensorIOField.H"
|
#include "triadIOField.H"
|
||||||
#include "tetrahedron.H"
|
#include "tetrahedron.H"
|
||||||
#include "plane.H"
|
#include "plane.H"
|
||||||
#include "transform.H"
|
#include "transform.H"
|
||||||
@ -38,6 +38,8 @@ License
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(cellShapeControlMesh, 0);
|
defineTypeNameAndDebug(cellShapeControlMesh, 0);
|
||||||
|
|
||||||
|
word cellShapeControlMesh::meshSubDir = "cellShapeControlMesh";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -366,9 +368,89 @@ void Foam::cellShapeControlMesh::writeTriangulation()
|
|||||||
|
|
||||||
Foam::cellShapeControlMesh::cellShapeControlMesh(const Time& runTime)
|
Foam::cellShapeControlMesh::cellShapeControlMesh(const Time& runTime)
|
||||||
:
|
:
|
||||||
|
DistributedDelaunayMesh<CellSizeDelaunay>
|
||||||
|
(
|
||||||
|
runTime,
|
||||||
|
meshSubDir
|
||||||
|
),
|
||||||
runTime_(runTime),
|
runTime_(runTime),
|
||||||
defaultCellSize_(0.0)
|
defaultCellSize_(0.0)
|
||||||
{}
|
{
|
||||||
|
if (this->vertexCount())
|
||||||
|
{
|
||||||
|
fvMesh mesh
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
meshSubDir,
|
||||||
|
runTime.timeName(),
|
||||||
|
runTime,
|
||||||
|
IOobject::READ_IF_PRESENT,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (mesh.nPoints() == this->vertexCount())
|
||||||
|
{
|
||||||
|
pointScalarField sizes
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"sizes",
|
||||||
|
runTime.timeName(),
|
||||||
|
meshSubDir,
|
||||||
|
runTime,
|
||||||
|
IOobject::READ_IF_PRESENT,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
pointMesh::New(mesh)
|
||||||
|
);
|
||||||
|
|
||||||
|
triadIOField alignments
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"alignments",
|
||||||
|
mesh.time().timeName(),
|
||||||
|
meshSubDir,
|
||||||
|
mesh.time(),
|
||||||
|
IOobject::READ_IF_PRESENT,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
sizes.size() == this->vertexCount()
|
||||||
|
&& alignments.size() == this->vertexCount()
|
||||||
|
)
|
||||||
|
{
|
||||||
|
label count = 0;
|
||||||
|
for
|
||||||
|
(
|
||||||
|
Finite_vertices_iterator vit = finite_vertices_begin();
|
||||||
|
vit != finite_vertices_end();
|
||||||
|
++vit
|
||||||
|
)
|
||||||
|
{
|
||||||
|
vit->targetCellSize() = sizes[count];
|
||||||
|
vit->alignment() = alignments[count];
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"Foam::cellShapeControlMesh::cellShapeControlMesh"
|
||||||
|
"(const Time&)"
|
||||||
|
) << "Cell size point field is not the same size as the "
|
||||||
|
<< "mesh."
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//Foam::triangulatedMesh::triangulatedMesh
|
//Foam::triangulatedMesh::triangulatedMesh
|
||||||
@ -744,9 +826,7 @@ void Foam::cellShapeControlMesh::insertBoundingPoints
|
|||||||
|
|
||||||
void Foam::cellShapeControlMesh::write() const
|
void Foam::cellShapeControlMesh::write() const
|
||||||
{
|
{
|
||||||
Info<< "Writing cell size and alignment mesh" << endl;
|
Info<< "Writing " << meshSubDir << endl;
|
||||||
|
|
||||||
const fileName name("cellSizeAndAlignmentMesh");
|
|
||||||
|
|
||||||
// Reindex the cells
|
// Reindex the cells
|
||||||
label cellCount = 0;
|
label cellCount = 0;
|
||||||
@ -763,17 +843,16 @@ void Foam::cellShapeControlMesh::write() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
labelList vertexMap;
|
DelaunayMesh<CellSizeDelaunay>::labelTolabelPairHashTable vertexMap;
|
||||||
labelList cellMap;
|
labelList cellMap;
|
||||||
|
|
||||||
autoPtr<fvMesh> meshPtr = DelaunayMesh<CellSizeDelaunay>::createMesh
|
autoPtr<polyMesh> meshPtr = DelaunayMesh<CellSizeDelaunay>::createMesh
|
||||||
(
|
(
|
||||||
name,
|
meshSubDir,
|
||||||
runTime_,
|
|
||||||
vertexMap,
|
vertexMap,
|
||||||
cellMap
|
cellMap
|
||||||
);
|
);
|
||||||
const fvMesh& mesh = meshPtr();
|
const polyMesh& mesh = meshPtr();
|
||||||
|
|
||||||
pointScalarField sizes
|
pointScalarField sizes
|
||||||
(
|
(
|
||||||
@ -781,7 +860,8 @@ void Foam::cellShapeControlMesh::write() const
|
|||||||
(
|
(
|
||||||
"sizes",
|
"sizes",
|
||||||
mesh.time().timeName(),
|
mesh.time().timeName(),
|
||||||
mesh,
|
meshSubDir,
|
||||||
|
mesh.time(),
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
@ -789,7 +869,22 @@ void Foam::cellShapeControlMesh::write() const
|
|||||||
scalar(0)
|
scalar(0)
|
||||||
);
|
);
|
||||||
|
|
||||||
OFstream str(runTime_.path()/"alignments.obj");
|
triadIOField alignments
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"alignments",
|
||||||
|
mesh.time().timeName(),
|
||||||
|
meshSubDir,
|
||||||
|
mesh.time(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
sizes.size()
|
||||||
|
);
|
||||||
|
|
||||||
|
// Write alignments
|
||||||
|
// OFstream str(runTime_.path()/"alignments.obj");
|
||||||
|
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
@ -801,35 +896,41 @@ void Foam::cellShapeControlMesh::write() const
|
|||||||
if (!vit->farPoint())
|
if (!vit->farPoint())
|
||||||
{
|
{
|
||||||
// Populate sizes
|
// Populate sizes
|
||||||
sizes[vertexMap[vit->index()]] = vit->targetCellSize();
|
sizes[vertexMap[labelPair(vit->index(), vit->procIndex())]] =
|
||||||
|
vit->targetCellSize();
|
||||||
|
|
||||||
// Write alignments
|
alignments[vertexMap[labelPair(vit->index(), vit->procIndex())]] =
|
||||||
const tensor& alignment = vit->alignment();
|
vit->alignment();
|
||||||
pointFromPoint pt = topoint(vit->point());
|
|
||||||
|
|
||||||
if
|
// // Write alignments
|
||||||
(
|
// const tensor& alignment = vit->alignment();
|
||||||
alignment.x() == triad::unset[0]
|
// pointFromPoint pt = topoint(vit->point());
|
||||||
|| alignment.y() == triad::unset[0]
|
//
|
||||||
|| alignment.z() == triad::unset[0]
|
// if
|
||||||
)
|
// (
|
||||||
{
|
// alignment.x() == triad::unset[0]
|
||||||
Info<< "Bad alignment = " << vit->info();
|
// || alignment.y() == triad::unset[0]
|
||||||
|
// || alignment.z() == triad::unset[0]
|
||||||
vit->alignment() = tensor::I;
|
// )
|
||||||
|
// {
|
||||||
Info<< "New alignment = " << vit->info();
|
// Info<< "Bad alignment = " << vit->info();
|
||||||
|
//
|
||||||
continue;
|
// vit->alignment() = tensor::I;
|
||||||
}
|
//
|
||||||
|
// Info<< "New alignment = " << vit->info();
|
||||||
meshTools::writeOBJ(str, pt, alignment.x() + pt);
|
//
|
||||||
meshTools::writeOBJ(str, pt, alignment.y() + pt);
|
// continue;
|
||||||
meshTools::writeOBJ(str, pt, alignment.z() + pt);
|
// }
|
||||||
|
//
|
||||||
|
// meshTools::writeOBJ(str, pt, alignment.x() + pt);
|
||||||
|
// meshTools::writeOBJ(str, pt, alignment.y() + pt);
|
||||||
|
// meshTools::writeOBJ(str, pt, alignment.z() + pt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mesh.write();
|
mesh.write();
|
||||||
|
sizes.write();
|
||||||
|
alignments.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -95,6 +95,9 @@ public:
|
|||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
ClassName("cellShapeControlMesh");
|
ClassName("cellShapeControlMesh");
|
||||||
|
|
||||||
|
//- Return the mesh sub-directory name (usually "cellShapeControlMesh")
|
||||||
|
static word meshSubDir;
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
|
|||||||
@ -223,6 +223,13 @@ void Foam::controlMeshRefinement::initialMeshPopulation
|
|||||||
const autoPtr<backgroundMeshDecomposition>& decomposition
|
const autoPtr<backgroundMeshDecomposition>& decomposition
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
if (shapeController_.shapeControlMesh().vertexCount() > 0)
|
||||||
|
{
|
||||||
|
// Mesh already populated.
|
||||||
|
Info<< "Cell size and alignment mesh already populated." << endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
autoPtr<boundBox> overallBoundBox;
|
autoPtr<boundBox> overallBoundBox;
|
||||||
|
|
||||||
// Need to pass in the background mesh decomposition so that can test if
|
// Need to pass in the background mesh decomposition so that can test if
|
||||||
@ -268,7 +275,7 @@ void Foam::controlMeshRefinement::initialMeshPopulation
|
|||||||
|
|
||||||
controlFunction.initialVertices(pts, sizes, alignments);
|
controlFunction.initialVertices(pts, sizes, alignments);
|
||||||
|
|
||||||
Info<< " Got initial vertices list" << endl;
|
Info<< " Got initial vertices list of size " << pts.size() << endl;
|
||||||
|
|
||||||
List<Vb> vertices(pts.size());
|
List<Vb> vertices(pts.size());
|
||||||
|
|
||||||
|
|||||||
@ -981,7 +981,7 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh
|
|||||||
const dictionary& foamyHexMeshDict
|
const dictionary& foamyHexMeshDict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
DistributedDelaunayMesh<Delaunay>(),
|
DistributedDelaunayMesh<Delaunay>(runTime),
|
||||||
runTime_(runTime),
|
runTime_(runTime),
|
||||||
rndGen_(64293*Pstream::myProcNo()),
|
rndGen_(64293*Pstream::myProcNo()),
|
||||||
foamyHexMeshControls_(foamyHexMeshDict),
|
foamyHexMeshControls_(foamyHexMeshDict),
|
||||||
@ -1046,6 +1046,18 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
decomposition_()
|
decomposition_()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::conformalVoronoiMesh::~conformalVoronoiMesh()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::conformalVoronoiMesh::initialiseForMotion()
|
||||||
{
|
{
|
||||||
if (foamyHexMeshControls().objOutput())
|
if (foamyHexMeshControls().objOutput())
|
||||||
{
|
{
|
||||||
@ -1061,7 +1073,10 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh
|
|||||||
runTime_,
|
runTime_,
|
||||||
rndGen_,
|
rndGen_,
|
||||||
geometryToConformTo_,
|
geometryToConformTo_,
|
||||||
foamyHexMeshDict.subDict("backgroundMeshDecomposition")
|
foamyHexMeshControls().foamyHexMeshDict().subDict
|
||||||
|
(
|
||||||
|
"backgroundMeshDecomposition"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -1120,18 +1135,56 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh
|
|||||||
Foam::indexedVertexEnum::vtExternalFeaturePoint
|
Foam::indexedVertexEnum::vtExternalFeaturePoint
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//writeFixedPoints("fixedPointsStart.obj");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
void Foam::conformalVoronoiMesh::initialiseForConformation()
|
||||||
|
{
|
||||||
|
if (Pstream::parRun())
|
||||||
|
{
|
||||||
|
decomposition_.reset
|
||||||
|
(
|
||||||
|
new backgroundMeshDecomposition
|
||||||
|
(
|
||||||
|
runTime_,
|
||||||
|
rndGen_,
|
||||||
|
geometryToConformTo_,
|
||||||
|
foamyHexMeshControls().foamyHexMeshDict().subDict
|
||||||
|
(
|
||||||
|
"backgroundMeshDecomposition"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Foam::conformalVoronoiMesh::~conformalVoronoiMesh()
|
insertInitialPoints();
|
||||||
{}
|
|
||||||
|
|
||||||
|
insertFeaturePoints();
|
||||||
|
|
||||||
|
// Improve the guess that the backgroundMeshDecomposition makes with the
|
||||||
|
// initial positions. Use before building the surface conformation to
|
||||||
|
// better balance the surface conformation load.
|
||||||
|
distributeBackground(*this);
|
||||||
|
|
||||||
|
buildSurfaceConformation();
|
||||||
|
|
||||||
|
// The introduction of the surface conformation may have distorted the
|
||||||
|
// balance of vertices, distribute if necessary.
|
||||||
|
distributeBackground(*this);
|
||||||
|
|
||||||
|
if (Pstream::parRun())
|
||||||
|
{
|
||||||
|
sync(decomposition_().procBounds());
|
||||||
|
}
|
||||||
|
|
||||||
|
cellSizeMeshOverlapsBackground();
|
||||||
|
|
||||||
|
if (foamyHexMeshControls().printVertexInfo())
|
||||||
|
{
|
||||||
|
printVertexInfo(Info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
void Foam::conformalVoronoiMesh::move()
|
void Foam::conformalVoronoiMesh::move()
|
||||||
{
|
{
|
||||||
@ -1759,32 +1812,6 @@ void Foam::conformalVoronoiMesh::move()
|
|||||||
if (time().outputTime())
|
if (time().outputTime())
|
||||||
{
|
{
|
||||||
writeMesh(time().timeName());
|
writeMesh(time().timeName());
|
||||||
|
|
||||||
// label cellI = 0;
|
|
||||||
// for
|
|
||||||
// (
|
|
||||||
// Finite_cells_iterator cit = finite_cells_begin();
|
|
||||||
// cit != finite_cells_end();
|
|
||||||
// ++cit
|
|
||||||
// )
|
|
||||||
// {
|
|
||||||
// if
|
|
||||||
// (
|
|
||||||
// !cit->hasFarPoint()
|
|
||||||
// && !is_infinite(cit)
|
|
||||||
// )
|
|
||||||
// {
|
|
||||||
// cit->cellIndex() = cellI++;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// labelList vertexMap;
|
|
||||||
// labelList cellMap;
|
|
||||||
// autoPtr<fvMesh> tetMesh =
|
|
||||||
// createMesh("tetMesh", runTime_, vertexMap, cellMap);
|
|
||||||
//
|
|
||||||
// tetMesh().write();
|
|
||||||
//writeFixedPoints("fixedPointsStart_" + runTime_.timeName() + ".obj");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updateSizesAndAlignments(pointsToInsert);
|
updateSizesAndAlignments(pointsToInsert);
|
||||||
|
|||||||
@ -734,7 +734,8 @@ private:
|
|||||||
//- edge conformation location
|
//- edge conformation location
|
||||||
bool nearFeatureEdgeLocation
|
bool nearFeatureEdgeLocation
|
||||||
(
|
(
|
||||||
pointIndexHit& pHit
|
const pointIndexHit& pHit,
|
||||||
|
pointIndexHit& nearestEdgeHit
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Build or rebuild the edge location tree
|
//- Build or rebuild the edge location tree
|
||||||
@ -1038,6 +1039,10 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
void initialiseForMotion();
|
||||||
|
|
||||||
|
void initialiseForConformation();
|
||||||
|
|
||||||
//- Move the vertices according to the controller, re-conforming to the
|
//- Move the vertices according to the controller, re-conforming to the
|
||||||
// surface as required
|
// surface as required
|
||||||
void move();
|
void move();
|
||||||
|
|||||||
@ -1787,6 +1787,11 @@ void Foam::conformalVoronoiMesh::indexDualVertices
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OBJstream snapping1("snapToSurface1.obj");
|
||||||
|
OBJstream snapping2("snapToSurface2.obj");
|
||||||
|
OFstream tetToSnapTo("tetsToSnapTo.obj");
|
||||||
|
label offset = 0;
|
||||||
|
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
Delaunay::Finite_cells_iterator cit = finite_cells_begin();
|
Delaunay::Finite_cells_iterator cit = finite_cells_begin();
|
||||||
@ -1892,6 +1897,88 @@ void Foam::conformalVoronoiMesh::indexDualVertices
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// {
|
||||||
|
// // Snapping points far outside
|
||||||
|
// if (cit->boundaryDualVertex() && !cit->parallelDualVertex())
|
||||||
|
// {
|
||||||
|
// pointFromPoint dual = cit->dual();
|
||||||
|
//
|
||||||
|
// pointIndexHit hitInfo;
|
||||||
|
// label surfHit;
|
||||||
|
//
|
||||||
|
// // Find nearest surface point
|
||||||
|
// geometryToConformTo_.findSurfaceNearest
|
||||||
|
// (
|
||||||
|
// dual,
|
||||||
|
// sqr(targetCellSize(dual)),
|
||||||
|
// hitInfo,
|
||||||
|
// surfHit
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
// if (!hitInfo.hit())
|
||||||
|
// {
|
||||||
|
// // Project dual to nearest point on tet
|
||||||
|
//
|
||||||
|
// tetPointRef tet
|
||||||
|
// (
|
||||||
|
// topoint(cit->vertex(0)->point()),
|
||||||
|
// topoint(cit->vertex(1)->point()),
|
||||||
|
// topoint(cit->vertex(2)->point()),
|
||||||
|
// topoint(cit->vertex(3)->point())
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
// pointFromPoint nearestPointOnTet =
|
||||||
|
// tet.nearestPoint(dual).rawPoint();
|
||||||
|
//
|
||||||
|
// // Get nearest point on surface from tet.
|
||||||
|
// geometryToConformTo_.findSurfaceNearest
|
||||||
|
// (
|
||||||
|
// nearestPointOnTet,
|
||||||
|
// sqr(targetCellSize(nearestPointOnTet)),
|
||||||
|
// hitInfo,
|
||||||
|
// surfHit
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
// vector snapDir = nearestPointOnTet - dual;
|
||||||
|
// snapDir /= mag(snapDir) + SMALL;
|
||||||
|
//
|
||||||
|
// drawDelaunayCell(tetToSnapTo, cit, offset);
|
||||||
|
// offset += 1;
|
||||||
|
//
|
||||||
|
// vectorField norm(1);
|
||||||
|
// allGeometry_[surfHit].getNormal
|
||||||
|
// (
|
||||||
|
// List<pointIndexHit>(1, hitInfo),
|
||||||
|
// norm
|
||||||
|
// );
|
||||||
|
// norm[0] /= mag(norm[0]) + SMALL;
|
||||||
|
//
|
||||||
|
// if
|
||||||
|
// (
|
||||||
|
// hitInfo.hit()
|
||||||
|
// && (mag(snapDir & norm[0]) > 0.5)
|
||||||
|
// )
|
||||||
|
// {
|
||||||
|
// snapping1.write
|
||||||
|
// (
|
||||||
|
// linePointRef(dual, nearestPointOnTet)
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
// snapping2.write
|
||||||
|
// (
|
||||||
|
// linePointRef
|
||||||
|
// (
|
||||||
|
// nearestPointOnTet,
|
||||||
|
// hitInfo.hitPoint()
|
||||||
|
// )
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
// pts[cit->cellIndex()] = hitInfo.hitPoint();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
if (cit->boundaryDualVertex())
|
if (cit->boundaryDualVertex())
|
||||||
{
|
{
|
||||||
if (cit->featureEdgeDualVertex())
|
if (cit->featureEdgeDualVertex())
|
||||||
@ -2721,7 +2808,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
|
|||||||
patchPointPairSlaves[patchI].transfer(patchPPSlaves[patchI]);
|
patchPointPairSlaves[patchI].transfer(patchPPSlaves[patchI]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (foamyHexMeshControls().objOutput())
|
if (foamyHexMeshControls().objOutput())
|
||||||
{
|
{
|
||||||
Info<< "Writing processor interfaces" << endl;
|
Info<< "Writing processor interfaces" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -1928,14 +1928,16 @@ bool Foam::conformalVoronoiMesh::pointIsNearSurfaceLocation
|
|||||||
|
|
||||||
bool Foam::conformalVoronoiMesh::nearFeatureEdgeLocation
|
bool Foam::conformalVoronoiMesh::nearFeatureEdgeLocation
|
||||||
(
|
(
|
||||||
pointIndexHit& pHit
|
const pointIndexHit& pHit,
|
||||||
|
pointIndexHit& nearestEdgeHit
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
Foam::point pt = pHit.hitPoint();
|
const Foam::point& pt = pHit.hitPoint();
|
||||||
|
|
||||||
const scalar exclusionRangeSqr = featureEdgeExclusionDistanceSqr(pt);
|
const scalar exclusionRangeSqr = featureEdgeExclusionDistanceSqr(pt);
|
||||||
|
|
||||||
bool closeToFeatureEdge = pointIsNearFeatureEdgeLocation(pt);
|
bool closeToFeatureEdge =
|
||||||
|
pointIsNearFeatureEdgeLocation(pt, nearestEdgeHit);
|
||||||
|
|
||||||
if (closeToFeatureEdge)
|
if (closeToFeatureEdge)
|
||||||
{
|
{
|
||||||
@ -1978,15 +1980,11 @@ bool Foam::conformalVoronoiMesh::nearFeatureEdgeLocation
|
|||||||
if
|
if
|
||||||
(
|
(
|
||||||
mag(cosAngle) < searchConeAngle
|
mag(cosAngle) < searchConeAngle
|
||||||
&& (
|
&& (mag(lineBetweenPoints) > pointPairDistance(pt))
|
||||||
mag(lineBetweenPoints)
|
|
||||||
> foamyHexMeshControls().pointPairDistanceCoeff()
|
|
||||||
*targetCellSize(pt)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
pt = edgeHit.hitPoint();
|
//pt = edgeHit.hitPoint();
|
||||||
pHit.setPoint(pt);
|
//pHit.setPoint(pt);
|
||||||
closeToFeatureEdge = false;
|
closeToFeatureEdge = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2183,12 +2181,12 @@ void Foam::conformalVoronoiMesh::addSurfaceAndEdgeHits
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
!pointIsNearFeatureEdgeLocation
|
// !pointIsNearFeatureEdgeLocation
|
||||||
(
|
// (
|
||||||
edPt,
|
// edPt,
|
||||||
nearestEdgeHit
|
// nearestEdgeHit
|
||||||
)
|
// )
|
||||||
// !nearFeatureEdgeLocation(edHit)
|
!nearFeatureEdgeLocation(edHit, nearestEdgeHit)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
appendToEdgeLocationTree(edPt);
|
appendToEdgeLocationTree(edPt);
|
||||||
|
|||||||
@ -337,11 +337,10 @@ inline void Foam::conformalVoronoiMesh::createPointPair
|
|||||||
const Foam::point internalPt = surfPt - ppDistn;
|
const Foam::point internalPt = surfPt - ppDistn;
|
||||||
const Foam::point externalPt = surfPt + ppDistn;
|
const Foam::point externalPt = surfPt + ppDistn;
|
||||||
|
|
||||||
if
|
bool internalInside = geometryToConformTo_.inside(internalPt);
|
||||||
(
|
bool externalOutside = geometryToConformTo_.outside(externalPt);
|
||||||
geometryToConformTo_.inside(internalPt)
|
|
||||||
&& geometryToConformTo_.outside(externalPt)
|
if (internalInside && externalOutside)
|
||||||
)
|
|
||||||
{
|
{
|
||||||
pts.append
|
pts.append
|
||||||
(
|
(
|
||||||
@ -369,11 +368,8 @@ inline void Foam::conformalVoronoiMesh::createPointPair
|
|||||||
{
|
{
|
||||||
Info<< "Warning: point pair not inside/outside" << nl
|
Info<< "Warning: point pair not inside/outside" << nl
|
||||||
<< " surfPt = " << surfPt << nl
|
<< " surfPt = " << surfPt << nl
|
||||||
<< " internal = "
|
<< " internal = " << internalPt << " " << internalInside << nl
|
||||||
<< internalPt << " " << geometryToConformTo_.inside(internalPt)
|
<< " external = " << externalPt << " " << externalOutside
|
||||||
<< nl
|
|
||||||
<< " external = "
|
|
||||||
<< externalPt << " " << geometryToConformTo_.outside(externalPt)
|
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -421,202 +421,247 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (foamyHexMeshControls().writeCellShapeControlMesh())
|
||||||
|
{
|
||||||
|
cellShapeControls().shapeControlMesh().write();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (foamyHexMeshControls().writeBackgroundMeshDecomposition())
|
||||||
|
{
|
||||||
|
Info<< nl << "Writing " << "backgroundMeshDecomposition" << endl;
|
||||||
|
|
||||||
|
// Have to explicitly update the mesh instance.
|
||||||
|
const_cast<fvMesh&>(decomposition_().mesh()).setInstance
|
||||||
|
(
|
||||||
|
time().timeName()
|
||||||
|
);
|
||||||
|
|
||||||
|
decomposition_().mesh().write();
|
||||||
|
}
|
||||||
|
|
||||||
if (foamyHexMeshControls().writeTetDualMesh())
|
if (foamyHexMeshControls().writeTetDualMesh())
|
||||||
{
|
{
|
||||||
// Determine map from Delaunay vertex to Dual mesh
|
label cellI = 0;
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
for
|
||||||
|
(
|
||||||
// From all Delaunay vertices to cell (positive index)
|
Finite_cells_iterator cit = finite_cells_begin();
|
||||||
// or patch face (negative index)
|
cit != finite_cells_end();
|
||||||
labelList vertexToDualAddressing(number_of_vertices(), 0);
|
++cit
|
||||||
|
)
|
||||||
forAll(cellToDelaunayVertex, cellI)
|
|
||||||
{
|
{
|
||||||
label vertI = cellToDelaunayVertex[cellI];
|
if
|
||||||
|
(
|
||||||
if (vertexToDualAddressing[vertI] != 0)
|
!cit->hasFarPoint()
|
||||||
|
&& !is_infinite(cit)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
FatalErrorIn("conformalVoronoiMesh::writeMesh(..)")
|
cit->cellIndex() = cellI++;
|
||||||
<< "Delaunay vertex " << vertI
|
|
||||||
<< " from cell " << cellI
|
|
||||||
<< " is already mapped to "
|
|
||||||
<< vertexToDualAddressing[vertI]
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
vertexToDualAddressing[vertI] = cellI+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
forAll(patchToDelaunayVertex, patchI)
|
|
||||||
{
|
|
||||||
const labelList& patchVertices = patchToDelaunayVertex[patchI];
|
|
||||||
|
|
||||||
forAll(patchVertices, i)
|
|
||||||
{
|
|
||||||
label vertI = patchVertices[i];
|
|
||||||
|
|
||||||
if (vertexToDualAddressing[vertI] > 0)
|
|
||||||
{
|
|
||||||
FatalErrorIn("conformalVoronoiMesh::writeMesh(..)")
|
|
||||||
<< "Delaunay vertex " << vertI
|
|
||||||
<< " from patch " << patchI
|
|
||||||
<< " local index " << i
|
|
||||||
<< " is already mapped to cell "
|
|
||||||
<< vertexToDualAddressing[vertI]-1
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Vertex might be used by multiple faces. Which one to
|
|
||||||
// use? For now last one wins.
|
|
||||||
label dualFaceI = dualPatchStarts[patchI]+i;
|
|
||||||
vertexToDualAddressing[vertI] = -dualFaceI-1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Info<< nl << "Writing " << "tetDualMesh" << endl;
|
||||||
|
|
||||||
// Calculate tet mesh addressing
|
DistributedDelaunayMesh<Delaunay>::labelTolabelPairHashTable vertexMap;
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
labelList cellMap;
|
||||||
|
autoPtr<polyMesh> tetMesh =
|
||||||
|
createMesh("tetDualMesh", vertexMap, cellMap);
|
||||||
|
|
||||||
pointField points;
|
tetMesh().write();
|
||||||
labelList boundaryPts(number_of_finite_cells(), -1);
|
|
||||||
// From tet point back to Delaunay vertex index
|
|
||||||
labelList pointToDelaunayVertex;
|
|
||||||
faceList faces;
|
|
||||||
labelList owner;
|
|
||||||
labelList neighbour;
|
|
||||||
wordList patchTypes;
|
|
||||||
wordList patchNames;
|
|
||||||
PtrList<dictionary> patchDicts;
|
|
||||||
pointField cellCentres;
|
|
||||||
|
|
||||||
calcTetMesh
|
// // Determine map from Delaunay vertex to Dual mesh
|
||||||
(
|
// // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
points,
|
//
|
||||||
pointToDelaunayVertex,
|
// // From all Delaunay vertices to cell (positive index)
|
||||||
faces,
|
// // or patch face (negative index)
|
||||||
owner,
|
// labelList vertexToDualAddressing(number_of_vertices(), 0);
|
||||||
neighbour,
|
//
|
||||||
patchTypes,
|
// forAll(cellToDelaunayVertex, cellI)
|
||||||
patchNames,
|
// {
|
||||||
patchDicts
|
// label vertI = cellToDelaunayVertex[cellI];
|
||||||
);
|
//
|
||||||
|
// if (vertexToDualAddressing[vertI] != 0)
|
||||||
|
// {
|
||||||
|
// FatalErrorIn("conformalVoronoiMesh::writeMesh(..)")
|
||||||
// Calculate map from tet points to dual mesh cells/patch faces
|
// << "Delaunay vertex " << vertI
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// << " from cell " << cellI
|
||||||
|
// << " is already mapped to "
|
||||||
labelIOList pointDualAddressing
|
// << vertexToDualAddressing[vertI]
|
||||||
(
|
// << exit(FatalError);
|
||||||
IOobject
|
// }
|
||||||
(
|
// vertexToDualAddressing[vertI] = cellI+1;
|
||||||
"pointDualAddressing",
|
// }
|
||||||
instance,
|
//
|
||||||
"tetDualMesh"/polyMesh::meshSubDir,
|
// forAll(patchToDelaunayVertex, patchI)
|
||||||
runTime_,
|
// {
|
||||||
IOobject::NO_READ,
|
// const labelList& patchVertices = patchToDelaunayVertex[patchI];
|
||||||
IOobject::AUTO_WRITE,
|
//
|
||||||
false
|
// forAll(patchVertices, i)
|
||||||
),
|
// {
|
||||||
UIndirectList<label>
|
// label vertI = patchVertices[i];
|
||||||
(
|
//
|
||||||
vertexToDualAddressing,
|
// if (vertexToDualAddressing[vertI] > 0)
|
||||||
pointToDelaunayVertex
|
// {
|
||||||
)()
|
// FatalErrorIn("conformalVoronoiMesh::writeMesh(..)")
|
||||||
);
|
// << "Delaunay vertex " << vertI
|
||||||
|
// << " from patch " << patchI
|
||||||
label pointI = findIndex(pointDualAddressing, -1);
|
// << " local index " << i
|
||||||
if (pointI != -1)
|
// << " is already mapped to cell "
|
||||||
{
|
// << vertexToDualAddressing[vertI]-1
|
||||||
WarningIn
|
// << exit(FatalError);
|
||||||
(
|
// }
|
||||||
"conformalVoronoiMesh::writeMesh\n"
|
//
|
||||||
"(\n"
|
// // Vertex might be used by multiple faces. Which one to
|
||||||
" const fileName& instance,\n"
|
// // use? For now last one wins.
|
||||||
" bool filterFaces\n"
|
// label dualFaceI = dualPatchStarts[patchI]+i;
|
||||||
")\n"
|
// vertexToDualAddressing[vertI] = -dualFaceI-1;
|
||||||
) << "Delaunay vertex " << pointI
|
// }
|
||||||
<< " does not have a corresponding dual cell." << endl;
|
// }
|
||||||
}
|
//
|
||||||
|
//
|
||||||
Info<< "Writing map from tetDualMesh points to Voronoi mesh to "
|
// // Calculate tet mesh addressing
|
||||||
<< pointDualAddressing.objectPath() << endl;
|
// // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
pointDualAddressing.write();
|
//
|
||||||
|
// pointField points;
|
||||||
|
// labelList boundaryPts(number_of_finite_cells(), -1);
|
||||||
|
// // From tet point back to Delaunay vertex index
|
||||||
// Write tet points corresponding to the Voronoi cell/face centre
|
// labelList pointToDelaunayVertex;
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// faceList faces;
|
||||||
{
|
// labelList owner;
|
||||||
// Read Voronoi mesh
|
// labelList neighbour;
|
||||||
fvMesh mesh
|
// wordList patchTypes;
|
||||||
(
|
// wordList patchNames;
|
||||||
IOobject
|
// PtrList<dictionary> patchDicts;
|
||||||
(
|
// pointField cellCentres;
|
||||||
Foam::polyMesh::defaultRegion,
|
//
|
||||||
instance,
|
// calcTetMesh
|
||||||
runTime_,
|
// (
|
||||||
IOobject::MUST_READ
|
// points,
|
||||||
)
|
// pointToDelaunayVertex,
|
||||||
);
|
// faces,
|
||||||
pointIOField dualPoints
|
// owner,
|
||||||
(
|
// neighbour,
|
||||||
IOobject
|
// patchTypes,
|
||||||
(
|
// patchNames,
|
||||||
"dualPoints",
|
// patchDicts
|
||||||
instance,
|
// );
|
||||||
"tetDualMesh"/polyMesh::meshSubDir,
|
//
|
||||||
runTime_,
|
//
|
||||||
IOobject::NO_READ,
|
//
|
||||||
IOobject::AUTO_WRITE,
|
// // Calculate map from tet points to dual mesh cells/patch faces
|
||||||
false
|
// // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
),
|
//
|
||||||
points
|
// labelIOList pointDualAddressing
|
||||||
);
|
// (
|
||||||
|
// IOobject
|
||||||
forAll(pointDualAddressing, pointI)
|
// (
|
||||||
{
|
// "pointDualAddressing",
|
||||||
label index = pointDualAddressing[pointI];
|
// instance,
|
||||||
|
// "tetDualMesh"/polyMesh::meshSubDir,
|
||||||
if (index > 0)
|
// runTime_,
|
||||||
{
|
// IOobject::NO_READ,
|
||||||
label cellI = index-1;
|
// IOobject::AUTO_WRITE,
|
||||||
dualPoints[pointI] = mesh.cellCentres()[cellI];
|
// false
|
||||||
}
|
// ),
|
||||||
else if (index < 0)
|
// UIndirectList<label>
|
||||||
{
|
// (
|
||||||
label faceI = -index-1;
|
// vertexToDualAddressing,
|
||||||
if (faceI >= mesh.nInternalFaces())
|
// pointToDelaunayVertex
|
||||||
{
|
// )()
|
||||||
dualPoints[pointI] = mesh.faceCentres()[faceI];
|
// );
|
||||||
}
|
//
|
||||||
}
|
// label pointI = findIndex(pointDualAddressing, -1);
|
||||||
}
|
// if (pointI != -1)
|
||||||
|
// {
|
||||||
Info<< "Writing new tetDualMesh points mapped onto Voronoi mesh to "
|
// WarningIn
|
||||||
<< dualPoints.objectPath() << endl
|
// (
|
||||||
<< "Replace the polyMesh/points with these." << endl;
|
// "conformalVoronoiMesh::writeMesh\n"
|
||||||
dualPoints.write();
|
// "(\n"
|
||||||
}
|
// " const fileName& instance,\n"
|
||||||
|
// " bool filterFaces\n"
|
||||||
|
// ")\n"
|
||||||
Info<< nl << "Writing tetDualMesh to " << instance << endl;
|
// ) << "Delaunay vertex " << pointI
|
||||||
|
// << " does not have a corresponding dual cell." << endl;
|
||||||
PackedBoolList boundaryFacesToRemove;
|
// }
|
||||||
writeMesh
|
//
|
||||||
(
|
// Info<< "Writing map from tetDualMesh points to Voronoi mesh to "
|
||||||
"tetDualMesh",
|
// << pointDualAddressing.objectPath() << endl;
|
||||||
instance,
|
// pointDualAddressing.write();
|
||||||
points,
|
//
|
||||||
boundaryPts,
|
//
|
||||||
faces,
|
//
|
||||||
owner,
|
// // Write tet points corresponding to the Voronoi cell/face centre
|
||||||
neighbour,
|
// // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
patchTypes,
|
// {
|
||||||
patchNames,
|
// // Read Voronoi mesh
|
||||||
patchDicts,
|
// fvMesh mesh
|
||||||
cellCentres,
|
// (
|
||||||
boundaryFacesToRemove
|
// IOobject
|
||||||
);
|
// (
|
||||||
|
// Foam::polyMesh::defaultRegion,
|
||||||
|
// instance,
|
||||||
|
// runTime_,
|
||||||
|
// IOobject::MUST_READ
|
||||||
|
// )
|
||||||
|
// );
|
||||||
|
// pointIOField dualPoints
|
||||||
|
// (
|
||||||
|
// IOobject
|
||||||
|
// (
|
||||||
|
// "dualPoints",
|
||||||
|
// instance,
|
||||||
|
// "tetDualMesh"/polyMesh::meshSubDir,
|
||||||
|
// runTime_,
|
||||||
|
// IOobject::NO_READ,
|
||||||
|
// IOobject::AUTO_WRITE,
|
||||||
|
// false
|
||||||
|
// ),
|
||||||
|
// points
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
// forAll(pointDualAddressing, pointI)
|
||||||
|
// {
|
||||||
|
// label index = pointDualAddressing[pointI];
|
||||||
|
//
|
||||||
|
// if (index > 0)
|
||||||
|
// {
|
||||||
|
// label cellI = index-1;
|
||||||
|
// dualPoints[pointI] = mesh.cellCentres()[cellI];
|
||||||
|
// }
|
||||||
|
// else if (index < 0)
|
||||||
|
// {
|
||||||
|
// label faceI = -index-1;
|
||||||
|
// if (faceI >= mesh.nInternalFaces())
|
||||||
|
// {
|
||||||
|
// dualPoints[pointI] = mesh.faceCentres()[faceI];
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// Info<< "Writing tetDualMesh points mapped onto Voronoi mesh to "
|
||||||
|
// << dualPoints.objectPath() << endl
|
||||||
|
// << "Replace the polyMesh/points with these." << endl;
|
||||||
|
// dualPoints.write();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Info<< nl << "Writing tetDualMesh to " << instance << endl;
|
||||||
|
//
|
||||||
|
// PackedBoolList boundaryFacesToRemove;
|
||||||
|
// writeMesh
|
||||||
|
// (
|
||||||
|
// "tetDualMesh",
|
||||||
|
// instance,
|
||||||
|
// points,
|
||||||
|
// boundaryPts,
|
||||||
|
// faces,
|
||||||
|
// owner,
|
||||||
|
// neighbour,
|
||||||
|
// patchTypes,
|
||||||
|
// patchNames,
|
||||||
|
// patchDicts,
|
||||||
|
// cellCentres,
|
||||||
|
// boundaryFacesToRemove
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -247,6 +247,20 @@ Foam::cvControls::cvControls
|
|||||||
}
|
}
|
||||||
|
|
||||||
writeTetDualMesh_ = Switch(filteringDict.lookup("writeTetDualMesh"));
|
writeTetDualMesh_ = Switch(filteringDict.lookup("writeTetDualMesh"));
|
||||||
|
|
||||||
|
writeCellShapeControlMesh_ =
|
||||||
|
Switch(filteringDict.lookup("writeCellShapeControlMesh"));
|
||||||
|
|
||||||
|
if (Pstream::parRun())
|
||||||
|
{
|
||||||
|
writeBackgroundMeshDecomposition_ =
|
||||||
|
Switch(filteringDict.lookup("writeBackgroundMeshDecomposition"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
writeBackgroundMeshDecomposition_ = Switch(false);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -202,6 +202,10 @@ class cvControls
|
|||||||
//- Write tet mesh at output time (it always writes the Voronoi)
|
//- Write tet mesh at output time (it always writes the Voronoi)
|
||||||
Switch writeTetDualMesh_;
|
Switch writeTetDualMesh_;
|
||||||
|
|
||||||
|
Switch writeCellShapeControlMesh_;
|
||||||
|
|
||||||
|
Switch writeBackgroundMeshDecomposition_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
@ -335,6 +339,12 @@ public:
|
|||||||
|
|
||||||
//- Write tetMesh at output time
|
//- Write tetMesh at output time
|
||||||
inline Switch writeTetDualMesh() const;
|
inline Switch writeTetDualMesh() const;
|
||||||
|
|
||||||
|
//- Write cellShapeControlMesh at output time
|
||||||
|
inline Switch writeCellShapeControlMesh() const;
|
||||||
|
|
||||||
|
//- Write backgroundMeshDecomposition at output time
|
||||||
|
inline Switch writeBackgroundMeshDecomposition() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -215,5 +215,15 @@ inline Foam::Switch Foam::cvControls::writeTetDualMesh() const
|
|||||||
return writeTetDualMesh_;
|
return writeTetDualMesh_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline Foam::Switch Foam::cvControls::writeCellShapeControlMesh() const
|
||||||
|
{
|
||||||
|
return writeCellShapeControlMesh_;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline Foam::Switch Foam::cvControls::writeBackgroundMeshDecomposition() const
|
||||||
|
{
|
||||||
|
return writeBackgroundMeshDecomposition_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -58,7 +58,7 @@ List<Vb::Point> pointFile::initialPoints() const
|
|||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
pointFileName_.name(),
|
pointFileName_.name(),
|
||||||
foamyHexMesh_.time().constant(),
|
foamyHexMesh_.time().timeName(),
|
||||||
foamyHexMesh_.time(),
|
foamyHexMesh_.time(),
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
|
|||||||
@ -45,12 +45,22 @@ int main(int argc, char *argv[])
|
|||||||
"check all surface geometry for quality"
|
"check all surface geometry for quality"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Foam::argList::addBoolOption
|
||||||
|
(
|
||||||
|
"conformationOnly",
|
||||||
|
"conform to the initial points without any point motion"
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "addOverwriteOption.H"
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
|
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
|
|
||||||
const bool checkGeometry = args.optionFound("checkGeometry");
|
const bool checkGeometry = args.optionFound("checkGeometry");
|
||||||
|
const bool conformationOnly = args.optionFound("conformationOnly");
|
||||||
|
const bool overwrite = args.optionFound("overwrite");
|
||||||
|
|
||||||
IOdictionary foamyHexMeshDict
|
IOdictionary foamyHexMeshDict
|
||||||
(
|
(
|
||||||
@ -101,19 +111,38 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
conformalVoronoiMesh::debug = true;
|
conformalVoronoiMesh::debug = true;
|
||||||
|
|
||||||
|
Info<< "Create mesh for time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
conformalVoronoiMesh mesh(runTime, foamyHexMeshDict);
|
conformalVoronoiMesh mesh(runTime, foamyHexMeshDict);
|
||||||
|
|
||||||
|
|
||||||
while (runTime.loop())
|
if (conformationOnly)
|
||||||
{
|
{
|
||||||
Info<< nl << "Time = " << runTime.timeName() << endl;
|
mesh.initialiseForConformation();
|
||||||
|
|
||||||
mesh.move();
|
if (!overwrite)
|
||||||
|
{
|
||||||
|
runTime++;
|
||||||
|
}
|
||||||
|
|
||||||
Info<< nl << "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
mesh.writeMesh(runTime.timeName());
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
|
||||||
<< endl;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mesh.initialiseForMotion();
|
||||||
|
|
||||||
|
while (runTime.loop())
|
||||||
|
{
|
||||||
|
Info<< nl << "Time = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
|
mesh.move();
|
||||||
|
|
||||||
|
Info<< nl << "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Info<< nl << "End" << nl << endl;
|
Info<< nl << "End" << nl << endl;
|
||||||
|
|
||||||
|
|||||||
@ -55,6 +55,9 @@ Usage
|
|||||||
\param -fields \n
|
\param -fields \n
|
||||||
Use existing geometry decomposition and convert fields only.
|
Use existing geometry decomposition and convert fields only.
|
||||||
|
|
||||||
|
\param -sets \n
|
||||||
|
Decompose cellSets, faceSets, pointSets.
|
||||||
|
|
||||||
\param -force \n
|
\param -force \n
|
||||||
Remove any existing \a processor subdirectories before decomposing the
|
Remove any existing \a processor subdirectories before decomposing the
|
||||||
geometry.
|
geometry.
|
||||||
@ -127,6 +130,11 @@ int main(int argc, char *argv[])
|
|||||||
"use existing geometry decomposition and convert fields only"
|
"use existing geometry decomposition and convert fields only"
|
||||||
);
|
);
|
||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"sets",
|
||||||
|
"decompose cellSets, faceSets, pointSets"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
"force",
|
"force",
|
||||||
"remove existing processor*/ subdirs before decomposing the geometry"
|
"remove existing processor*/ subdirs before decomposing the geometry"
|
||||||
@ -146,6 +154,7 @@ int main(int argc, char *argv[])
|
|||||||
bool writeCellDist = args.optionFound("cellDist");
|
bool writeCellDist = args.optionFound("cellDist");
|
||||||
bool copyUniform = args.optionFound("copyUniform");
|
bool copyUniform = args.optionFound("copyUniform");
|
||||||
bool decomposeFieldsOnly = args.optionFound("fields");
|
bool decomposeFieldsOnly = args.optionFound("fields");
|
||||||
|
bool decomposeSets = args.optionFound("sets");
|
||||||
bool forceOverwrite = args.optionFound("force");
|
bool forceOverwrite = args.optionFound("force");
|
||||||
bool ifRequiredDecomposition = args.optionFound("ifRequired");
|
bool ifRequiredDecomposition = args.optionFound("ifRequired");
|
||||||
|
|
||||||
@ -312,7 +321,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
mesh.decomposeMesh();
|
mesh.decomposeMesh();
|
||||||
|
|
||||||
mesh.writeDecomposition();
|
mesh.writeDecomposition(decomposeSets);
|
||||||
|
|
||||||
if (writeCellDist)
|
if (writeCellDist)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -34,6 +34,10 @@ License
|
|||||||
#include "globalMeshData.H"
|
#include "globalMeshData.H"
|
||||||
#include "DynamicList.H"
|
#include "DynamicList.H"
|
||||||
#include "fvFieldDecomposer.H"
|
#include "fvFieldDecomposer.H"
|
||||||
|
#include "IOobjectList.H"
|
||||||
|
#include "cellSet.H"
|
||||||
|
#include "faceSet.H"
|
||||||
|
#include "pointSet.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -123,7 +127,7 @@ Foam::domainDecomposition::~domainDecomposition()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
bool Foam::domainDecomposition::writeDecomposition()
|
bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
|
||||||
{
|
{
|
||||||
Info<< "\nConstructing processor meshes" << endl;
|
Info<< "\nConstructing processor meshes" << endl;
|
||||||
|
|
||||||
@ -160,6 +164,37 @@ bool Foam::domainDecomposition::writeDecomposition()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PtrList<const cellSet> cellSets;
|
||||||
|
PtrList<const faceSet> faceSets;
|
||||||
|
PtrList<const pointSet> pointSets;
|
||||||
|
if (decomposeSets)
|
||||||
|
{
|
||||||
|
// Read sets
|
||||||
|
IOobjectList objects(*this, facesInstance(), "polyMesh/sets");
|
||||||
|
{
|
||||||
|
IOobjectList cSets(objects.lookupClass(cellSet::typeName));
|
||||||
|
forAllConstIter(IOobjectList, cSets, iter)
|
||||||
|
{
|
||||||
|
cellSets.append(new cellSet(*iter()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
IOobjectList fSets(objects.lookupClass(faceSet::typeName));
|
||||||
|
forAllConstIter(IOobjectList, fSets, iter)
|
||||||
|
{
|
||||||
|
faceSets.append(new faceSet(*iter()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
IOobjectList pSets(objects.lookupClass(pointSet::typeName));
|
||||||
|
forAllConstIter(IOobjectList, pSets, iter)
|
||||||
|
{
|
||||||
|
pointSets.append(new pointSet(*iter()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
label maxProcCells = 0;
|
label maxProcCells = 0;
|
||||||
label totProcFaces = 0;
|
label totProcFaces = 0;
|
||||||
label maxProcPatches = 0;
|
label maxProcPatches = 0;
|
||||||
@ -732,6 +767,52 @@ bool Foam::domainDecomposition::writeDecomposition()
|
|||||||
|
|
||||||
procMesh.write();
|
procMesh.write();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (decomposeSets)
|
||||||
|
{
|
||||||
|
forAll(cellSets, i)
|
||||||
|
{
|
||||||
|
const cellSet& cs = cellSets[i];
|
||||||
|
cellSet set(procMesh, cs.name(), cs.size()/nProcs_);
|
||||||
|
forAll(curCellLabels, i)
|
||||||
|
{
|
||||||
|
if (cs.found(curCellLabels[i]))
|
||||||
|
{
|
||||||
|
set.insert(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set.write();
|
||||||
|
}
|
||||||
|
forAll(faceSets, i)
|
||||||
|
{
|
||||||
|
const faceSet& cs = faceSets[i];
|
||||||
|
faceSet set(procMesh, cs.name(), cs.size()/nProcs_);
|
||||||
|
forAll(curFaceLabels, i)
|
||||||
|
{
|
||||||
|
if (cs.found(mag(curFaceLabels[i])-1))
|
||||||
|
{
|
||||||
|
set.insert(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set.write();
|
||||||
|
}
|
||||||
|
forAll(pointSets, i)
|
||||||
|
{
|
||||||
|
const pointSet& cs = pointSets[i];
|
||||||
|
pointSet set(procMesh, cs.name(), cs.size()/nProcs_);
|
||||||
|
forAll(curPointLabels, i)
|
||||||
|
{
|
||||||
|
if (cs.found(curPointLabels[i]))
|
||||||
|
{
|
||||||
|
set.insert(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set.write();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Write points if pointsInstance differing from facesInstance
|
// Write points if pointsInstance differing from facesInstance
|
||||||
if (facesInstancePointsPtr_.valid())
|
if (facesInstancePointsPtr_.valid())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -172,7 +172,7 @@ public:
|
|||||||
void decomposeMesh();
|
void decomposeMesh();
|
||||||
|
|
||||||
//- Write decomposition
|
//- Write decomposition
|
||||||
bool writeDecomposition();
|
bool writeDecomposition(const bool decomposeSets);
|
||||||
|
|
||||||
//- Cell-processor decomposition labels
|
//- Cell-processor decomposition labels
|
||||||
const labelList& cellToProc() const
|
const labelList& cellToProc() const
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
|
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
|
||||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude
|
||||||
|
|
||||||
|
|||||||
@ -41,6 +41,10 @@ Description
|
|||||||
#include "pointFieldReconstructor.H"
|
#include "pointFieldReconstructor.H"
|
||||||
#include "reconstructLagrangian.H"
|
#include "reconstructLagrangian.H"
|
||||||
|
|
||||||
|
#include "cellSet.H"
|
||||||
|
#include "faceSet.H"
|
||||||
|
#include "pointSet.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
bool haveAllTimes
|
bool haveAllTimes
|
||||||
@ -99,6 +103,11 @@ int main(int argc, char *argv[])
|
|||||||
"skip reconstructing lagrangian positions and fields"
|
"skip reconstructing lagrangian positions and fields"
|
||||||
);
|
);
|
||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"sets",
|
||||||
|
"reconstruct cellSets, faceSets, pointSets"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
"newTimes",
|
"newTimes",
|
||||||
"only reconstruct new times (i.e. that do not exist already)"
|
"only reconstruct new times (i.e. that do not exist already)"
|
||||||
@ -113,6 +122,9 @@ int main(int argc, char *argv[])
|
|||||||
args.optionLookup("fields")() >> selectedFields;
|
args.optionLookup("fields")() >> selectedFields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool reconstructSets = args.optionFound("sets");
|
||||||
|
|
||||||
|
|
||||||
const bool noLagrangian = args.optionFound("noLagrangian");
|
const bool noLagrangian = args.optionFound("noLagrangian");
|
||||||
|
|
||||||
HashSet<word> selectedLagrangianFields;
|
HashSet<word> selectedLagrangianFields;
|
||||||
@ -668,6 +680,148 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "No lagrangian fields" << nl << endl;
|
Info<< "No lagrangian fields" << nl << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (reconstructSets)
|
||||||
|
{
|
||||||
|
// Scan to find all sets
|
||||||
|
HashTable<label> cSetNames;
|
||||||
|
HashTable<label> fSetNames;
|
||||||
|
HashTable<label> pSetNames;
|
||||||
|
|
||||||
|
forAll(procMeshes.meshes(), procI)
|
||||||
|
{
|
||||||
|
const fvMesh& procMesh = procMeshes.meshes()[procI];
|
||||||
|
|
||||||
|
IOobjectList objects
|
||||||
|
(
|
||||||
|
procMesh, procMesh.facesInstance(), "polyMesh/sets"
|
||||||
|
);
|
||||||
|
IOobjectList cSets(objects.lookupClass(cellSet::typeName));
|
||||||
|
forAllConstIter(IOobjectList, cSets, iter)
|
||||||
|
{
|
||||||
|
cSetNames.insert(iter.key(), cSetNames.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
IOobjectList fSets(objects.lookupClass(faceSet::typeName));
|
||||||
|
forAllConstIter(IOobjectList, fSets, iter)
|
||||||
|
{
|
||||||
|
fSetNames.insert(iter.key(), fSetNames.size());
|
||||||
|
}
|
||||||
|
IOobjectList pSets(objects.lookupClass(pointSet::typeName));
|
||||||
|
forAllConstIter(IOobjectList, pSets, iter)
|
||||||
|
{
|
||||||
|
pSetNames.insert(iter.key(), pSetNames.size());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Construct all sets
|
||||||
|
PtrList<cellSet> cellSets(cSetNames.size());
|
||||||
|
PtrList<faceSet> faceSets(fSetNames.size());
|
||||||
|
PtrList<pointSet> pointSets(pSetNames.size());
|
||||||
|
|
||||||
|
// Load sets
|
||||||
|
forAll(procMeshes.meshes(), procI)
|
||||||
|
{
|
||||||
|
const fvMesh& procMesh = procMeshes.meshes()[procI];
|
||||||
|
|
||||||
|
IOobjectList objects
|
||||||
|
(
|
||||||
|
procMesh, procMesh.facesInstance(), "polyMesh/sets"
|
||||||
|
);
|
||||||
|
|
||||||
|
// cellSets
|
||||||
|
const labelList& cellMap =
|
||||||
|
procMeshes.cellProcAddressing()[procI];
|
||||||
|
|
||||||
|
IOobjectList cSets(objects.lookupClass(cellSet::typeName));
|
||||||
|
forAllConstIter(IOobjectList, cSets, iter)
|
||||||
|
{
|
||||||
|
// Load cellSet
|
||||||
|
const cellSet procSet(*iter());
|
||||||
|
label setI = cSetNames[iter.key()];
|
||||||
|
if (!cellSets.set(setI))
|
||||||
|
{
|
||||||
|
cellSets.set
|
||||||
|
(
|
||||||
|
setI,
|
||||||
|
new cellSet(mesh, iter.key(), procSet.size())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
cellSet& cSet = cellSets[setI];
|
||||||
|
|
||||||
|
forAllConstIter(cellSet, procSet, iter)
|
||||||
|
{
|
||||||
|
cSet.insert(cellMap[iter.key()]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// faceSets
|
||||||
|
const labelList& faceMap =
|
||||||
|
procMeshes.faceProcAddressing()[procI];
|
||||||
|
|
||||||
|
IOobjectList fSets(objects.lookupClass(faceSet::typeName));
|
||||||
|
forAllConstIter(IOobjectList, fSets, iter)
|
||||||
|
{
|
||||||
|
// Load faceSet
|
||||||
|
const faceSet procSet(*iter());
|
||||||
|
label setI = fSetNames[iter.key()];
|
||||||
|
if (!faceSets.set(setI))
|
||||||
|
{
|
||||||
|
faceSets.set
|
||||||
|
(
|
||||||
|
setI,
|
||||||
|
new faceSet(mesh, iter.key(), procSet.size())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
faceSet& fSet = faceSets[setI];
|
||||||
|
|
||||||
|
forAllConstIter(faceSet, procSet, iter)
|
||||||
|
{
|
||||||
|
fSet.insert(mag(faceMap[iter.key()])-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// pointSets
|
||||||
|
const labelList& pointMap =
|
||||||
|
procMeshes.pointProcAddressing()[procI];
|
||||||
|
|
||||||
|
IOobjectList pSets(objects.lookupClass(pointSet::typeName));
|
||||||
|
forAllConstIter(IOobjectList, pSets, iter)
|
||||||
|
{
|
||||||
|
// Load pointSet
|
||||||
|
const pointSet propSet(*iter());
|
||||||
|
label setI = pSetNames[iter.key()];
|
||||||
|
if (!pointSets.set(setI))
|
||||||
|
{
|
||||||
|
pointSets.set
|
||||||
|
(
|
||||||
|
setI,
|
||||||
|
new pointSet(mesh, iter.key(), propSet.size())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
pointSet& pSet = pointSets[setI];
|
||||||
|
|
||||||
|
forAllConstIter(pointSet, propSet, iter)
|
||||||
|
{
|
||||||
|
pSet.insert(pointMap[iter.key()]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write sets
|
||||||
|
forAll(cellSets, i)
|
||||||
|
{
|
||||||
|
cellSets[i].write();
|
||||||
|
}
|
||||||
|
forAll(faceSets, i)
|
||||||
|
{
|
||||||
|
faceSets[i].write();
|
||||||
|
}
|
||||||
|
forAll(pointSets, i)
|
||||||
|
{
|
||||||
|
pointSets[i].write();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +0,0 @@
|
|||||||
vtkPV398Foam.C
|
|
||||||
vtkPV398FoamFields.C
|
|
||||||
vtkPV398FoamMesh.C
|
|
||||||
vtkPV398FoamMeshLagrangian.C
|
|
||||||
vtkPV398FoamMeshSet.C
|
|
||||||
vtkPV398FoamMeshVolume.C
|
|
||||||
vtkPV398FoamMeshZone.C
|
|
||||||
vtkPV398FoamUpdateInfo.C
|
|
||||||
vtkPV398FoamUtils.C
|
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libvtkPV398Foam
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
vtkPV398blockMesh.C
|
|
||||||
vtkPV398blockMeshConvert.C
|
|
||||||
vtkPV398blockMeshUtils.C
|
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libvtkPV398blockMesh
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
vtkPV398Readers.C
|
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libvtkPV398Readers
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
if [ "$ParaView_VERSION" != "3.98.1" ]
|
if [ "$ParaView_VERSION" != "4.0.1" ]
|
||||||
then
|
then
|
||||||
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
|
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
|
||||||
then
|
then
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
wclean libso vtkPV398Readers
|
wclean libso vtkPV4Readers
|
||||||
PV398blockMeshReader/Allwclean
|
PV4blockMeshReader/Allwclean
|
||||||
PV398FoamReader/Allwclean
|
PV4FoamReader/Allwclean
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
@ -2,7 +2,7 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
if [ "$ParaView_VERSION" == "3.98.1" ]
|
if [ "$ParaView_VERSION" == "4.0.1" ]
|
||||||
then
|
then
|
||||||
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
|
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
|
||||||
then
|
then
|
||||||
@ -14,14 +14,14 @@ if [ "$ParaView_VERSION" == "3.98.1" ]
|
|||||||
# ensure CMake gets the correct C++ compiler
|
# ensure CMake gets the correct C++ compiler
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
|
||||||
wmake libso vtkPV398Readers
|
wmake libso vtkPV4Readers
|
||||||
PV398blockMeshReader/Allwmake
|
PV4blockMeshReader/Allwmake
|
||||||
PV398FoamReader/Allwmake
|
PV4FoamReader/Allwmake
|
||||||
else
|
else
|
||||||
echo "ERROR: ParaView not found in $ParaView_DIR"
|
echo "ERROR: ParaView not found in $ParaView_DIR"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "WARN: PV398 readers not building: ParaView_VERSION=$ParaView_VERSION"
|
echo "WARN: PV4 readers not building: ParaView_VERSION=$ParaView_VERSION"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
@ -3,9 +3,9 @@ cd ${0%/*} || exit 1 # run from this directory
|
|||||||
set -x
|
set -x
|
||||||
|
|
||||||
# deal with client/server vs combined plugins
|
# deal with client/server vs combined plugins
|
||||||
rm -f $FOAM_LIBBIN/libPV398FoamReader* 2>/dev/null
|
rm -f $FOAM_LIBBIN/libPV4FoamReader* 2>/dev/null
|
||||||
|
|
||||||
rm -rf PV398FoamReader/Make
|
rm -rf PV4FoamReader/Make
|
||||||
wclean libso vtkPV398Foam
|
wclean libso vtkPV4Foam
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
@ -4,9 +4,9 @@ set -x
|
|||||||
|
|
||||||
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
|
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
|
||||||
then
|
then
|
||||||
wmake libso vtkPV398Foam
|
wmake libso vtkPV4Foam
|
||||||
(
|
(
|
||||||
cd PV398FoamReader
|
cd PV4FoamReader
|
||||||
mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1
|
mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1
|
||||||
cd Make/$WM_OPTIONS
|
cd Make/$WM_OPTIONS
|
||||||
cmake ../..
|
cmake ../..
|
||||||
@ -21,7 +21,7 @@ INCLUDE_DIRECTORIES(
|
|||||||
$ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude
|
$ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude
|
||||||
$ENV{WM_PROJECT_DIR}/src/OSspecific/$ENV{WM_OSTYPE}/lnInclude
|
$ENV{WM_PROJECT_DIR}/src/OSspecific/$ENV{WM_OSTYPE}/lnInclude
|
||||||
$ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude
|
$ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude
|
||||||
${PROJECT_SOURCE_DIR}/../vtkPV398Foam
|
${PROJECT_SOURCE_DIR}/../vtkPV4Foam
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_DEFINITIONS(
|
ADD_DEFINITIONS(
|
||||||
@ -41,45 +41,45 @@ SET(
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Extend the auto-generated panel
|
# Extend the auto-generated panel
|
||||||
QT4_WRAP_CPP(MOC_SRCS pqPV398FoamReaderPanel.h)
|
QT4_WRAP_CPP(MOC_SRCS pqPV4FoamReaderPanel.h)
|
||||||
|
|
||||||
ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS
|
ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS
|
||||||
CLASS_NAME pqPV398FoamReaderPanel
|
CLASS_NAME pqPV4FoamReaderPanel
|
||||||
XML_NAME PV398FoamReader # name of SourceProxy in *SM.xml
|
XML_NAME PV4FoamReader # name of SourceProxy in *SM.xml
|
||||||
XML_GROUP sources
|
XML_GROUP sources
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_PARAVIEW_PLUGIN(
|
ADD_PARAVIEW_PLUGIN(
|
||||||
PV398FoamReader_SM "1.0"
|
PV4FoamReader_SM "1.0"
|
||||||
SERVER_MANAGER_XML PV398FoamReader_SM.xml
|
SERVER_MANAGER_XML PV4FoamReader_SM.xml
|
||||||
SERVER_MANAGER_SOURCES vtkPV398FoamReader.cxx
|
SERVER_MANAGER_SOURCES vtkPV4FoamReader.cxx
|
||||||
GUI_INTERFACES ${IFACES}
|
GUI_INTERFACES ${IFACES}
|
||||||
GUI_SOURCES pqPV398FoamReaderPanel.cxx
|
GUI_SOURCES pqPV4FoamReaderPanel.cxx
|
||||||
${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
|
${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
|
||||||
GUI_RESOURCE_FILES PV398FoamReader.xml
|
GUI_RESOURCE_FILES PV4FoamReader.xml
|
||||||
)
|
)
|
||||||
|
|
||||||
# #
|
# #
|
||||||
# # Define the server-side portion of the reader plugin
|
# # Define the server-side portion of the reader plugin
|
||||||
# #
|
# #
|
||||||
# ADD_PARAVIEW_PLUGIN(
|
# ADD_PARAVIEW_PLUGIN(
|
||||||
# PV398FoamReader_SM "1.0"
|
# PV4FoamReader_SM "1.0"
|
||||||
# SERVER_MANAGER_XML PV398FoamReader_SM.xml
|
# SERVER_MANAGER_XML PV4FoamReader_SM.xml
|
||||||
# SERVER_MANAGER_SOURCES vtkPV398FoamReader.cxx
|
# SERVER_MANAGER_SOURCES vtkPV4FoamReader.cxx
|
||||||
# )
|
# )
|
||||||
# #
|
# #
|
||||||
# # Define the client-side portion of the reader plugin
|
# # Define the client-side portion of the reader plugin
|
||||||
# #
|
# #
|
||||||
# ADD_PARAVIEW_PLUGIN(
|
# ADD_PARAVIEW_PLUGIN(
|
||||||
# PV398FoamReader "1.0"
|
# PV4FoamReader "1.0"
|
||||||
# GUI_RESOURCES PV3FoamReader.qrc
|
# GUI_RESOURCES PV3FoamReader.qrc
|
||||||
# )
|
# )
|
||||||
#
|
#
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(
|
TARGET_LINK_LIBRARIES(
|
||||||
PV398FoamReader_SM
|
PV4FoamReader_SM
|
||||||
OpenFOAM
|
OpenFOAM
|
||||||
finiteVolume
|
finiteVolume
|
||||||
vtkPV398Foam
|
vtkPV4Foam
|
||||||
)
|
)
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/ParaViewResources" >
|
<qresource prefix="/ParaViewResources" >
|
||||||
<file>PV398FoamReader.xml</file>
|
<file>PV4FoamReader.xml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<ParaViewReaders>
|
<ParaViewReaders>
|
||||||
<Reader name="PV398FoamReader"
|
<Reader name="PV4FoamReader"
|
||||||
extensions="OpenFOAM"
|
extensions="OpenFOAM"
|
||||||
file_description="OpenFOAM Reader">
|
file_description="OpenFOAM Reader">
|
||||||
</Reader>
|
</Reader>
|
||||||
@ -1,8 +1,8 @@
|
|||||||
<ServerManagerConfiguration>
|
<ServerManagerConfiguration>
|
||||||
<ProxyGroup name="sources">
|
<ProxyGroup name="sources">
|
||||||
<SourceProxy
|
<SourceProxy
|
||||||
name="PV398FoamReader"
|
name="PV4FoamReader"
|
||||||
class="vtkPV398FoamReader">
|
class="vtkPV4FoamReader">
|
||||||
|
|
||||||
<!-- File name - compulsory -->
|
<!-- File name - compulsory -->
|
||||||
<StringVectorProperty
|
<StringVectorProperty
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "pqPV398FoamReaderPanel.h"
|
#include "pqPV4FoamReaderPanel.h"
|
||||||
|
|
||||||
// QT
|
// QT
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
@ -50,7 +50,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
pqPV398FoamReaderPanel::pqPV398FoamReaderPanel
|
pqPV4FoamReaderPanel::pqPV4FoamReaderPanel
|
||||||
(
|
(
|
||||||
pqProxy *proxy,
|
pqProxy *proxy,
|
||||||
QWidget *p
|
QWidget *p
|
||||||
@ -339,7 +339,7 @@ pqPV398FoamReaderPanel::pqPV398FoamReaderPanel
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void pqPV398FoamReaderPanel::CacheMeshToggled()
|
void pqPV4FoamReaderPanel::CacheMeshToggled()
|
||||||
{
|
{
|
||||||
vtkSMIntVectorProperty::SafeDownCast
|
vtkSMIntVectorProperty::SafeDownCast
|
||||||
(
|
(
|
||||||
@ -348,7 +348,7 @@ void pqPV398FoamReaderPanel::CacheMeshToggled()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void pqPV398FoamReaderPanel::RefreshPressed()
|
void pqPV4FoamReaderPanel::RefreshPressed()
|
||||||
{
|
{
|
||||||
// update everything
|
// update everything
|
||||||
vtkSMIntVectorProperty::SafeDownCast
|
vtkSMIntVectorProperty::SafeDownCast
|
||||||
@ -363,7 +363,7 @@ void pqPV398FoamReaderPanel::RefreshPressed()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void pqPV398FoamReaderPanel::ZeroTimeToggled()
|
void pqPV4FoamReaderPanel::ZeroTimeToggled()
|
||||||
{
|
{
|
||||||
vtkSMIntVectorProperty::SafeDownCast
|
vtkSMIntVectorProperty::SafeDownCast
|
||||||
(
|
(
|
||||||
@ -374,7 +374,7 @@ void pqPV398FoamReaderPanel::ZeroTimeToggled()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void pqPV398FoamReaderPanel::ShowPatchNamesToggled()
|
void pqPV4FoamReaderPanel::ShowPatchNamesToggled()
|
||||||
{
|
{
|
||||||
vtkSMIntVectorProperty::SafeDownCast
|
vtkSMIntVectorProperty::SafeDownCast
|
||||||
(
|
(
|
||||||
@ -391,7 +391,7 @@ void pqPV398FoamReaderPanel::ShowPatchNamesToggled()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void pqPV398FoamReaderPanel::ShowGroupsOnlyToggled()
|
void pqPV4FoamReaderPanel::ShowGroupsOnlyToggled()
|
||||||
{
|
{
|
||||||
vtkSMProperty* prop;
|
vtkSMProperty* prop;
|
||||||
|
|
||||||
@ -407,7 +407,7 @@ void pqPV398FoamReaderPanel::ShowGroupsOnlyToggled()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void pqPV398FoamReaderPanel::IncludeSetsToggled()
|
void pqPV4FoamReaderPanel::IncludeSetsToggled()
|
||||||
{
|
{
|
||||||
vtkSMProperty* prop;
|
vtkSMProperty* prop;
|
||||||
|
|
||||||
@ -423,7 +423,7 @@ void pqPV398FoamReaderPanel::IncludeSetsToggled()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void pqPV398FoamReaderPanel::IncludeZonesToggled()
|
void pqPV4FoamReaderPanel::IncludeZonesToggled()
|
||||||
{
|
{
|
||||||
vtkSMProperty* prop;
|
vtkSMProperty* prop;
|
||||||
|
|
||||||
@ -439,7 +439,7 @@ void pqPV398FoamReaderPanel::IncludeZonesToggled()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void pqPV398FoamReaderPanel::ExtrapolatePatchesToggled()
|
void pqPV4FoamReaderPanel::ExtrapolatePatchesToggled()
|
||||||
{
|
{
|
||||||
vtkSMProperty* prop;
|
vtkSMProperty* prop;
|
||||||
|
|
||||||
@ -452,7 +452,7 @@ void pqPV398FoamReaderPanel::ExtrapolatePatchesToggled()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void pqPV398FoamReaderPanel::InterpolateVolFieldsToggled()
|
void pqPV4FoamReaderPanel::InterpolateVolFieldsToggled()
|
||||||
{
|
{
|
||||||
vtkSMProperty* prop;
|
vtkSMProperty* prop;
|
||||||
|
|
||||||
@ -22,19 +22,19 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
pqPV398FoamReaderPanel
|
pqPV4FoamReaderPanel
|
||||||
|
|
||||||
Description
|
Description
|
||||||
GUI modifications for the ParaView reader panel
|
GUI modifications for the ParaView reader panel
|
||||||
|
|
||||||
A custom panel for the PV398FoamReader.
|
A custom panel for the PV4FoamReader.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
pqPV398FoamReaderPanel.cxx
|
pqPV4FoamReaderPanel.cxx
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
#ifndef pqPV398FoamReaderPanel_h
|
#ifndef pqPV4FoamReaderPanel_h
|
||||||
#define pqPV398FoamReaderPanel_h
|
#define pqPV4FoamReaderPanel_h
|
||||||
|
|
||||||
|
|
||||||
#include "pqAutoGeneratedObjectPanel.h"
|
#include "pqAutoGeneratedObjectPanel.h"
|
||||||
@ -51,10 +51,10 @@ class vtkSMSourceProxy;
|
|||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class pqPV398FoamReaderPanel Declaration
|
Class pqPV4FoamReaderPanel Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class pqPV398FoamReaderPanel
|
class pqPV4FoamReaderPanel
|
||||||
:
|
:
|
||||||
public pqAutoGeneratedObjectPanel
|
public pqAutoGeneratedObjectPanel
|
||||||
{
|
{
|
||||||
@ -105,11 +105,11 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
pqPV398FoamReaderPanel(pqProxy*, QWidget*);
|
pqPV4FoamReaderPanel(pqProxy*, QWidget*);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
// virtual ~pqPV398FoamReaderPanel();
|
// virtual ~pqPV4FoamReaderPanel();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
#include "vtkPV398FoamReader.h"
|
#include "vtkPV4FoamReader.h"
|
||||||
|
|
||||||
#include "pqApplicationCore.h"
|
#include "pqApplicationCore.h"
|
||||||
#include "pqRenderView.h"
|
#include "pqRenderView.h"
|
||||||
@ -40,18 +40,18 @@ License
|
|||||||
#include "vtkStringArray.h"
|
#include "vtkStringArray.h"
|
||||||
|
|
||||||
// OpenFOAM includes
|
// OpenFOAM includes
|
||||||
#include "vtkPV398Foam.H"
|
#include "vtkPV4Foam.H"
|
||||||
|
|
||||||
#undef EXPERIMENTAL_TIME_CACHING
|
#undef EXPERIMENTAL_TIME_CACHING
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
vtkStandardNewMacro(vtkPV398FoamReader);
|
vtkStandardNewMacro(vtkPV4FoamReader);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
vtkPV398FoamReader::vtkPV398FoamReader()
|
vtkPV4FoamReader::vtkPV4FoamReader()
|
||||||
{
|
{
|
||||||
Debug = 0;
|
Debug = 0;
|
||||||
vtkDebugMacro(<<"Constructor");
|
vtkDebugMacro(<<"Constructor");
|
||||||
@ -63,7 +63,7 @@ vtkPV398FoamReader::vtkPV398FoamReader()
|
|||||||
|
|
||||||
output0_ = NULL;
|
output0_ = NULL;
|
||||||
|
|
||||||
#ifdef VTKPV398FOAM_DUALPORT
|
#ifdef VTKPV4FOAM_DUALPORT
|
||||||
// Add second output for the Lagrangian
|
// Add second output for the Lagrangian
|
||||||
this->SetNumberOfOutputPorts(2);
|
this->SetNumberOfOutputPorts(2);
|
||||||
vtkMultiBlockDataSet *lagrangian = vtkMultiBlockDataSet::New();
|
vtkMultiBlockDataSet *lagrangian = vtkMultiBlockDataSet::New();
|
||||||
@ -100,7 +100,7 @@ vtkPV398FoamReader::vtkPV398FoamReader()
|
|||||||
SelectionObserver = vtkCallbackCommand::New();
|
SelectionObserver = vtkCallbackCommand::New();
|
||||||
SelectionObserver->SetCallback
|
SelectionObserver->SetCallback
|
||||||
(
|
(
|
||||||
&vtkPV398FoamReader::SelectionModifiedCallback
|
&vtkPV4FoamReader::SelectionModifiedCallback
|
||||||
);
|
);
|
||||||
SelectionObserver->SetClientData(this);
|
SelectionObserver->SetClientData(this);
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ vtkPV398FoamReader::vtkPV398FoamReader()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
vtkPV398FoamReader::~vtkPV398FoamReader()
|
vtkPV4FoamReader::~vtkPV4FoamReader()
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"Deconstructor");
|
vtkDebugMacro(<<"Deconstructor");
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ vtkPV398FoamReader::~vtkPV398FoamReader()
|
|||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Do everything except set the output info
|
// Do everything except set the output info
|
||||||
int vtkPV398FoamReader::RequestInformation
|
int vtkPV4FoamReader::RequestInformation
|
||||||
(
|
(
|
||||||
vtkInformation* vtkNotUsed(request),
|
vtkInformation* vtkNotUsed(request),
|
||||||
vtkInformationVector** vtkNotUsed(inputVector),
|
vtkInformationVector** vtkNotUsed(inputVector),
|
||||||
@ -177,7 +177,7 @@ int vtkPV398FoamReader::RequestInformation
|
|||||||
{
|
{
|
||||||
vtkDebugMacro(<<"RequestInformation");
|
vtkDebugMacro(<<"RequestInformation");
|
||||||
|
|
||||||
if (Foam::vtkPV398Foam::debug)
|
if (Foam::vtkPV4Foam::debug)
|
||||||
{
|
{
|
||||||
cout<<"REQUEST_INFORMATION\n";
|
cout<<"REQUEST_INFORMATION\n";
|
||||||
}
|
}
|
||||||
@ -190,7 +190,7 @@ int vtkPV398FoamReader::RequestInformation
|
|||||||
|
|
||||||
int nInfo = outputVector->GetNumberOfInformationObjects();
|
int nInfo = outputVector->GetNumberOfInformationObjects();
|
||||||
|
|
||||||
if (Foam::vtkPV398Foam::debug)
|
if (Foam::vtkPV4Foam::debug)
|
||||||
{
|
{
|
||||||
cout<<"RequestInformation with " << nInfo << " item(s)\n";
|
cout<<"RequestInformation with " << nInfo << " item(s)\n";
|
||||||
for (int infoI = 0; infoI < nInfo; ++infoI)
|
for (int infoI = 0; infoI < nInfo; ++infoI)
|
||||||
@ -201,7 +201,7 @@ int vtkPV398FoamReader::RequestInformation
|
|||||||
|
|
||||||
if (!foamData_)
|
if (!foamData_)
|
||||||
{
|
{
|
||||||
foamData_ = new Foam::vtkPV398Foam(FileName, this);
|
foamData_ = new Foam::vtkPV4Foam(FileName, this);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -238,7 +238,7 @@ int vtkPV398FoamReader::RequestInformation
|
|||||||
timeRange[0] = timeSteps[0];
|
timeRange[0] = timeSteps[0];
|
||||||
timeRange[1] = timeSteps[nTimeSteps-1];
|
timeRange[1] = timeSteps[nTimeSteps-1];
|
||||||
|
|
||||||
if (Foam::vtkPV398Foam::debug > 1)
|
if (Foam::vtkPV4Foam::debug > 1)
|
||||||
{
|
{
|
||||||
cout<<"nTimeSteps " << nTimeSteps << "\n"
|
cout<<"nTimeSteps " << nTimeSteps << "\n"
|
||||||
<<"timeRange " << timeRange[0] << " to " << timeRange[1]
|
<<"timeRange " << timeRange[0] << " to " << timeRange[1]
|
||||||
@ -268,7 +268,7 @@ int vtkPV398FoamReader::RequestInformation
|
|||||||
|
|
||||||
|
|
||||||
// Set the output info
|
// Set the output info
|
||||||
int vtkPV398FoamReader::RequestData
|
int vtkPV4FoamReader::RequestData
|
||||||
(
|
(
|
||||||
vtkInformation* vtkNotUsed(request),
|
vtkInformation* vtkNotUsed(request),
|
||||||
vtkInformationVector** vtkNotUsed(inputVector),
|
vtkInformationVector** vtkNotUsed(inputVector),
|
||||||
@ -292,7 +292,7 @@ int vtkPV398FoamReader::RequestData
|
|||||||
|
|
||||||
int nInfo = outputVector->GetNumberOfInformationObjects();
|
int nInfo = outputVector->GetNumberOfInformationObjects();
|
||||||
|
|
||||||
if (Foam::vtkPV398Foam::debug)
|
if (Foam::vtkPV4Foam::debug)
|
||||||
{
|
{
|
||||||
cout<<"RequestData with " << nInfo << " item(s)\n";
|
cout<<"RequestData with " << nInfo << " item(s)\n";
|
||||||
for (int infoI = 0; infoI < nInfo; ++infoI)
|
for (int infoI = 0; infoI < nInfo; ++infoI)
|
||||||
@ -310,7 +310,7 @@ int vtkPV398FoamReader::RequestData
|
|||||||
// taking port0 as the lead for other outputs would be nice, but fails when
|
// taking port0 as the lead for other outputs would be nice, but fails when
|
||||||
// a filter is added - we need to check everything
|
// a filter is added - we need to check everything
|
||||||
// but since PREVIOUS_UPDATE_TIME_STEPS() is protected, relay the logic
|
// but since PREVIOUS_UPDATE_TIME_STEPS() is protected, relay the logic
|
||||||
// to the vtkPV398Foam::setTime() method
|
// to the vtkPV4Foam::setTime() method
|
||||||
for (int infoI = 0; infoI < nInfo; ++infoI)
|
for (int infoI = 0; infoI < nInfo; ++infoI)
|
||||||
{
|
{
|
||||||
vtkInformation *outInfo = outputVector->GetInformationObject(infoI);
|
vtkInformation *outInfo = outputVector->GetInformationObject(infoI);
|
||||||
@ -342,7 +342,7 @@ int vtkPV398FoamReader::RequestData
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (Foam::vtkPV398Foam::debug)
|
if (Foam::vtkPV4Foam::debug)
|
||||||
{
|
{
|
||||||
cout<< "update output with "
|
cout<< "update output with "
|
||||||
<< output->GetNumberOfBlocks() << " blocks\n";
|
<< output->GetNumberOfBlocks() << " blocks\n";
|
||||||
@ -370,7 +370,7 @@ int vtkPV398FoamReader::RequestData
|
|||||||
output->ShallowCopy(output0_);
|
output->ShallowCopy(output0_);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Foam::vtkPV398Foam::debug)
|
if (Foam::vtkPV4Foam::debug)
|
||||||
{
|
{
|
||||||
if (needsUpdate)
|
if (needsUpdate)
|
||||||
{
|
{
|
||||||
@ -390,7 +390,7 @@ int vtkPV398FoamReader::RequestData
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifdef VTKPV398FOAM_DUALPORT
|
#ifdef VTKPV4FOAM_DUALPORT
|
||||||
foamData_->Update
|
foamData_->Update
|
||||||
(
|
(
|
||||||
output,
|
output,
|
||||||
@ -417,13 +417,13 @@ int vtkPV398FoamReader::RequestData
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void vtkPV398FoamReader::SetRefresh(int val)
|
void vtkPV4FoamReader::SetRefresh(int val)
|
||||||
{
|
{
|
||||||
Modified();
|
Modified();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void vtkPV398FoamReader::SetIncludeSets(int val)
|
void vtkPV4FoamReader::SetIncludeSets(int val)
|
||||||
{
|
{
|
||||||
if (IncludeSets != val)
|
if (IncludeSets != val)
|
||||||
{
|
{
|
||||||
@ -436,7 +436,7 @@ void vtkPV398FoamReader::SetIncludeSets(int val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void vtkPV398FoamReader::SetIncludeZones(int val)
|
void vtkPV4FoamReader::SetIncludeZones(int val)
|
||||||
{
|
{
|
||||||
if (IncludeZones != val)
|
if (IncludeZones != val)
|
||||||
{
|
{
|
||||||
@ -449,7 +449,7 @@ void vtkPV398FoamReader::SetIncludeZones(int val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void vtkPV398FoamReader::SetShowPatchNames(int val)
|
void vtkPV4FoamReader::SetShowPatchNames(int val)
|
||||||
{
|
{
|
||||||
if (ShowPatchNames != val)
|
if (ShowPatchNames != val)
|
||||||
{
|
{
|
||||||
@ -459,7 +459,7 @@ void vtkPV398FoamReader::SetShowPatchNames(int val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void vtkPV398FoamReader::SetShowGroupsOnly(int val)
|
void vtkPV4FoamReader::SetShowGroupsOnly(int val)
|
||||||
{
|
{
|
||||||
if (ShowGroupsOnly != val)
|
if (ShowGroupsOnly != val)
|
||||||
{
|
{
|
||||||
@ -472,7 +472,7 @@ void vtkPV398FoamReader::SetShowGroupsOnly(int val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void vtkPV398FoamReader::updatePatchNamesView(const bool show)
|
void vtkPV4FoamReader::updatePatchNamesView(const bool show)
|
||||||
{
|
{
|
||||||
pqApplicationCore* appCore = pqApplicationCore::instance();
|
pqApplicationCore* appCore = pqApplicationCore::instance();
|
||||||
|
|
||||||
@ -506,7 +506,7 @@ void vtkPV398FoamReader::updatePatchNamesView(const bool show)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void vtkPV398FoamReader::PrintSelf(ostream& os, vtkIndent indent)
|
void vtkPV4FoamReader::PrintSelf(ostream& os, vtkIndent indent)
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"PrintSelf");
|
vtkDebugMacro(<<"PrintSelf");
|
||||||
|
|
||||||
@ -522,7 +522,7 @@ void vtkPV398FoamReader::PrintSelf(ostream& os, vtkIndent indent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int vtkPV398FoamReader::GetTimeStep()
|
int vtkPV4FoamReader::GetTimeStep()
|
||||||
{
|
{
|
||||||
return foamData_ ? foamData_->timeIndex() : -1;
|
return foamData_ ? foamData_->timeIndex() : -1;
|
||||||
}
|
}
|
||||||
@ -531,35 +531,35 @@ int vtkPV398FoamReader::GetTimeStep()
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
// Parts selection list control
|
// Parts selection list control
|
||||||
|
|
||||||
vtkDataArraySelection* vtkPV398FoamReader::GetPartSelection()
|
vtkDataArraySelection* vtkPV4FoamReader::GetPartSelection()
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetPartSelection");
|
vtkDebugMacro(<<"GetPartSelection");
|
||||||
return PartSelection;
|
return PartSelection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int vtkPV398FoamReader::GetNumberOfPartArrays()
|
int vtkPV4FoamReader::GetNumberOfPartArrays()
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetNumberOfPartArrays");
|
vtkDebugMacro(<<"GetNumberOfPartArrays");
|
||||||
return PartSelection->GetNumberOfArrays();
|
return PartSelection->GetNumberOfArrays();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const char* vtkPV398FoamReader::GetPartArrayName(int index)
|
const char* vtkPV4FoamReader::GetPartArrayName(int index)
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetPartArrayName");
|
vtkDebugMacro(<<"GetPartArrayName");
|
||||||
return PartSelection->GetArrayName(index);
|
return PartSelection->GetArrayName(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int vtkPV398FoamReader::GetPartArrayStatus(const char* name)
|
int vtkPV4FoamReader::GetPartArrayStatus(const char* name)
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetPartArrayStatus");
|
vtkDebugMacro(<<"GetPartArrayStatus");
|
||||||
return PartSelection->ArrayIsEnabled(name);
|
return PartSelection->ArrayIsEnabled(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void vtkPV398FoamReader::SetPartArrayStatus(const char* name, int status)
|
void vtkPV4FoamReader::SetPartArrayStatus(const char* name, int status)
|
||||||
{
|
{
|
||||||
vtkDebugMacro("Set mesh part \"" << name << "\" status to: " << status);
|
vtkDebugMacro("Set mesh part \"" << name << "\" status to: " << status);
|
||||||
|
|
||||||
@ -577,35 +577,35 @@ void vtkPV398FoamReader::SetPartArrayStatus(const char* name, int status)
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
// volField selection list control
|
// volField selection list control
|
||||||
|
|
||||||
vtkDataArraySelection* vtkPV398FoamReader::GetVolFieldSelection()
|
vtkDataArraySelection* vtkPV4FoamReader::GetVolFieldSelection()
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetVolFieldSelection");
|
vtkDebugMacro(<<"GetVolFieldSelection");
|
||||||
return VolFieldSelection;
|
return VolFieldSelection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int vtkPV398FoamReader::GetNumberOfVolFieldArrays()
|
int vtkPV4FoamReader::GetNumberOfVolFieldArrays()
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetNumberOfVolFieldArrays");
|
vtkDebugMacro(<<"GetNumberOfVolFieldArrays");
|
||||||
return VolFieldSelection->GetNumberOfArrays();
|
return VolFieldSelection->GetNumberOfArrays();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const char* vtkPV398FoamReader::GetVolFieldArrayName(int index)
|
const char* vtkPV4FoamReader::GetVolFieldArrayName(int index)
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetVolFieldArrayName");
|
vtkDebugMacro(<<"GetVolFieldArrayName");
|
||||||
return VolFieldSelection->GetArrayName(index);
|
return VolFieldSelection->GetArrayName(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int vtkPV398FoamReader::GetVolFieldArrayStatus(const char* name)
|
int vtkPV4FoamReader::GetVolFieldArrayStatus(const char* name)
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetVolFieldArrayStatus");
|
vtkDebugMacro(<<"GetVolFieldArrayStatus");
|
||||||
return VolFieldSelection->ArrayIsEnabled(name);
|
return VolFieldSelection->ArrayIsEnabled(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void vtkPV398FoamReader::SetVolFieldArrayStatus(const char* name, int status)
|
void vtkPV4FoamReader::SetVolFieldArrayStatus(const char* name, int status)
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"SetVolFieldArrayStatus");
|
vtkDebugMacro(<<"SetVolFieldArrayStatus");
|
||||||
if (status)
|
if (status)
|
||||||
@ -622,35 +622,35 @@ void vtkPV398FoamReader::SetVolFieldArrayStatus(const char* name, int status)
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
// pointField selection list control
|
// pointField selection list control
|
||||||
|
|
||||||
vtkDataArraySelection* vtkPV398FoamReader::GetPointFieldSelection()
|
vtkDataArraySelection* vtkPV4FoamReader::GetPointFieldSelection()
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetPointFieldSelection");
|
vtkDebugMacro(<<"GetPointFieldSelection");
|
||||||
return PointFieldSelection;
|
return PointFieldSelection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int vtkPV398FoamReader::GetNumberOfPointFieldArrays()
|
int vtkPV4FoamReader::GetNumberOfPointFieldArrays()
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetNumberOfPointFieldArrays");
|
vtkDebugMacro(<<"GetNumberOfPointFieldArrays");
|
||||||
return PointFieldSelection->GetNumberOfArrays();
|
return PointFieldSelection->GetNumberOfArrays();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const char* vtkPV398FoamReader::GetPointFieldArrayName(int index)
|
const char* vtkPV4FoamReader::GetPointFieldArrayName(int index)
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetPointFieldArrayName");
|
vtkDebugMacro(<<"GetPointFieldArrayName");
|
||||||
return PointFieldSelection->GetArrayName(index);
|
return PointFieldSelection->GetArrayName(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int vtkPV398FoamReader::GetPointFieldArrayStatus(const char* name)
|
int vtkPV4FoamReader::GetPointFieldArrayStatus(const char* name)
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetPointFieldArrayStatus");
|
vtkDebugMacro(<<"GetPointFieldArrayStatus");
|
||||||
return PointFieldSelection->ArrayIsEnabled(name);
|
return PointFieldSelection->ArrayIsEnabled(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void vtkPV398FoamReader::SetPointFieldArrayStatus(const char* name, int status)
|
void vtkPV4FoamReader::SetPointFieldArrayStatus(const char* name, int status)
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"SetPointFieldArrayStatus");
|
vtkDebugMacro(<<"SetPointFieldArrayStatus");
|
||||||
if (status)
|
if (status)
|
||||||
@ -667,35 +667,35 @@ void vtkPV398FoamReader::SetPointFieldArrayStatus(const char* name, int status)
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
// lagrangianField selection list control
|
// lagrangianField selection list control
|
||||||
|
|
||||||
vtkDataArraySelection* vtkPV398FoamReader::GetLagrangianFieldSelection()
|
vtkDataArraySelection* vtkPV4FoamReader::GetLagrangianFieldSelection()
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetLagrangianFieldSelection");
|
vtkDebugMacro(<<"GetLagrangianFieldSelection");
|
||||||
return LagrangianFieldSelection;
|
return LagrangianFieldSelection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int vtkPV398FoamReader::GetNumberOfLagrangianFieldArrays()
|
int vtkPV4FoamReader::GetNumberOfLagrangianFieldArrays()
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetNumberOfLagrangianFieldArrays");
|
vtkDebugMacro(<<"GetNumberOfLagrangianFieldArrays");
|
||||||
return LagrangianFieldSelection->GetNumberOfArrays();
|
return LagrangianFieldSelection->GetNumberOfArrays();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const char* vtkPV398FoamReader::GetLagrangianFieldArrayName(int index)
|
const char* vtkPV4FoamReader::GetLagrangianFieldArrayName(int index)
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetLagrangianFieldArrayName");
|
vtkDebugMacro(<<"GetLagrangianFieldArrayName");
|
||||||
return LagrangianFieldSelection->GetArrayName(index);
|
return LagrangianFieldSelection->GetArrayName(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int vtkPV398FoamReader::GetLagrangianFieldArrayStatus(const char* name)
|
int vtkPV4FoamReader::GetLagrangianFieldArrayStatus(const char* name)
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetLagrangianFieldArrayStatus");
|
vtkDebugMacro(<<"GetLagrangianFieldArrayStatus");
|
||||||
return LagrangianFieldSelection->ArrayIsEnabled(name);
|
return LagrangianFieldSelection->ArrayIsEnabled(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void vtkPV398FoamReader::SetLagrangianFieldArrayStatus
|
void vtkPV4FoamReader::SetLagrangianFieldArrayStatus
|
||||||
(
|
(
|
||||||
const char* name,
|
const char* name,
|
||||||
int status
|
int status
|
||||||
@ -715,7 +715,7 @@ void vtkPV398FoamReader::SetLagrangianFieldArrayStatus
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
void vtkPV398FoamReader::SelectionModifiedCallback
|
void vtkPV4FoamReader::SelectionModifiedCallback
|
||||||
(
|
(
|
||||||
vtkObject*,
|
vtkObject*,
|
||||||
unsigned long,
|
unsigned long,
|
||||||
@ -723,18 +723,18 @@ void vtkPV398FoamReader::SelectionModifiedCallback
|
|||||||
void*
|
void*
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
static_cast<vtkPV398FoamReader*>(clientdata)->SelectionModified();
|
static_cast<vtkPV4FoamReader*>(clientdata)->SelectionModified();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void vtkPV398FoamReader::SelectionModified()
|
void vtkPV4FoamReader::SelectionModified()
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"SelectionModified");
|
vtkDebugMacro(<<"SelectionModified");
|
||||||
Modified();
|
Modified();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int vtkPV398FoamReader::FillOutputPortInformation
|
int vtkPV4FoamReader::FillOutputPortInformation
|
||||||
(
|
(
|
||||||
int port,
|
int port,
|
||||||
vtkInformation* info
|
vtkInformation* info
|
||||||
@ -22,21 +22,21 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
vtkPV398FoamReader
|
vtkPV4FoamReader
|
||||||
|
|
||||||
Description
|
Description
|
||||||
reads a dataset in OpenFOAM format
|
reads a dataset in OpenFOAM format
|
||||||
|
|
||||||
vtkPV398blockMeshReader creates an multiblock dataset.
|
vtkPV4blockMeshReader creates an multiblock dataset.
|
||||||
It uses the OpenFOAM infrastructure (fvMesh, etc) to handle mesh and
|
It uses the OpenFOAM infrastructure (fvMesh, etc) to handle mesh and
|
||||||
field data.
|
field data.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
vtkPV398blockMeshReader.cxx
|
vtkPV4blockMeshReader.cxx
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
#ifndef vtkPV398FoamReader_h
|
#ifndef vtkPV4FoamReader_h
|
||||||
#define vtkPV398FoamReader_h
|
#define vtkPV4FoamReader_h
|
||||||
|
|
||||||
// VTK includes
|
// VTK includes
|
||||||
#include "vtkMultiBlockDataSetAlgorithm.h"
|
#include "vtkMultiBlockDataSetAlgorithm.h"
|
||||||
@ -50,23 +50,23 @@ class vtkCallbackCommand;
|
|||||||
// OpenFOAM forward declarations
|
// OpenFOAM forward declarations
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
class vtkPV398Foam;
|
class vtkPV4Foam;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class vtkPV398FoamReader Declaration
|
Class vtkPV4FoamReader Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class vtkPV398FoamReader
|
class vtkPV4FoamReader
|
||||||
:
|
:
|
||||||
public vtkMultiBlockDataSetAlgorithm
|
public vtkMultiBlockDataSetAlgorithm
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
vtkTypeMacro(vtkPV398FoamReader, vtkMultiBlockDataSetAlgorithm);
|
vtkTypeMacro(vtkPV4FoamReader, vtkMultiBlockDataSetAlgorithm);
|
||||||
void PrintSelf(ostream&, vtkIndent);
|
void PrintSelf(ostream&, vtkIndent);
|
||||||
|
|
||||||
static vtkPV398FoamReader* New();
|
static vtkPV4FoamReader* New();
|
||||||
|
|
||||||
// Description:
|
// Description:
|
||||||
// Get the current timestep and the timestep range.
|
// Get the current timestep and the timestep range.
|
||||||
@ -184,10 +184,10 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
//- Construct null
|
//- Construct null
|
||||||
vtkPV398FoamReader();
|
vtkPV4FoamReader();
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
~vtkPV398FoamReader();
|
~vtkPV4FoamReader();
|
||||||
|
|
||||||
//- Return information about mesh, times, etc without loading anything
|
//- Return information about mesh, times, etc without loading anything
|
||||||
virtual int RequestInformation
|
virtual int RequestInformation
|
||||||
@ -218,10 +218,10 @@ protected:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
vtkPV398FoamReader(const vtkPV398FoamReader&);
|
vtkPV4FoamReader(const vtkPV4FoamReader&);
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const vtkPV398FoamReader&);
|
void operator=(const vtkPV4FoamReader&);
|
||||||
|
|
||||||
//- Add/remove patch names to/from the view
|
//- Add/remove patch names to/from the view
|
||||||
void updatePatchNamesView(const bool show);
|
void updatePatchNamesView(const bool show);
|
||||||
@ -251,7 +251,7 @@ private:
|
|||||||
vtkMultiBlockDataSet* output0_;
|
vtkMultiBlockDataSet* output0_;
|
||||||
|
|
||||||
//BTX
|
//BTX
|
||||||
Foam::vtkPV398Foam* foamData_;
|
Foam::vtkPV4Foam* foamData_;
|
||||||
//ETX
|
//ETX
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
vtkPV4Foam.C
|
||||||
|
vtkPV4FoamFields.C
|
||||||
|
vtkPV4FoamMesh.C
|
||||||
|
vtkPV4FoamMeshLagrangian.C
|
||||||
|
vtkPV4FoamMeshSet.C
|
||||||
|
vtkPV4FoamMeshVolume.C
|
||||||
|
vtkPV4FoamMeshZone.C
|
||||||
|
vtkPV4FoamUpdateInfo.C
|
||||||
|
vtkPV4FoamUtils.C
|
||||||
|
|
||||||
|
LIB = $(FOAM_LIBBIN)/libvtkPV4Foam
|
||||||
@ -4,8 +4,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
-I../../vtkPV398Readers/lnInclude \
|
-I../../vtkPV4Readers/lnInclude \
|
||||||
-I../PV398FoamReader \
|
-I../PV4FoamReader \
|
||||||
-I$(ParaView_INCLUDE_DIR) \
|
-I$(ParaView_INCLUDE_DIR) \
|
||||||
$(shell \
|
$(shell \
|
||||||
test -f $(ParaView_INCLUDE_DIR)/vtkPolyhedron.h && \
|
test -f $(ParaView_INCLUDE_DIR)/vtkPolyhedron.h && \
|
||||||
@ -17,5 +17,5 @@ LIB_LIBS = \
|
|||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lgenericPatchFields \
|
-lgenericPatchFields \
|
||||||
-llagrangian \
|
-llagrangian \
|
||||||
-L$(FOAM_LIBBIN) -lvtkPV398Readers \
|
-L$(FOAM_LIBBIN) -lvtkPV4Readers \
|
||||||
$(GLIBS)
|
$(GLIBS)
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
InClass
|
InClass
|
||||||
vtkPV398Foam
|
vtkPV4Foam
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
InClass
|
InClass
|
||||||
vtkPV398Foam
|
vtkPV4Foam
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -23,8 +23,8 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "vtkPV398Foam.H"
|
#include "vtkPV4Foam.H"
|
||||||
#include "vtkPV398FoamReader.h"
|
#include "vtkPV4FoamReader.h"
|
||||||
|
|
||||||
// OpenFOAM includes
|
// OpenFOAM includes
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
@ -42,16 +42,16 @@ License
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(vtkPV398Foam, 0);
|
defineTypeNameAndDebug(vtkPV4Foam, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "vtkPV398FoamAddToSelection.H"
|
#include "vtkPV4FoamAddToSelection.H"
|
||||||
#include "vtkPV398FoamUpdateInfoFields.H"
|
#include "vtkPV4FoamUpdateInfoFields.H"
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::resetCounters()
|
void Foam::vtkPV4Foam::resetCounters()
|
||||||
{
|
{
|
||||||
// Reset array range information (ids and sizes)
|
// Reset array range information (ids and sizes)
|
||||||
arrayRangeVolume_.reset();
|
arrayRangeVolume_.reset();
|
||||||
@ -66,7 +66,7 @@ void Foam::vtkPV398Foam::resetCounters()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::reduceMemory()
|
void Foam::vtkPV4Foam::reduceMemory()
|
||||||
{
|
{
|
||||||
forAll(regionPolyDecomp_, i)
|
forAll(regionPolyDecomp_, i)
|
||||||
{
|
{
|
||||||
@ -91,7 +91,7 @@ void Foam::vtkPV398Foam::reduceMemory()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Foam::vtkPV398Foam::setTime(int nRequest, const double requestTimes[])
|
int Foam::vtkPV4Foam::setTime(int nRequest, const double requestTimes[])
|
||||||
{
|
{
|
||||||
Time& runTime = dbPtr_();
|
Time& runTime = dbPtr_();
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ int Foam::vtkPV398Foam::setTime(int nRequest, const double requestTimes[])
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::setTime(";
|
Info<< "<beg> Foam::vtkPV4Foam::setTime(";
|
||||||
for (int requestI = 0; requestI < nRequest; ++requestI)
|
for (int requestI = 0; requestI < nRequest; ++requestI)
|
||||||
{
|
{
|
||||||
if (requestI)
|
if (requestI)
|
||||||
@ -160,7 +160,7 @@ int Foam::vtkPV398Foam::setTime(int nRequest, const double requestTimes[])
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::setTime() - selectedTime="
|
Info<< "<end> Foam::vtkPV4Foam::setTime() - selectedTime="
|
||||||
<< Times[nearestIndex].name() << " index=" << timeIndex_
|
<< Times[nearestIndex].name() << " index=" << timeIndex_
|
||||||
<< "/" << Times.size()
|
<< "/" << Times.size()
|
||||||
<< " meshChanged=" << Switch(meshChanged_)
|
<< " meshChanged=" << Switch(meshChanged_)
|
||||||
@ -171,11 +171,11 @@ int Foam::vtkPV398Foam::setTime(int nRequest, const double requestTimes[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::updateMeshPartsStatus()
|
void Foam::vtkPV4Foam::updateMeshPartsStatus()
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::updateMeshPartsStatus" << endl;
|
Info<< "<beg> Foam::vtkPV4Foam::updateMeshPartsStatus" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
vtkDataArraySelection* selection = reader_->GetPartSelection();
|
vtkDataArraySelection* selection = reader_->GetPartSelection();
|
||||||
@ -212,17 +212,17 @@ void Foam::vtkPV398Foam::updateMeshPartsStatus()
|
|||||||
}
|
}
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::updateMeshPartsStatus" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::updateMeshPartsStatus" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::vtkPV398Foam::vtkPV398Foam
|
Foam::vtkPV4Foam::vtkPV4Foam
|
||||||
(
|
(
|
||||||
const char* const FileName,
|
const char* const FileName,
|
||||||
vtkPV398FoamReader* reader
|
vtkPV4FoamReader* reader
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
reader_(reader),
|
reader_(reader),
|
||||||
@ -245,7 +245,7 @@ Foam::vtkPV398Foam::vtkPV398Foam
|
|||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "Foam::vtkPV398Foam::vtkPV398Foam - " << FileName << endl;
|
Info<< "Foam::vtkPV4Foam::vtkPV4Foam - " << FileName << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -329,11 +329,11 @@ Foam::vtkPV398Foam::vtkPV398Foam
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::vtkPV398Foam::~vtkPV398Foam()
|
Foam::vtkPV4Foam::~vtkPV4Foam()
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::~vtkPV398Foam" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::~vtkPV4Foam" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete meshPtr_;
|
delete meshPtr_;
|
||||||
@ -342,11 +342,11 @@ Foam::vtkPV398Foam::~vtkPV398Foam()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::updateInfo()
|
void Foam::vtkPV4Foam::updateInfo()
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::updateInfo"
|
Info<< "<beg> Foam::vtkPV4Foam::updateInfo"
|
||||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "] timeIndex="
|
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "] timeIndex="
|
||||||
<< timeIndex_ << endl;
|
<< timeIndex_ << endl;
|
||||||
}
|
}
|
||||||
@ -409,17 +409,17 @@ void Foam::vtkPV398Foam::updateInfo()
|
|||||||
{
|
{
|
||||||
// just for debug info
|
// just for debug info
|
||||||
getSelectedArrayEntries(partSelection);
|
getSelectedArrayEntries(partSelection);
|
||||||
Info<< "<end> Foam::vtkPV398Foam::updateInfo" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::updateInfo" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::updateFoamMesh()
|
void Foam::vtkPV4Foam::updateFoamMesh()
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::updateFoamMesh" << endl;
|
Info<< "<beg> Foam::vtkPV4Foam::updateFoamMesh" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -463,13 +463,13 @@ void Foam::vtkPV398Foam::updateFoamMesh()
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::updateFoamMesh" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::updateFoamMesh" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::Update
|
void Foam::vtkPV4Foam::Update
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
vtkMultiBlockDataSet* lagrangianOutput
|
vtkMultiBlockDataSet* lagrangianOutput
|
||||||
@ -477,7 +477,7 @@ void Foam::vtkPV398Foam::Update
|
|||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
cout<< "<beg> Foam::vtkPV398Foam::Update - output with "
|
cout<< "<beg> Foam::vtkPV4Foam::Update - output with "
|
||||||
<< output->GetNumberOfBlocks() << " and "
|
<< output->GetNumberOfBlocks() << " and "
|
||||||
<< lagrangianOutput->GetNumberOfBlocks() << " blocks\n";
|
<< lagrangianOutput->GetNumberOfBlocks() << " blocks\n";
|
||||||
output->Print(cout);
|
output->Print(cout);
|
||||||
@ -518,7 +518,7 @@ void Foam::vtkPV398Foam::Update
|
|||||||
reader_->UpdateProgress(0.7);
|
reader_->UpdateProgress(0.7);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef VTKPV398FOAM_DUALPORT
|
#ifdef VTKPV4FOAM_DUALPORT
|
||||||
// restart port1 at block=0
|
// restart port1 at block=0
|
||||||
blockNo = 0;
|
blockNo = 0;
|
||||||
#endif
|
#endif
|
||||||
@ -540,7 +540,7 @@ void Foam::vtkPV398Foam::Update
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::CleanUp()
|
void Foam::vtkPV4Foam::CleanUp()
|
||||||
{
|
{
|
||||||
// reclaim some memory
|
// reclaim some memory
|
||||||
reduceMemory();
|
reduceMemory();
|
||||||
@ -548,7 +548,7 @@ void Foam::vtkPV398Foam::CleanUp()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
double* Foam::vtkPV398Foam::findTimes(int& nTimeSteps)
|
double* Foam::vtkPV4Foam::findTimes(int& nTimeSteps)
|
||||||
{
|
{
|
||||||
int nTimes = 0;
|
int nTimes = 0;
|
||||||
double* tsteps = NULL;
|
double* tsteps = NULL;
|
||||||
@ -621,7 +621,7 @@ double* Foam::vtkPV398Foam::findTimes(int& nTimeSteps)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::renderPatchNames
|
void Foam::vtkPV4Foam::renderPatchNames
|
||||||
(
|
(
|
||||||
vtkRenderer* renderer,
|
vtkRenderer* renderer,
|
||||||
const bool show
|
const bool show
|
||||||
@ -819,7 +819,7 @@ void Foam::vtkPV398Foam::renderPatchNames
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::PrintSelf(ostream& os, vtkIndent indent) const
|
void Foam::vtkPV4Foam::PrintSelf(ostream& os, vtkIndent indent) const
|
||||||
{
|
{
|
||||||
os << indent << "Number of nodes: "
|
os << indent << "Number of nodes: "
|
||||||
<< (meshPtr_ ? meshPtr_->nPoints() : 0) << "\n";
|
<< (meshPtr_ ? meshPtr_->nPoints() : 0) << "\n";
|
||||||
@ -22,39 +22,39 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::vtkPV398Foam
|
Foam::vtkPV4Foam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Provides a reader interface for OpenFOAM to VTK interaction.
|
Provides a reader interface for OpenFOAM to VTK interaction.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
vtkPV398Foam.C
|
vtkPV4Foam.C
|
||||||
vtkPV398Foam.H
|
vtkPV4Foam.H
|
||||||
vtkPV398FoamFields.C
|
vtkPV4FoamFields.C
|
||||||
vtkPV398FoamMesh.C
|
vtkPV4FoamMesh.C
|
||||||
vtkPV398FoamMeshLagrangian.C
|
vtkPV4FoamMeshLagrangian.C
|
||||||
vtkPV398FoamTemplates.C
|
vtkPV4FoamTemplates.C
|
||||||
vtkPV398FoamMeshSet.C
|
vtkPV4FoamMeshSet.C
|
||||||
vtkPV398FoamMeshVolume.C
|
vtkPV4FoamMeshVolume.C
|
||||||
vtkPV398FoamMeshZone.C
|
vtkPV4FoamMeshZone.C
|
||||||
vtkPV398FoamFaceField.H
|
vtkPV4FoamFaceField.H
|
||||||
vtkPV398FoamLagrangianFields.H
|
vtkPV4FoamLagrangianFields.H
|
||||||
vtkPV398FoamPatchField.H
|
vtkPV4FoamPatchField.H
|
||||||
vtkPV398FoamPointFields.H
|
vtkPV4FoamPointFields.H
|
||||||
vtkPV398FoamPoints.H
|
vtkPV4FoamPoints.H
|
||||||
vtkPV398FoamUpdateInfo.C
|
vtkPV4FoamUpdateInfo.C
|
||||||
vtkPV398FoamUpdateInfoFields.H
|
vtkPV4FoamUpdateInfoFields.H
|
||||||
vtkPV398FoamUtils.C
|
vtkPV4FoamUtils.C
|
||||||
vtkPV398FoamVolFields.H
|
vtkPV4FoamVolFields.H
|
||||||
vtkPV398FoamAddToSelection.H
|
vtkPV4FoamAddToSelection.H
|
||||||
|
|
||||||
// Needed by VTK:
|
// Needed by VTK:
|
||||||
vtkDataArrayTemplateImplicit.txx
|
vtkDataArrayTemplateImplicit.txx
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef vtkPV398Foam_H
|
#ifndef vtkPV4Foam_H
|
||||||
#define vtkPV398Foam_H
|
#define vtkPV4Foam_H
|
||||||
|
|
||||||
// do not include legacy strstream headers
|
// do not include legacy strstream headers
|
||||||
#ifndef VTK_EXCLUDE_STRSTREAM_HEADERS
|
#ifndef VTK_EXCLUDE_STRSTREAM_HEADERS
|
||||||
@ -69,14 +69,14 @@ SourceFiles
|
|||||||
#include "PrimitivePatchInterpolation.H"
|
#include "PrimitivePatchInterpolation.H"
|
||||||
#include "volPointInterpolation.H"
|
#include "volPointInterpolation.H"
|
||||||
|
|
||||||
#undef VTKPV398FOAM_DUALPORT
|
#undef VTKPV4FOAM_DUALPORT
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Forward Declarations * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Forward Declarations * * * * * * * * * * * * * //
|
||||||
|
|
||||||
class vtkDataArraySelection;
|
class vtkDataArraySelection;
|
||||||
class vtkDataSet;
|
class vtkDataSet;
|
||||||
class vtkPoints;
|
class vtkPoints;
|
||||||
class vtkPV398FoamReader;
|
class vtkPV4FoamReader;
|
||||||
class vtkRenderer;
|
class vtkRenderer;
|
||||||
class vtkTextActor;
|
class vtkTextActor;
|
||||||
class vtkMultiBlockDataSet;
|
class vtkMultiBlockDataSet;
|
||||||
@ -102,10 +102,10 @@ template<class Type> class IOField;
|
|||||||
template<class Type> class List;
|
template<class Type> class List;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class vtkPV398Foam Declaration
|
Class vtkPV4Foam Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class vtkPV398Foam
|
class vtkPV4Foam
|
||||||
{
|
{
|
||||||
// Private classes
|
// Private classes
|
||||||
|
|
||||||
@ -246,8 +246,8 @@ class vtkPV398Foam
|
|||||||
|
|
||||||
// Private Data
|
// Private Data
|
||||||
|
|
||||||
//- Access to the controlling vtkPV398FoamReader
|
//- Access to the controlling vtkPV4FoamReader
|
||||||
vtkPV398FoamReader* reader_;
|
vtkPV4FoamReader* reader_;
|
||||||
|
|
||||||
//- OpenFOAM time control
|
//- OpenFOAM time control
|
||||||
autoPtr<Time> dbPtr_;
|
autoPtr<Time> dbPtr_;
|
||||||
@ -652,31 +652,31 @@ class vtkPV398Foam
|
|||||||
|
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
vtkPV398Foam(const vtkPV398Foam&);
|
vtkPV4Foam(const vtkPV4Foam&);
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const vtkPV398Foam&);
|
void operator=(const vtkPV4Foam&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Static data members
|
//- Static data members
|
||||||
|
|
||||||
ClassName("vtkPV398Foam");
|
ClassName("vtkPV4Foam");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
vtkPV398Foam
|
vtkPV4Foam
|
||||||
(
|
(
|
||||||
const char* const FileName,
|
const char* const FileName,
|
||||||
vtkPV398FoamReader* reader
|
vtkPV4FoamReader* reader
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
~vtkPV398Foam();
|
~vtkPV4Foam();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -731,7 +731,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "vtkPV398FoamTemplates.C"
|
# include "vtkPV4FoamTemplates.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -23,8 +23,8 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef vtkPV398FoamAddToSelection_H
|
#ifndef vtkPV4FoamAddToSelection_H
|
||||||
#define vtkPV398FoamAddToSelection_H
|
#define vtkPV4FoamAddToSelection_H
|
||||||
|
|
||||||
// OpenFOAM includes
|
// OpenFOAM includes
|
||||||
#include "IOobjectList.H"
|
#include "IOobjectList.H"
|
||||||
@ -36,7 +36,7 @@ License
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::label Foam::vtkPV398Foam::addToSelection
|
Foam::label Foam::vtkPV4Foam::addToSelection
|
||||||
(
|
(
|
||||||
vtkDataArraySelection *select,
|
vtkDataArraySelection *select,
|
||||||
const IOobjectList& objectLst,
|
const IOobjectList& objectLst,
|
||||||
@ -22,12 +22,12 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
InClass
|
InClass
|
||||||
vtkPV398Foam
|
vtkPV4Foam
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef vtkPV398FoamFaceField_H
|
#ifndef vtkPV4FoamFaceField_H
|
||||||
#define vtkPV398FoamFaceField_H
|
#define vtkPV4FoamFaceField_H
|
||||||
|
|
||||||
// VTK includes
|
// VTK includes
|
||||||
#include "vtkCellData.h"
|
#include "vtkCellData.h"
|
||||||
@ -40,7 +40,7 @@ InClass
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::vtkPV398Foam::convertFaceField
|
void Foam::vtkPV4Foam::convertFaceField
|
||||||
(
|
(
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& tf,
|
const GeometricField<Type, fvPatchField, volMesh>& tf,
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
@ -23,11 +23,11 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "vtkPV398Foam.H"
|
#include "vtkPV4Foam.H"
|
||||||
|
|
||||||
// OpenFOAM includes
|
// OpenFOAM includes
|
||||||
#include "IOobjectList.H"
|
#include "IOobjectList.H"
|
||||||
#include "vtkPV398FoamReader.h"
|
#include "vtkPV4FoamReader.h"
|
||||||
|
|
||||||
// VTK includes
|
// VTK includes
|
||||||
#include "vtkDataArraySelection.h"
|
#include "vtkDataArraySelection.h"
|
||||||
@ -36,12 +36,12 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "vtkPV398FoamVolFields.H"
|
#include "vtkPV4FoamVolFields.H"
|
||||||
#include "vtkPV398FoamPointFields.H"
|
#include "vtkPV4FoamPointFields.H"
|
||||||
#include "vtkPV398FoamLagrangianFields.H"
|
#include "vtkPV4FoamLagrangianFields.H"
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::pruneObjectList
|
void Foam::vtkPV4Foam::pruneObjectList
|
||||||
(
|
(
|
||||||
IOobjectList& objects,
|
IOobjectList& objects,
|
||||||
const wordHashSet& selected
|
const wordHashSet& selected
|
||||||
@ -64,7 +64,7 @@ void Foam::vtkPV398Foam::pruneObjectList
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::convertVolFields
|
void Foam::vtkPV4Foam::convertVolFields
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output
|
vtkMultiBlockDataSet* output
|
||||||
)
|
)
|
||||||
@ -93,7 +93,7 @@ void Foam::vtkPV398Foam::convertVolFields
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::convertVolFields" << nl
|
Info<< "<beg> Foam::vtkPV4Foam::convertVolFields" << nl
|
||||||
<< "converting OpenFOAM volume fields" << endl;
|
<< "converting OpenFOAM volume fields" << endl;
|
||||||
forAllConstIter(IOobjectList, objects, iter)
|
forAllConstIter(IOobjectList, objects, iter)
|
||||||
{
|
{
|
||||||
@ -145,13 +145,13 @@ void Foam::vtkPV398Foam::convertVolFields
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::convertVolFields" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::convertVolFields" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::convertPointFields
|
void Foam::vtkPV4Foam::convertPointFields
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output
|
vtkMultiBlockDataSet* output
|
||||||
)
|
)
|
||||||
@ -184,7 +184,7 @@ void Foam::vtkPV398Foam::convertPointFields
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::convertPointFields" << nl
|
Info<< "<beg> Foam::vtkPV4Foam::convertPointFields" << nl
|
||||||
<< "converting OpenFOAM volume fields -> point fields" << endl;
|
<< "converting OpenFOAM volume fields -> point fields" << endl;
|
||||||
forAllConstIter(IOobjectList, objects, iter)
|
forAllConstIter(IOobjectList, objects, iter)
|
||||||
{
|
{
|
||||||
@ -221,13 +221,13 @@ void Foam::vtkPV398Foam::convertPointFields
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::convertPointFields" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::convertPointFields" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::convertLagrangianFields
|
void Foam::vtkPV4Foam::convertLagrangianFields
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output
|
vtkMultiBlockDataSet* output
|
||||||
)
|
)
|
||||||
@ -247,7 +247,7 @@ void Foam::vtkPV398Foam::convertLagrangianFields
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::convertLagrangianFields" << endl;
|
Info<< "<beg> Foam::vtkPV4Foam::convertLagrangianFields" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -316,7 +316,7 @@ void Foam::vtkPV398Foam::convertLagrangianFields
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::convertLagrangianFields" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::convertLagrangianFields" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -22,12 +22,12 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
InClass
|
InClass
|
||||||
vtkPV398Foam
|
vtkPV4Foam
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef vtkPV398FoamLagrangianFields_H
|
#ifndef vtkPV4FoamLagrangianFields_H
|
||||||
#define vtkPV398FoamLagrangianFields_H
|
#define vtkPV4FoamLagrangianFields_H
|
||||||
|
|
||||||
#include "Cloud.H"
|
#include "Cloud.H"
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ InClass
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::vtkPV398Foam::convertLagrangianFields
|
void Foam::vtkPV4Foam::convertLagrangianFields
|
||||||
(
|
(
|
||||||
const IOobjectList& objects,
|
const IOobjectList& objects,
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
@ -58,7 +58,7 @@ void Foam::vtkPV398Foam::convertLagrangianFields
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::vtkPV398Foam::convertLagrangianField
|
void Foam::vtkPV4Foam::convertLagrangianField
|
||||||
(
|
(
|
||||||
const IOField<Type>& tf,
|
const IOField<Type>& tf,
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
@ -23,14 +23,14 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "vtkPV398Foam.H"
|
#include "vtkPV4Foam.H"
|
||||||
|
|
||||||
// OpenFOAM includes
|
// OpenFOAM includes
|
||||||
#include "cellSet.H"
|
#include "cellSet.H"
|
||||||
#include "faceSet.H"
|
#include "faceSet.H"
|
||||||
#include "pointSet.H"
|
#include "pointSet.H"
|
||||||
#include "fvMeshSubset.H"
|
#include "fvMeshSubset.H"
|
||||||
#include "vtkPV398FoamReader.h"
|
#include "vtkPV4FoamReader.h"
|
||||||
#include "uindirectPrimitivePatch.H"
|
#include "uindirectPrimitivePatch.H"
|
||||||
|
|
||||||
// VTK includes
|
// VTK includes
|
||||||
@ -41,7 +41,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::convertMeshVolume
|
void Foam::vtkPV4Foam::convertMeshVolume
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
int& blockNo
|
int& blockNo
|
||||||
@ -57,7 +57,7 @@ void Foam::vtkPV398Foam::convertMeshVolume
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::convertMeshVolume" << endl;
|
Info<< "<beg> Foam::vtkPV4Foam::convertMeshVolume" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,13 +95,13 @@ void Foam::vtkPV398Foam::convertMeshVolume
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::convertMeshVolume" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::convertMeshVolume" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::convertMeshLagrangian
|
void Foam::vtkPV4Foam::convertMeshLagrangian
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
int& blockNo
|
int& blockNo
|
||||||
@ -114,7 +114,7 @@ void Foam::vtkPV398Foam::convertMeshLagrangian
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::convertMeshLagrangian" << endl;
|
Info<< "<beg> Foam::vtkPV4Foam::convertMeshLagrangian" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,13 +146,13 @@ void Foam::vtkPV398Foam::convertMeshLagrangian
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::convertMeshLagrangian" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::convertMeshLagrangian" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::convertMeshPatches
|
void Foam::vtkPV4Foam::convertMeshPatches
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
int& blockNo
|
int& blockNo
|
||||||
@ -166,7 +166,7 @@ void Foam::vtkPV398Foam::convertMeshPatches
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::convertMeshPatches" << endl;
|
Info<< "<beg> Foam::vtkPV4Foam::convertMeshPatches" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -235,13 +235,13 @@ void Foam::vtkPV398Foam::convertMeshPatches
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::convertMeshPatches" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::convertMeshPatches" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::convertMeshCellZones
|
void Foam::vtkPV4Foam::convertMeshCellZones
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
int& blockNo
|
int& blockNo
|
||||||
@ -262,7 +262,7 @@ void Foam::vtkPV398Foam::convertMeshCellZones
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::convertMeshCellZones" << endl;
|
Info<< "<beg> Foam::vtkPV4Foam::convertMeshCellZones" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -324,13 +324,13 @@ void Foam::vtkPV398Foam::convertMeshCellZones
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::convertMeshCellZones" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::convertMeshCellZones" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::convertMeshCellSets
|
void Foam::vtkPV4Foam::convertMeshCellSets
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
int& blockNo
|
int& blockNo
|
||||||
@ -346,7 +346,7 @@ void Foam::vtkPV398Foam::convertMeshCellSets
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::convertMeshCellSets" << endl;
|
Info<< "<beg> Foam::vtkPV4Foam::convertMeshCellSets" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -406,13 +406,13 @@ void Foam::vtkPV398Foam::convertMeshCellSets
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::convertMeshCellSets" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::convertMeshCellSets" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::convertMeshFaceZones
|
void Foam::vtkPV4Foam::convertMeshFaceZones
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
int& blockNo
|
int& blockNo
|
||||||
@ -430,7 +430,7 @@ void Foam::vtkPV398Foam::convertMeshFaceZones
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::convertMeshFaceZones" << endl;
|
Info<< "<beg> Foam::vtkPV4Foam::convertMeshFaceZones" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -470,13 +470,13 @@ void Foam::vtkPV398Foam::convertMeshFaceZones
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::convertMeshFaceZones" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::convertMeshFaceZones" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::convertMeshFaceSets
|
void Foam::vtkPV4Foam::convertMeshFaceSets
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
int& blockNo
|
int& blockNo
|
||||||
@ -489,7 +489,7 @@ void Foam::vtkPV398Foam::convertMeshFaceSets
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::convertMeshFaceSets" << endl;
|
Info<< "<beg> Foam::vtkPV4Foam::convertMeshFaceSets" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -527,13 +527,13 @@ void Foam::vtkPV398Foam::convertMeshFaceSets
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::convertMeshFaceSets" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::convertMeshFaceSets" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::convertMeshPointZones
|
void Foam::vtkPV4Foam::convertMeshPointZones
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
int& blockNo
|
int& blockNo
|
||||||
@ -546,7 +546,7 @@ void Foam::vtkPV398Foam::convertMeshPointZones
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::convertMeshPointZones" << endl;
|
Info<< "<beg> Foam::vtkPV4Foam::convertMeshPointZones" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -582,14 +582,14 @@ void Foam::vtkPV398Foam::convertMeshPointZones
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::convertMeshPointZones" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::convertMeshPointZones" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::convertMeshPointSets
|
void Foam::vtkPV4Foam::convertMeshPointSets
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
int& blockNo
|
int& blockNo
|
||||||
@ -602,7 +602,7 @@ void Foam::vtkPV398Foam::convertMeshPointSets
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::convertMeshPointSets" << endl;
|
Info<< "<beg> Foam::vtkPV4Foam::convertMeshPointSets" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -640,7 +640,7 @@ void Foam::vtkPV398Foam::convertMeshPointSets
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::convertMeshPointSets" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::convertMeshPointSets" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "vtkPV398Foam.H"
|
#include "vtkPV4Foam.H"
|
||||||
|
|
||||||
// OpenFOAM includes
|
// OpenFOAM includes
|
||||||
#include "Cloud.H"
|
#include "Cloud.H"
|
||||||
@ -39,7 +39,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
vtkPolyData* Foam::vtkPV398Foam::lagrangianVTKMesh
|
vtkPolyData* Foam::vtkPV4Foam::lagrangianVTKMesh
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const word& cloudName
|
const word& cloudName
|
||||||
@ -49,7 +49,7 @@ vtkPolyData* Foam::vtkPV398Foam::lagrangianVTKMesh
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::lagrangianVTKMesh - timePath "
|
Info<< "<beg> Foam::vtkPV4Foam::lagrangianVTKMesh - timePath "
|
||||||
<< mesh.time().timePath()/cloud::prefix/cloudName << endl;
|
<< mesh.time().timePath()/cloud::prefix/cloudName << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
@ -98,7 +98,7 @@ vtkPolyData* Foam::vtkPV398Foam::lagrangianVTKMesh
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::lagrangianVTKMesh" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::lagrangianVTKMesh" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "vtkPV398Foam.H"
|
#include "vtkPV4Foam.H"
|
||||||
|
|
||||||
// OpenFOAM includes
|
// OpenFOAM includes
|
||||||
#include "faceSet.H"
|
#include "faceSet.H"
|
||||||
@ -37,7 +37,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
vtkPolyData* Foam::vtkPV398Foam::faceSetVTKMesh
|
vtkPolyData* Foam::vtkPV4Foam::faceSetVTKMesh
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const faceSet& fSet
|
const faceSet& fSet
|
||||||
@ -47,7 +47,7 @@ vtkPolyData* Foam::vtkPV398Foam::faceSetVTKMesh
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::faceSetVTKMesh" << endl;
|
Info<< "<beg> Foam::vtkPV4Foam::faceSetVTKMesh" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ vtkPolyData* Foam::vtkPV398Foam::faceSetVTKMesh
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::faceSetVTKMesh" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::faceSetVTKMesh" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ vtkPolyData* Foam::vtkPV398Foam::faceSetVTKMesh
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
vtkPolyData* Foam::vtkPV398Foam::pointSetVTKMesh
|
vtkPolyData* Foam::vtkPV4Foam::pointSetVTKMesh
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const pointSet& pSet
|
const pointSet& pSet
|
||||||
@ -118,7 +118,7 @@ vtkPolyData* Foam::vtkPV398Foam::pointSetVTKMesh
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::pointSetVTKMesh" << endl;
|
Info<< "<beg> Foam::vtkPV4Foam::pointSetVTKMesh" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ vtkPolyData* Foam::vtkPV398Foam::pointSetVTKMesh
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::pointSetVTKMesh" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::pointSetVTKMesh" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23,8 +23,8 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "vtkPV398Foam.H"
|
#include "vtkPV4Foam.H"
|
||||||
#include "vtkPV398FoamReader.h"
|
#include "vtkPV4FoamReader.h"
|
||||||
|
|
||||||
// OpenFOAM includes
|
// OpenFOAM includes
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
@ -40,7 +40,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
vtkUnstructuredGrid* Foam::vtkPV398Foam::volumeVTKMesh
|
vtkUnstructuredGrid* Foam::vtkPV4Foam::volumeVTKMesh
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
polyDecomp& decompInfo
|
polyDecomp& decompInfo
|
||||||
@ -57,7 +57,7 @@ vtkUnstructuredGrid* Foam::vtkPV398Foam::volumeVTKMesh
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::volumeVTKMesh" << endl;
|
Info<< "<beg> Foam::vtkPV4Foam::volumeVTKMesh" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -470,7 +470,7 @@ vtkUnstructuredGrid* Foam::vtkPV398Foam::volumeVTKMesh
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::volumeVTKMesh" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::volumeVTKMesh" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "vtkPV398Foam.H"
|
#include "vtkPV4Foam.H"
|
||||||
|
|
||||||
// OpenFOAM includes
|
// OpenFOAM includes
|
||||||
#include "vtkOpenFOAMPoints.H"
|
#include "vtkOpenFOAMPoints.H"
|
||||||
@ -35,7 +35,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
vtkPolyData* Foam::vtkPV398Foam::pointZoneVTKMesh
|
vtkPolyData* Foam::vtkPV4Foam::pointZoneVTKMesh
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const labelList& pointLabels
|
const labelList& pointLabels
|
||||||
@ -45,7 +45,7 @@ vtkPolyData* Foam::vtkPV398Foam::pointZoneVTKMesh
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::pointZoneVTKMesh" << endl;
|
Info<< "<beg> Foam::vtkPV4Foam::pointZoneVTKMesh" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ vtkPolyData* Foam::vtkPV398Foam::pointZoneVTKMesh
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::pointZoneVTKMesh" << endl;
|
Info<< "<beg> Foam::vtkPV4Foam::pointZoneVTKMesh" << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,12 +22,12 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
InClass
|
InClass
|
||||||
vtkPV398Foam
|
vtkPV4Foam
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef vtkPV398FoamPatchField_H
|
#ifndef vtkPV4FoamPatchField_H
|
||||||
#define vtkPV398FoamPatchField_H
|
#define vtkPV4FoamPatchField_H
|
||||||
|
|
||||||
// VTK includes
|
// VTK includes
|
||||||
#include "vtkCellData.h"
|
#include "vtkCellData.h"
|
||||||
@ -41,7 +41,7 @@ InClass
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::vtkPV398Foam::convertPatchField
|
void Foam::vtkPV4Foam::convertPatchField
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const Field<Type>& ptf,
|
const Field<Type>& ptf,
|
||||||
@ -83,7 +83,7 @@ void Foam::vtkPV398Foam::convertPatchField
|
|||||||
|
|
||||||
// as above, but with PointData()
|
// as above, but with PointData()
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::vtkPV398Foam::convertPatchPointField
|
void Foam::vtkPV4Foam::convertPatchPointField
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const Field<Type>& pptf,
|
const Field<Type>& pptf,
|
||||||
@ -22,12 +22,12 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
InClass
|
InClass
|
||||||
vtkPV398Foam
|
vtkPV4Foam
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef vtkPV398FoamPointFields_H
|
#ifndef vtkPV4FoamPointFields_H
|
||||||
#define vtkPV398FoamPointFields_H
|
#define vtkPV4FoamPointFields_H
|
||||||
|
|
||||||
// OpenFOAM includes
|
// OpenFOAM includes
|
||||||
#include "interpolatePointToCell.H"
|
#include "interpolatePointToCell.H"
|
||||||
@ -37,7 +37,7 @@ InClass
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::vtkPV398Foam::convertPointFields
|
void Foam::vtkPV4Foam::convertPointFields
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const pointMesh& pMesh,
|
const pointMesh& pMesh,
|
||||||
@ -62,7 +62,7 @@ void Foam::vtkPV398Foam::convertPointFields
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "Foam::vtkPV398Foam::convertPointFields : "
|
Info<< "Foam::vtkPV4Foam::convertPointFields : "
|
||||||
<< fieldName << endl;
|
<< fieldName << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,7 +170,7 @@ void Foam::vtkPV398Foam::convertPointFields
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::vtkPV398Foam::convertPointFieldBlock
|
void Foam::vtkPV4Foam::convertPointFieldBlock
|
||||||
(
|
(
|
||||||
const GeometricField<Type, pointPatchField, pointMesh>& ptf,
|
const GeometricField<Type, pointPatchField, pointMesh>& ptf,
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
@ -199,7 +199,7 @@ void Foam::vtkPV398Foam::convertPointFieldBlock
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::vtkPV398Foam::convertPointField
|
void Foam::vtkPV4Foam::convertPointField
|
||||||
(
|
(
|
||||||
const GeometricField<Type, pointPatchField, pointMesh>& ptf,
|
const GeometricField<Type, pointPatchField, pointMesh>& ptf,
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& tf,
|
const GeometricField<Type, fvPatchField, volMesh>& tf,
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "vtkPV398Foam.H"
|
#include "vtkPV4Foam.H"
|
||||||
|
|
||||||
// OpenFOAM includes
|
// OpenFOAM includes
|
||||||
#include "polyPatch.H"
|
#include "polyPatch.H"
|
||||||
@ -38,7 +38,7 @@ License
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class PatchType>
|
template<class PatchType>
|
||||||
vtkPolyData* Foam::vtkPV398Foam::patchVTKMesh
|
vtkPolyData* Foam::vtkPV4Foam::patchVTKMesh
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const PatchType& p
|
const PatchType& p
|
||||||
@ -48,7 +48,7 @@ vtkPolyData* Foam::vtkPV398Foam::patchVTKMesh
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::patchVTKMesh - " << name << endl;
|
Info<< "<beg> Foam::vtkPV4Foam::patchVTKMesh - " << name << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ vtkPolyData* Foam::vtkPV398Foam::patchVTKMesh
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::patchVTKMesh - " << name << endl;
|
Info<< "<end> Foam::vtkPV4Foam::patchVTKMesh - " << name << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "vtkPV398Foam.H"
|
#include "vtkPV4Foam.H"
|
||||||
|
|
||||||
// OpenFOAM includes
|
// OpenFOAM includes
|
||||||
#include "cellSet.H"
|
#include "cellSet.H"
|
||||||
@ -34,11 +34,11 @@ License
|
|||||||
#include "polyBoundaryMeshEntries.H"
|
#include "polyBoundaryMeshEntries.H"
|
||||||
#include "entry.H"
|
#include "entry.H"
|
||||||
#include "Cloud.H"
|
#include "Cloud.H"
|
||||||
#include "vtkPV398FoamReader.h"
|
#include "vtkPV4FoamReader.h"
|
||||||
|
|
||||||
// local headers
|
// local headers
|
||||||
#include "vtkPV398FoamAddToSelection.H"
|
#include "vtkPV4FoamAddToSelection.H"
|
||||||
#include "vtkPV398FoamUpdateInfoFields.H"
|
#include "vtkPV4FoamUpdateInfoFields.H"
|
||||||
|
|
||||||
// VTK includes
|
// VTK includes
|
||||||
#include "vtkDataArraySelection.h"
|
#include "vtkDataArraySelection.h"
|
||||||
@ -82,7 +82,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ZoneType>
|
template<class ZoneType>
|
||||||
Foam::wordList Foam::vtkPV398Foam::getZoneNames
|
Foam::wordList Foam::vtkPV4Foam::getZoneNames
|
||||||
(
|
(
|
||||||
const ZoneMesh<ZoneType, polyMesh>& zmesh
|
const ZoneMesh<ZoneType, polyMesh>& zmesh
|
||||||
) const
|
) const
|
||||||
@ -103,7 +103,7 @@ Foam::wordList Foam::vtkPV398Foam::getZoneNames
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::wordList Foam::vtkPV398Foam::getZoneNames(const word& zoneType) const
|
Foam::wordList Foam::vtkPV4Foam::getZoneNames(const word& zoneType) const
|
||||||
{
|
{
|
||||||
wordList names;
|
wordList names;
|
||||||
|
|
||||||
@ -139,14 +139,14 @@ Foam::wordList Foam::vtkPV398Foam::getZoneNames(const word& zoneType) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::updateInfoInternalMesh
|
void Foam::vtkPV4Foam::updateInfoInternalMesh
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* arraySelection
|
vtkDataArraySelection* arraySelection
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::updateInfoInternalMesh" << endl;
|
Info<< "<beg> Foam::vtkPV4Foam::updateInfoInternalMesh" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determine mesh parts (internalMesh, patches...)
|
// Determine mesh parts (internalMesh, patches...)
|
||||||
@ -163,19 +163,19 @@ void Foam::vtkPV398Foam::updateInfoInternalMesh
|
|||||||
// just for debug info
|
// just for debug info
|
||||||
getSelectedArrayEntries(arraySelection);
|
getSelectedArrayEntries(arraySelection);
|
||||||
|
|
||||||
Info<< "<end> Foam::vtkPV398Foam::updateInfoInternalMesh" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::updateInfoInternalMesh" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::updateInfoLagrangian
|
void Foam::vtkPV4Foam::updateInfoLagrangian
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* arraySelection
|
vtkDataArraySelection* arraySelection
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::updateInfoLagrangian" << nl
|
Info<< "<beg> Foam::vtkPV4Foam::updateInfoLagrangian" << nl
|
||||||
<< " " << dbPtr_->timePath()/cloud::prefix << endl;
|
<< " " << dbPtr_->timePath()/cloud::prefix << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,12 +214,12 @@ void Foam::vtkPV398Foam::updateInfoLagrangian
|
|||||||
// just for debug info
|
// just for debug info
|
||||||
getSelectedArrayEntries(arraySelection);
|
getSelectedArrayEntries(arraySelection);
|
||||||
|
|
||||||
Info<< "<end> Foam::vtkPV398Foam::updateInfoLagrangian" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::updateInfoLagrangian" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::updateInfoPatches
|
void Foam::vtkPV4Foam::updateInfoPatches
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* arraySelection,
|
vtkDataArraySelection* arraySelection,
|
||||||
stringList& enabledEntries
|
stringList& enabledEntries
|
||||||
@ -227,7 +227,7 @@ void Foam::vtkPV398Foam::updateInfoPatches
|
|||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::updateInfoPatches"
|
Info<< "<beg> Foam::vtkPV4Foam::updateInfoPatches"
|
||||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
|
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -458,12 +458,12 @@ void Foam::vtkPV398Foam::updateInfoPatches
|
|||||||
// just for debug info
|
// just for debug info
|
||||||
getSelectedArrayEntries(arraySelection);
|
getSelectedArrayEntries(arraySelection);
|
||||||
|
|
||||||
Info<< "<end> Foam::vtkPV398Foam::updateInfoPatches" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::updateInfoPatches" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::updateInfoZones
|
void Foam::vtkPV4Foam::updateInfoZones
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* arraySelection
|
vtkDataArraySelection* arraySelection
|
||||||
)
|
)
|
||||||
@ -475,7 +475,7 @@ void Foam::vtkPV398Foam::updateInfoZones
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::updateInfoZones"
|
Info<< "<beg> Foam::vtkPV4Foam::updateInfoZones"
|
||||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
|
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -554,12 +554,12 @@ void Foam::vtkPV398Foam::updateInfoZones
|
|||||||
// just for debug info
|
// just for debug info
|
||||||
getSelectedArrayEntries(arraySelection);
|
getSelectedArrayEntries(arraySelection);
|
||||||
|
|
||||||
Info<< "<end> Foam::vtkPV398Foam::updateInfoZones" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::updateInfoZones" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::updateInfoSets
|
void Foam::vtkPV4Foam::updateInfoSets
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* arraySelection
|
vtkDataArraySelection* arraySelection
|
||||||
)
|
)
|
||||||
@ -571,7 +571,7 @@ void Foam::vtkPV398Foam::updateInfoSets
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::updateInfoSets" << endl;
|
Info<< "<beg> Foam::vtkPV4Foam::updateInfoSets" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add names of sets. Search for last time directory with a sets
|
// Add names of sets. Search for last time directory with a sets
|
||||||
@ -596,7 +596,7 @@ void Foam::vtkPV398Foam::updateInfoSets
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< " Foam::vtkPV398Foam::updateInfoSets read "
|
Info<< " Foam::vtkPV4Foam::updateInfoSets read "
|
||||||
<< objects.names() << " from " << setsInstance << endl;
|
<< objects.names() << " from " << setsInstance << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -630,16 +630,16 @@ void Foam::vtkPV398Foam::updateInfoSets
|
|||||||
// just for debug info
|
// just for debug info
|
||||||
getSelectedArrayEntries(arraySelection);
|
getSelectedArrayEntries(arraySelection);
|
||||||
|
|
||||||
Info<< "<end> Foam::vtkPV398Foam::updateInfoSets" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::updateInfoSets" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::updateInfoLagrangianFields()
|
void Foam::vtkPV4Foam::updateInfoLagrangianFields()
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::updateInfoLagrangianFields"
|
Info<< "<beg> Foam::vtkPV4Foam::updateInfoLagrangianFields"
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -715,7 +715,7 @@ void Foam::vtkPV398Foam::updateInfoLagrangianFields()
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::updateInfoLagrangianFields - "
|
Info<< "<end> Foam::vtkPV4Foam::updateInfoLagrangianFields - "
|
||||||
<< "lagrangian objects.size() = " << objects.size() << endl;
|
<< "lagrangian objects.size() = " << objects.size() << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -22,24 +22,24 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
InClass
|
InClass
|
||||||
vtkPV398Foam
|
vtkPV4Foam
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef vtkPV398FoamUpdateInfoFields_H
|
#ifndef vtkPV4FoamUpdateInfoFields_H
|
||||||
#define vtkPV398FoamUpdateInfoFields_H
|
#define vtkPV4FoamUpdateInfoFields_H
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<template<class> class patchType, class meshType>
|
template<template<class> class patchType, class meshType>
|
||||||
void Foam::vtkPV398Foam::updateInfoFields
|
void Foam::vtkPV4Foam::updateInfoFields
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* select
|
vtkDataArraySelection* select
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398Foam::updateInfoFields <"
|
Info<< "<beg> Foam::vtkPV4Foam::updateInfoFields <"
|
||||||
<< meshType::Mesh::typeName
|
<< meshType::Mesh::typeName
|
||||||
<< "> [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]"
|
<< "> [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]"
|
||||||
<< endl;
|
<< endl;
|
||||||
@ -104,7 +104,7 @@ void Foam::vtkPV398Foam::updateInfoFields
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398Foam::updateInfoFields" << endl;
|
Info<< "<end> Foam::vtkPV4Foam::updateInfoFields" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -26,8 +26,8 @@ Description
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "vtkPV398Foam.H"
|
#include "vtkPV4Foam.H"
|
||||||
#include "vtkPV398FoamReader.h"
|
#include "vtkPV4FoamReader.h"
|
||||||
|
|
||||||
// OpenFOAM includes
|
// OpenFOAM includes
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
@ -72,7 +72,7 @@ namespace Foam
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::AddToBlock
|
void Foam::vtkPV4Foam::AddToBlock
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
vtkDataSet* dataset,
|
vtkDataSet* dataset,
|
||||||
@ -90,7 +90,7 @@ void Foam::vtkPV398Foam::AddToBlock
|
|||||||
{
|
{
|
||||||
if (blockDO)
|
if (blockDO)
|
||||||
{
|
{
|
||||||
FatalErrorIn("Foam::vtkPV398Foam::AddToBlock")
|
FatalErrorIn("Foam::vtkPV4Foam::AddToBlock")
|
||||||
<< "Block already has a vtkDataSet assigned to it"
|
<< "Block already has a vtkDataSet assigned to it"
|
||||||
<< endl;
|
<< endl;
|
||||||
return;
|
return;
|
||||||
@ -132,7 +132,7 @@ void Foam::vtkPV398Foam::AddToBlock
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
vtkDataSet* Foam::vtkPV398Foam::GetDataSetFromBlock
|
vtkDataSet* Foam::vtkPV4Foam::GetDataSetFromBlock
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
const arrayRange& range,
|
const arrayRange& range,
|
||||||
@ -154,7 +154,7 @@ vtkDataSet* Foam::vtkPV398Foam::GetDataSetFromBlock
|
|||||||
|
|
||||||
|
|
||||||
// ununsed at the moment
|
// ununsed at the moment
|
||||||
Foam::label Foam::vtkPV398Foam::GetNumberOfDataSets
|
Foam::label Foam::vtkPV4Foam::GetNumberOfDataSets
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
const arrayRange& range
|
const arrayRange& range
|
||||||
@ -173,13 +173,13 @@ Foam::label Foam::vtkPV398Foam::GetNumberOfDataSets
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::word Foam::vtkPV398Foam::getPartName(const int partId)
|
Foam::word Foam::vtkPV4Foam::getPartName(const int partId)
|
||||||
{
|
{
|
||||||
return getFirstWord(reader_->GetPartArrayName(partId));
|
return getFirstWord(reader_->GetPartArrayName(partId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::wordHashSet Foam::vtkPV398Foam::getSelected
|
Foam::wordHashSet Foam::vtkPV4Foam::getSelected
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* select
|
vtkDataArraySelection* select
|
||||||
)
|
)
|
||||||
@ -199,7 +199,7 @@ Foam::wordHashSet Foam::vtkPV398Foam::getSelected
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::wordHashSet Foam::vtkPV398Foam::getSelected
|
Foam::wordHashSet Foam::vtkPV4Foam::getSelected
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* select,
|
vtkDataArraySelection* select,
|
||||||
const arrayRange& range
|
const arrayRange& range
|
||||||
@ -220,7 +220,7 @@ Foam::wordHashSet Foam::vtkPV398Foam::getSelected
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::stringList Foam::vtkPV398Foam::getSelectedArrayEntries
|
Foam::stringList Foam::vtkPV4Foam::getSelectedArrayEntries
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* select
|
vtkDataArraySelection* select
|
||||||
)
|
)
|
||||||
@ -259,7 +259,7 @@ Foam::stringList Foam::vtkPV398Foam::getSelectedArrayEntries
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::stringList Foam::vtkPV398Foam::getSelectedArrayEntries
|
Foam::stringList Foam::vtkPV4Foam::getSelectedArrayEntries
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* select,
|
vtkDataArraySelection* select,
|
||||||
const arrayRange& range
|
const arrayRange& range
|
||||||
@ -298,7 +298,7 @@ Foam::stringList Foam::vtkPV398Foam::getSelectedArrayEntries
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::setSelectedArrayEntries
|
void Foam::vtkPV4Foam::setSelectedArrayEntries
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* select,
|
vtkDataArraySelection* select,
|
||||||
const stringList& selections
|
const stringList& selections
|
||||||
@ -326,7 +326,7 @@ void Foam::vtkPV398Foam::setSelectedArrayEntries
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::vtkPV398Foam::printMemory()
|
void Foam::vtkPV4Foam::printMemory()
|
||||||
{
|
{
|
||||||
memInfo mem;
|
memInfo mem;
|
||||||
|
|
||||||
@ -22,12 +22,12 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
InClass
|
InClass
|
||||||
vtkPV398Foam
|
vtkPV4Foam
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef vtkPV398FoamVolFields_H
|
#ifndef vtkPV4FoamVolFields_H
|
||||||
#define vtkPV398FoamVolFields_H
|
#define vtkPV4FoamVolFields_H
|
||||||
|
|
||||||
// OpenFOAM includes
|
// OpenFOAM includes
|
||||||
#include "emptyFvPatchField.H"
|
#include "emptyFvPatchField.H"
|
||||||
@ -35,15 +35,15 @@ InClass
|
|||||||
#include "faceSet.H"
|
#include "faceSet.H"
|
||||||
#include "volPointInterpolation.H"
|
#include "volPointInterpolation.H"
|
||||||
|
|
||||||
#include "vtkPV398FoamFaceField.H"
|
#include "vtkPV4FoamFaceField.H"
|
||||||
#include "vtkPV398FoamPatchField.H"
|
#include "vtkPV4FoamPatchField.H"
|
||||||
|
|
||||||
#include "vtkOpenFOAMTupleRemap.H"
|
#include "vtkOpenFOAMTupleRemap.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::vtkPV398Foam::convertVolFields
|
void Foam::vtkPV4Foam::convertVolFields
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const PtrList<PrimitivePatchInterpolation<primitivePatch> >& ppInterpList,
|
const PtrList<PrimitivePatchInterpolation<primitivePatch> >& ppInterpList,
|
||||||
@ -281,7 +281,7 @@ void Foam::vtkPV398Foam::convertVolFields
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::vtkPV398Foam::convertVolFieldBlock
|
void Foam::vtkPV4Foam::convertVolFieldBlock
|
||||||
(
|
(
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& tf,
|
const GeometricField<Type, fvPatchField, volMesh>& tf,
|
||||||
autoPtr<GeometricField<Type, pointPatchField, pointMesh> >& ptfPtr,
|
autoPtr<GeometricField<Type, pointPatchField, pointMesh> >& ptfPtr,
|
||||||
@ -323,7 +323,7 @@ void Foam::vtkPV398Foam::convertVolFieldBlock
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::vtkPV398Foam::convertVolField
|
void Foam::vtkPV4Foam::convertVolField
|
||||||
(
|
(
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& tf,
|
const GeometricField<Type, fvPatchField, volMesh>& tf,
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
@ -3,9 +3,9 @@ cd ${0%/*} || exit 1 # run from this directory
|
|||||||
set -x
|
set -x
|
||||||
|
|
||||||
# deal with client/server vs combined plugins
|
# deal with client/server vs combined plugins
|
||||||
rm -f $FOAM_LIBBIN/libPV398blockMeshReader* 2>/dev/null
|
rm -f $FOAM_LIBBIN/libPV4blockMeshReader* 2>/dev/null
|
||||||
|
|
||||||
rm -rf PV398blockMeshReader/Make
|
rm -rf PV4blockMeshReader/Make
|
||||||
wclean libso vtkPV398blockMesh
|
wclean libso vtkPV4blockMesh
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
@ -4,9 +4,9 @@ set -x
|
|||||||
|
|
||||||
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
|
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
|
||||||
then
|
then
|
||||||
wmake libso vtkPV398blockMesh
|
wmake libso vtkPV4blockMesh
|
||||||
(
|
(
|
||||||
cd PV398blockMeshReader
|
cd PV4blockMeshReader
|
||||||
mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1
|
mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1
|
||||||
cd Make/$WM_OPTIONS
|
cd Make/$WM_OPTIONS
|
||||||
cmake ../..
|
cmake ../..
|
||||||
@ -21,7 +21,7 @@ INCLUDE_DIRECTORIES(
|
|||||||
$ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude
|
$ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude
|
||||||
$ENV{WM_PROJECT_DIR}/src/OSspecific/$ENV{WM_OSTYPE}/lnInclude
|
$ENV{WM_PROJECT_DIR}/src/OSspecific/$ENV{WM_OSTYPE}/lnInclude
|
||||||
$ENV{WM_PROJECT_DIR}/src/meshing/blockMesh/lnInclude
|
$ENV{WM_PROJECT_DIR}/src/meshing/blockMesh/lnInclude
|
||||||
${PROJECT_SOURCE_DIR}/../vtkPV398blockMesh
|
${PROJECT_SOURCE_DIR}/../vtkPV4blockMesh
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_DEFINITIONS(
|
ADD_DEFINITIONS(
|
||||||
@ -40,47 +40,47 @@ SET(
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Extend the auto-generated panel
|
# Extend the auto-generated panel
|
||||||
QT4_WRAP_CPP(MOC_SRCS pqPV398blockMeshReaderPanel.h)
|
QT4_WRAP_CPP(MOC_SRCS pqPV4blockMeshReaderPanel.h)
|
||||||
|
|
||||||
ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS
|
ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS
|
||||||
CLASS_NAME pqPV398blockMeshReaderPanel
|
CLASS_NAME pqPV4blockMeshReaderPanel
|
||||||
XML_NAME PV398blockMeshReader # name of SourceProxy in *SM.xml
|
XML_NAME PV4blockMeshReader # name of SourceProxy in *SM.xml
|
||||||
XML_GROUP sources
|
XML_GROUP sources
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_PARAVIEW_PLUGIN(
|
ADD_PARAVIEW_PLUGIN(
|
||||||
PV398blockMeshReader_SM "1.0"
|
PV4blockMeshReader_SM "1.0"
|
||||||
SERVER_MANAGER_XML PV398blockMeshReader_SM.xml
|
SERVER_MANAGER_XML PV4blockMeshReader_SM.xml
|
||||||
SERVER_MANAGER_SOURCES vtkPV398blockMeshReader.cxx
|
SERVER_MANAGER_SOURCES vtkPV4blockMeshReader.cxx
|
||||||
GUI_INTERFACES ${IFACES}
|
GUI_INTERFACES ${IFACES}
|
||||||
GUI_SOURCES pqPV398blockMeshReaderPanel.cxx
|
GUI_SOURCES pqPV4blockMeshReaderPanel.cxx
|
||||||
${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
|
${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
|
||||||
GUI_RESOURCE_FILES PV398blockMeshReader.xml
|
GUI_RESOURCE_FILES PV4blockMeshReader.xml
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# #
|
# #
|
||||||
# # Define the server-side portion of the reader plugin
|
# # Define the server-side portion of the reader plugin
|
||||||
# #
|
# #
|
||||||
# ADD_PARAVIEW_PLUGIN(PV398blockMeshReader_SM "1.0"
|
# ADD_PARAVIEW_PLUGIN(PV4blockMeshReader_SM "1.0"
|
||||||
# SERVER_MANAGER_XML PV398blockMeshReader_SM.xml
|
# SERVER_MANAGER_XML PV4blockMeshReader_SM.xml
|
||||||
# SERVER_MANAGER_SOURCES vtkPV398blockMeshReader.cxx
|
# SERVER_MANAGER_SOURCES vtkPV4blockMeshReader.cxx
|
||||||
# )
|
# )
|
||||||
# #
|
# #
|
||||||
# # Define the client-side portion of the reader plugin
|
# # Define the client-side portion of the reader plugin
|
||||||
# #
|
# #
|
||||||
# ADD_PARAVIEW_PLUGIN(
|
# ADD_PARAVIEW_PLUGIN(
|
||||||
# PV398blockMeshReader "1.0"
|
# PV4blockMeshReader "1.0"
|
||||||
# GUI_RESOURCES PV398blockMeshReader.qrc
|
# GUI_RESOURCES PV4blockMeshReader.qrc
|
||||||
# )
|
# )
|
||||||
|
|
||||||
|
|
||||||
# Build the client-side plugin
|
# Build the client-side plugin
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(
|
TARGET_LINK_LIBRARIES(
|
||||||
PV398blockMeshReader_SM
|
PV4blockMeshReader_SM
|
||||||
OpenFOAM
|
OpenFOAM
|
||||||
blockMesh
|
blockMesh
|
||||||
vtkPV398blockMesh
|
vtkPV4blockMesh
|
||||||
)
|
)
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/ParaViewResources" >
|
<qresource prefix="/ParaViewResources" >
|
||||||
<file>PV398blockMeshReader.xml</file>
|
<file>PV4blockMeshReader.xml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<ParaViewReaders>
|
<ParaViewReaders>
|
||||||
<Reader name="PV398blockMeshReader"
|
<Reader name="PV4blockMeshReader"
|
||||||
extensions="blockMesh"
|
extensions="blockMesh"
|
||||||
file_description="OpenFOAM blockMesh reader">
|
file_description="OpenFOAM blockMesh reader">
|
||||||
</Reader>
|
</Reader>
|
||||||
@ -1,8 +1,8 @@
|
|||||||
<ServerManagerConfiguration>
|
<ServerManagerConfiguration>
|
||||||
<ProxyGroup name="sources">
|
<ProxyGroup name="sources">
|
||||||
<SourceProxy
|
<SourceProxy
|
||||||
name="PV398blockMeshReader"
|
name="PV4blockMeshReader"
|
||||||
class="vtkPV398blockMeshReader">
|
class="vtkPV4blockMeshReader">
|
||||||
|
|
||||||
<!-- File name - compulsory -->
|
<!-- File name - compulsory -->
|
||||||
<StringVectorProperty
|
<StringVectorProperty
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "pqPV398blockMeshReaderPanel.h"
|
#include "pqPV4blockMeshReaderPanel.h"
|
||||||
|
|
||||||
// QT
|
// QT
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
@ -50,7 +50,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
pqPV398blockMeshReaderPanel::pqPV398blockMeshReaderPanel
|
pqPV4blockMeshReaderPanel::pqPV4blockMeshReaderPanel
|
||||||
(
|
(
|
||||||
pqProxy *proxy,
|
pqProxy *proxy,
|
||||||
QWidget *p
|
QWidget *p
|
||||||
@ -90,7 +90,7 @@ pqPV398blockMeshReaderPanel::pqPV398blockMeshReaderPanel
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void pqPV398blockMeshReaderPanel::ShowPointNumbersToggled()
|
void pqPV4blockMeshReaderPanel::ShowPointNumbersToggled()
|
||||||
{
|
{
|
||||||
vtkSMIntVectorProperty::SafeDownCast
|
vtkSMIntVectorProperty::SafeDownCast
|
||||||
(
|
(
|
||||||
@ -22,19 +22,19 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
pqPV398blockMeshReaderPanel
|
pqPV4blockMeshReaderPanel
|
||||||
|
|
||||||
Description
|
Description
|
||||||
GUI modifications for the ParaView reader panel
|
GUI modifications for the ParaView reader panel
|
||||||
|
|
||||||
A custom panel for the PV398blockMeshReader.
|
A custom panel for the PV4blockMeshReader.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
pqPV398blockMeshReaderPanel.cxx
|
pqPV4blockMeshReaderPanel.cxx
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
#ifndef pqPV398blockMeshReaderPanel_h
|
#ifndef pqPV4blockMeshReaderPanel_h
|
||||||
#define pqPV398blockMeshReaderPanel_h
|
#define pqPV4blockMeshReaderPanel_h
|
||||||
|
|
||||||
#include "pqAutoGeneratedObjectPanel.h"
|
#include "pqAutoGeneratedObjectPanel.h"
|
||||||
|
|
||||||
@ -50,10 +50,10 @@ class vtkSMSourceProxy;
|
|||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class pqPV398blockMeshReaderPanel Declaration
|
Class pqPV4blockMeshReaderPanel Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class pqPV398blockMeshReaderPanel
|
class pqPV4blockMeshReaderPanel
|
||||||
:
|
:
|
||||||
public pqAutoGeneratedObjectPanel
|
public pqAutoGeneratedObjectPanel
|
||||||
{
|
{
|
||||||
@ -74,11 +74,11 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
pqPV398blockMeshReaderPanel(pqProxy*, QWidget*);
|
pqPV4blockMeshReaderPanel(pqProxy*, QWidget*);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
// virtual ~pqPV398blockMeshReaderPanel();
|
// virtual ~pqPV4blockMeshReaderPanel();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
#include "vtkPV398blockMeshReader.h"
|
#include "vtkPV4blockMeshReader.h"
|
||||||
|
|
||||||
#include "pqApplicationCore.h"
|
#include "pqApplicationCore.h"
|
||||||
#include "pqRenderView.h"
|
#include "pqRenderView.h"
|
||||||
@ -40,16 +40,16 @@ License
|
|||||||
#include "vtkStringArray.h"
|
#include "vtkStringArray.h"
|
||||||
|
|
||||||
// OpenFOAM includes
|
// OpenFOAM includes
|
||||||
#include "vtkPV398blockMesh.H"
|
#include "vtkPV4blockMesh.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
vtkStandardNewMacro(vtkPV398blockMeshReader);
|
vtkStandardNewMacro(vtkPV4blockMeshReader);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
vtkPV398blockMeshReader::vtkPV398blockMeshReader()
|
vtkPV4blockMeshReader::vtkPV4blockMeshReader()
|
||||||
{
|
{
|
||||||
Debug = 0;
|
Debug = 0;
|
||||||
vtkDebugMacro(<<"Constructor");
|
vtkDebugMacro(<<"Constructor");
|
||||||
@ -70,7 +70,7 @@ vtkPV398blockMeshReader::vtkPV398blockMeshReader()
|
|||||||
SelectionObserver = vtkCallbackCommand::New();
|
SelectionObserver = vtkCallbackCommand::New();
|
||||||
SelectionObserver->SetCallback
|
SelectionObserver->SetCallback
|
||||||
(
|
(
|
||||||
&vtkPV398blockMeshReader::SelectionModifiedCallback
|
&vtkPV4blockMeshReader::SelectionModifiedCallback
|
||||||
);
|
);
|
||||||
SelectionObserver->SetClientData(this);
|
SelectionObserver->SetClientData(this);
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ vtkPV398blockMeshReader::vtkPV398blockMeshReader()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
vtkPV398blockMeshReader::~vtkPV398blockMeshReader()
|
vtkPV4blockMeshReader::~vtkPV4blockMeshReader()
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"Deconstructor");
|
vtkDebugMacro(<<"Deconstructor");
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ vtkPV398blockMeshReader::~vtkPV398blockMeshReader()
|
|||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Do everything except set the output info
|
// Do everything except set the output info
|
||||||
int vtkPV398blockMeshReader::RequestInformation
|
int vtkPV4blockMeshReader::RequestInformation
|
||||||
(
|
(
|
||||||
vtkInformation* vtkNotUsed(request),
|
vtkInformation* vtkNotUsed(request),
|
||||||
vtkInformationVector** vtkNotUsed(inputVector),
|
vtkInformationVector** vtkNotUsed(inputVector),
|
||||||
@ -127,7 +127,7 @@ int vtkPV398blockMeshReader::RequestInformation
|
|||||||
{
|
{
|
||||||
vtkDebugMacro(<<"RequestInformation");
|
vtkDebugMacro(<<"RequestInformation");
|
||||||
|
|
||||||
if (Foam::vtkPV398blockMesh::debug)
|
if (Foam::vtkPV4blockMesh::debug)
|
||||||
{
|
{
|
||||||
cout<<"REQUEST_INFORMATION\n";
|
cout<<"REQUEST_INFORMATION\n";
|
||||||
}
|
}
|
||||||
@ -140,7 +140,7 @@ int vtkPV398blockMeshReader::RequestInformation
|
|||||||
|
|
||||||
int nInfo = outputVector->GetNumberOfInformationObjects();
|
int nInfo = outputVector->GetNumberOfInformationObjects();
|
||||||
|
|
||||||
if (Foam::vtkPV398blockMesh::debug)
|
if (Foam::vtkPV4blockMesh::debug)
|
||||||
{
|
{
|
||||||
cout<<"RequestInformation with " << nInfo << " item(s)\n";
|
cout<<"RequestInformation with " << nInfo << " item(s)\n";
|
||||||
for (int infoI = 0; infoI < nInfo; ++infoI)
|
for (int infoI = 0; infoI < nInfo; ++infoI)
|
||||||
@ -151,7 +151,7 @@ int vtkPV398blockMeshReader::RequestInformation
|
|||||||
|
|
||||||
if (!foamData_)
|
if (!foamData_)
|
||||||
{
|
{
|
||||||
foamData_ = new Foam::vtkPV398blockMesh(FileName, this);
|
foamData_ = new Foam::vtkPV4blockMesh(FileName, this);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -175,7 +175,7 @@ int vtkPV398blockMeshReader::RequestInformation
|
|||||||
|
|
||||||
|
|
||||||
// Set the output info
|
// Set the output info
|
||||||
int vtkPV398blockMeshReader::RequestData
|
int vtkPV4blockMeshReader::RequestData
|
||||||
(
|
(
|
||||||
vtkInformation* vtkNotUsed(request),
|
vtkInformation* vtkNotUsed(request),
|
||||||
vtkInformationVector** vtkNotUsed(inputVector),
|
vtkInformationVector** vtkNotUsed(inputVector),
|
||||||
@ -199,7 +199,7 @@ int vtkPV398blockMeshReader::RequestData
|
|||||||
|
|
||||||
int nInfo = outputVector->GetNumberOfInformationObjects();
|
int nInfo = outputVector->GetNumberOfInformationObjects();
|
||||||
|
|
||||||
if (Foam::vtkPV398blockMesh::debug)
|
if (Foam::vtkPV4blockMesh::debug)
|
||||||
{
|
{
|
||||||
cout<<"RequestData with " << nInfo << " item(s)\n";
|
cout<<"RequestData with " << nInfo << " item(s)\n";
|
||||||
for (int infoI = 0; infoI < nInfo; ++infoI)
|
for (int infoI = 0; infoI < nInfo; ++infoI)
|
||||||
@ -216,7 +216,7 @@ int vtkPV398blockMeshReader::RequestData
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (Foam::vtkPV398blockMesh::debug)
|
if (Foam::vtkPV4blockMesh::debug)
|
||||||
{
|
{
|
||||||
cout<< "update output with "
|
cout<< "update output with "
|
||||||
<< output->GetNumberOfBlocks() << " blocks\n";
|
<< output->GetNumberOfBlocks() << " blocks\n";
|
||||||
@ -234,7 +234,7 @@ int vtkPV398blockMeshReader::RequestData
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void vtkPV398blockMeshReader::SetShowPointNumbers(const int val)
|
void vtkPV4blockMeshReader::SetShowPointNumbers(const int val)
|
||||||
{
|
{
|
||||||
if (ShowPointNumbers != val)
|
if (ShowPointNumbers != val)
|
||||||
{
|
{
|
||||||
@ -244,7 +244,7 @@ void vtkPV398blockMeshReader::SetShowPointNumbers(const int val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void vtkPV398blockMeshReader::updatePointNumbersView(const bool show)
|
void vtkPV4blockMeshReader::updatePointNumbersView(const bool show)
|
||||||
{
|
{
|
||||||
pqApplicationCore* appCore = pqApplicationCore::instance();
|
pqApplicationCore* appCore = pqApplicationCore::instance();
|
||||||
|
|
||||||
@ -277,7 +277,7 @@ void vtkPV398blockMeshReader::updatePointNumbersView(const bool show)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void vtkPV398blockMeshReader::PrintSelf(ostream& os, vtkIndent indent)
|
void vtkPV4blockMeshReader::PrintSelf(ostream& os, vtkIndent indent)
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"PrintSelf");
|
vtkDebugMacro(<<"PrintSelf");
|
||||||
|
|
||||||
@ -292,35 +292,35 @@ void vtkPV398blockMeshReader::PrintSelf(ostream& os, vtkIndent indent)
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
// Block selection list control
|
// Block selection list control
|
||||||
|
|
||||||
vtkDataArraySelection* vtkPV398blockMeshReader::GetBlockSelection()
|
vtkDataArraySelection* vtkPV4blockMeshReader::GetBlockSelection()
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetBlockSelection");
|
vtkDebugMacro(<<"GetBlockSelection");
|
||||||
return BlockSelection;
|
return BlockSelection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int vtkPV398blockMeshReader::GetNumberOfBlockArrays()
|
int vtkPV4blockMeshReader::GetNumberOfBlockArrays()
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetNumberOfBlockArrays");
|
vtkDebugMacro(<<"GetNumberOfBlockArrays");
|
||||||
return BlockSelection->GetNumberOfArrays();
|
return BlockSelection->GetNumberOfArrays();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const char* vtkPV398blockMeshReader::GetBlockArrayName(int index)
|
const char* vtkPV4blockMeshReader::GetBlockArrayName(int index)
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetBlockArrayName");
|
vtkDebugMacro(<<"GetBlockArrayName");
|
||||||
return BlockSelection->GetArrayName(index);
|
return BlockSelection->GetArrayName(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int vtkPV398blockMeshReader::GetBlockArrayStatus(const char* name)
|
int vtkPV4blockMeshReader::GetBlockArrayStatus(const char* name)
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetBlockArrayStatus");
|
vtkDebugMacro(<<"GetBlockArrayStatus");
|
||||||
return BlockSelection->ArrayIsEnabled(name);
|
return BlockSelection->ArrayIsEnabled(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void vtkPV398blockMeshReader::SetBlockArrayStatus
|
void vtkPV4blockMeshReader::SetBlockArrayStatus
|
||||||
(
|
(
|
||||||
const char* name,
|
const char* name,
|
||||||
int status
|
int status
|
||||||
@ -341,35 +341,35 @@ void vtkPV398blockMeshReader::SetBlockArrayStatus
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
// CurvedEdges selection list control
|
// CurvedEdges selection list control
|
||||||
|
|
||||||
vtkDataArraySelection* vtkPV398blockMeshReader::GetCurvedEdgesSelection()
|
vtkDataArraySelection* vtkPV4blockMeshReader::GetCurvedEdgesSelection()
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetCurvedEdgesSelection");
|
vtkDebugMacro(<<"GetCurvedEdgesSelection");
|
||||||
return CurvedEdgesSelection;
|
return CurvedEdgesSelection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int vtkPV398blockMeshReader::GetNumberOfCurvedEdgesArrays()
|
int vtkPV4blockMeshReader::GetNumberOfCurvedEdgesArrays()
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetNumberOfCurvedEdgesArrays");
|
vtkDebugMacro(<<"GetNumberOfCurvedEdgesArrays");
|
||||||
return CurvedEdgesSelection->GetNumberOfArrays();
|
return CurvedEdgesSelection->GetNumberOfArrays();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const char* vtkPV398blockMeshReader::GetCurvedEdgesArrayName(int index)
|
const char* vtkPV4blockMeshReader::GetCurvedEdgesArrayName(int index)
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetCurvedEdgesArrayName");
|
vtkDebugMacro(<<"GetCurvedEdgesArrayName");
|
||||||
return CurvedEdgesSelection->GetArrayName(index);
|
return CurvedEdgesSelection->GetArrayName(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int vtkPV398blockMeshReader::GetCurvedEdgesArrayStatus(const char* name)
|
int vtkPV4blockMeshReader::GetCurvedEdgesArrayStatus(const char* name)
|
||||||
{
|
{
|
||||||
vtkDebugMacro(<<"GetCurvedEdgesArrayStatus");
|
vtkDebugMacro(<<"GetCurvedEdgesArrayStatus");
|
||||||
return CurvedEdgesSelection->ArrayIsEnabled(name);
|
return CurvedEdgesSelection->ArrayIsEnabled(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void vtkPV398blockMeshReader::SetCurvedEdgesArrayStatus
|
void vtkPV4blockMeshReader::SetCurvedEdgesArrayStatus
|
||||||
(
|
(
|
||||||
const char* name,
|
const char* name,
|
||||||
int status
|
int status
|
||||||
@ -389,7 +389,7 @@ void vtkPV398blockMeshReader::SetCurvedEdgesArrayStatus
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
void vtkPV398blockMeshReader::SelectionModifiedCallback
|
void vtkPV4blockMeshReader::SelectionModifiedCallback
|
||||||
(
|
(
|
||||||
vtkObject*,
|
vtkObject*,
|
||||||
unsigned long,
|
unsigned long,
|
||||||
@ -397,11 +397,11 @@ void vtkPV398blockMeshReader::SelectionModifiedCallback
|
|||||||
void*
|
void*
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
static_cast<vtkPV398blockMeshReader*>(clientdata)->Modified();
|
static_cast<vtkPV4blockMeshReader*>(clientdata)->Modified();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int vtkPV398blockMeshReader::FillOutputPortInformation
|
int vtkPV4blockMeshReader::FillOutputPortInformation
|
||||||
(
|
(
|
||||||
int port,
|
int port,
|
||||||
vtkInformation* info
|
vtkInformation* info
|
||||||
@ -22,21 +22,21 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
vtkPV398blockMeshReader
|
vtkPV4blockMeshReader
|
||||||
|
|
||||||
Description
|
Description
|
||||||
reads a dataset in OpenFOAM bockMesh format
|
reads a dataset in OpenFOAM bockMesh format
|
||||||
|
|
||||||
vtkPV398blockMeshReader creates an multiblock dataset.
|
vtkPV4blockMeshReader creates an multiblock dataset.
|
||||||
It uses the OpenFOAM infrastructure (blockMesh).
|
It uses the OpenFOAM infrastructure (blockMesh).
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
vtkPV398blockMeshReader.cxx
|
vtkPV4blockMeshReader.cxx
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef vtkPV398blockMeshReader_h
|
#ifndef vtkPV4blockMeshReader_h
|
||||||
#define vtkPV398blockMeshReader_h
|
#define vtkPV4blockMeshReader_h
|
||||||
|
|
||||||
// VTK includes
|
// VTK includes
|
||||||
#include "vtkMultiBlockDataSetAlgorithm.h"
|
#include "vtkMultiBlockDataSetAlgorithm.h"
|
||||||
@ -49,22 +49,22 @@ class vtkCallbackCommand;
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
class vtkPV398blockMesh;
|
class vtkPV4blockMesh;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class vtkPV398blockMeshReader Declaration
|
Class vtkPV4blockMeshReader Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class vtkPV398blockMeshReader
|
class vtkPV4blockMeshReader
|
||||||
:
|
:
|
||||||
public vtkMultiBlockDataSetAlgorithm
|
public vtkMultiBlockDataSetAlgorithm
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
vtkTypeMacro(vtkPV398blockMeshReader, vtkMultiBlockDataSetAlgorithm);
|
vtkTypeMacro(vtkPV4blockMeshReader, vtkMultiBlockDataSetAlgorithm);
|
||||||
void PrintSelf(ostream&, vtkIndent);
|
void PrintSelf(ostream&, vtkIndent);
|
||||||
|
|
||||||
static vtkPV398blockMeshReader* New();
|
static vtkPV4blockMeshReader* New();
|
||||||
|
|
||||||
// Description:
|
// Description:
|
||||||
// Set/Get the filename.
|
// Set/Get the filename.
|
||||||
@ -113,10 +113,10 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
//- Construct null
|
//- Construct null
|
||||||
vtkPV398blockMeshReader();
|
vtkPV4blockMeshReader();
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
~vtkPV398blockMeshReader();
|
~vtkPV4blockMeshReader();
|
||||||
|
|
||||||
//- Return information about mesh, times, etc without loading anything
|
//- Return information about mesh, times, etc without loading anything
|
||||||
virtual int RequestInformation
|
virtual int RequestInformation
|
||||||
@ -146,10 +146,10 @@ protected:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
vtkPV398blockMeshReader(const vtkPV398blockMeshReader&);
|
vtkPV4blockMeshReader(const vtkPV4blockMeshReader&);
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const vtkPV398blockMeshReader&);
|
void operator=(const vtkPV4blockMeshReader&);
|
||||||
|
|
||||||
//- Add/remove point numbers to/from the view
|
//- Add/remove point numbers to/from the view
|
||||||
void updatePointNumbersView(const bool show);
|
void updatePointNumbersView(const bool show);
|
||||||
@ -166,7 +166,7 @@ private:
|
|||||||
vtkDataArraySelection* CurvedEdgesSelection;
|
vtkDataArraySelection* CurvedEdgesSelection;
|
||||||
|
|
||||||
//BTX
|
//BTX
|
||||||
Foam::vtkPV398blockMesh* foamData_;
|
Foam::vtkPV4blockMesh* foamData_;
|
||||||
//ETX
|
//ETX
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
vtkPV4blockMesh.C
|
||||||
|
vtkPV4blockMeshConvert.C
|
||||||
|
vtkPV4blockMeshUtils.C
|
||||||
|
|
||||||
|
LIB = $(FOAM_LIBBIN)/libvtkPV4blockMesh
|
||||||
@ -2,11 +2,11 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/mesh/blockMesh/lnInclude \
|
-I$(LIB_SRC)/mesh/blockMesh/lnInclude \
|
||||||
-I$(ParaView_INCLUDE_DIR) \
|
-I$(ParaView_INCLUDE_DIR) \
|
||||||
-I../../vtkPV398Readers/lnInclude \
|
-I../../vtkPV4Readers/lnInclude \
|
||||||
-I../PV398blockMeshReader
|
-I../PV4blockMeshReader
|
||||||
|
|
||||||
LIB_LIBS = \
|
LIB_LIBS = \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lblockMesh \
|
-lblockMesh \
|
||||||
-L$(FOAM_LIBBIN) -lvtkPV398Readers \
|
-L$(FOAM_LIBBIN) -lvtkPV4Readers \
|
||||||
$(GLIBS)
|
$(GLIBS)
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
InClass
|
InClass
|
||||||
vtkPV398blockMesh
|
vtkPV4blockMesh
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -23,8 +23,8 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "vtkPV398blockMesh.H"
|
#include "vtkPV4blockMesh.H"
|
||||||
#include "vtkPV398blockMeshReader.h"
|
#include "vtkPV4blockMeshReader.h"
|
||||||
|
|
||||||
// OpenFOAM includes
|
// OpenFOAM includes
|
||||||
#include "blockMesh.H"
|
#include "blockMesh.H"
|
||||||
@ -43,13 +43,13 @@ License
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(vtkPV398blockMesh, 0);
|
defineTypeNameAndDebug(vtkPV4blockMesh, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::vtkPV398blockMesh::resetCounters()
|
void Foam::vtkPV4blockMesh::resetCounters()
|
||||||
{
|
{
|
||||||
// Reset mesh part ids and sizes
|
// Reset mesh part ids and sizes
|
||||||
arrayRangeBlocks_.reset();
|
arrayRangeBlocks_.reset();
|
||||||
@ -58,14 +58,14 @@ void Foam::vtkPV398blockMesh::resetCounters()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398blockMesh::updateInfoBlocks
|
void Foam::vtkPV4blockMesh::updateInfoBlocks
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* arraySelection
|
vtkDataArraySelection* arraySelection
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398blockMesh::updateInfoBlocks"
|
Info<< "<beg> Foam::vtkPV4blockMesh::updateInfoBlocks"
|
||||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
|
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,19 +96,19 @@ void Foam::vtkPV398blockMesh::updateInfoBlocks
|
|||||||
// just for debug info
|
// just for debug info
|
||||||
getSelectedArrayEntries(arraySelection);
|
getSelectedArrayEntries(arraySelection);
|
||||||
|
|
||||||
Info<< "<end> Foam::vtkPV398blockMesh::updateInfoBlocks" << endl;
|
Info<< "<end> Foam::vtkPV4blockMesh::updateInfoBlocks" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398blockMesh::updateInfoEdges
|
void Foam::vtkPV4blockMesh::updateInfoEdges
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* arraySelection
|
vtkDataArraySelection* arraySelection
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398blockMesh::updateInfoEdges"
|
Info<< "<beg> Foam::vtkPV4blockMesh::updateInfoEdges"
|
||||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
|
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,17 +136,17 @@ void Foam::vtkPV398blockMesh::updateInfoEdges
|
|||||||
// just for debug info
|
// just for debug info
|
||||||
getSelectedArrayEntries(arraySelection);
|
getSelectedArrayEntries(arraySelection);
|
||||||
|
|
||||||
Info<< "<end> Foam::vtkPV398blockMesh::updateInfoEdges" << endl;
|
Info<< "<end> Foam::vtkPV4blockMesh::updateInfoEdges" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::vtkPV398blockMesh::vtkPV398blockMesh
|
Foam::vtkPV4blockMesh::vtkPV4blockMesh
|
||||||
(
|
(
|
||||||
const char* const FileName,
|
const char* const FileName,
|
||||||
vtkPV398blockMeshReader* reader
|
vtkPV4blockMeshReader* reader
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
reader_(reader),
|
reader_(reader),
|
||||||
@ -160,7 +160,7 @@ Foam::vtkPV398blockMesh::vtkPV398blockMesh
|
|||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "Foam::vtkPV398blockMesh::vtkPV398blockMesh - "
|
Info<< "Foam::vtkPV4blockMesh::vtkPV4blockMesh - "
|
||||||
<< FileName << endl;
|
<< FileName << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -243,11 +243,11 @@ Foam::vtkPV398blockMesh::vtkPV398blockMesh
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::vtkPV398blockMesh::~vtkPV398blockMesh()
|
Foam::vtkPV4blockMesh::~vtkPV4blockMesh()
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398blockMesh::~vtkPV398blockMesh" << endl;
|
Info<< "<end> Foam::vtkPV4blockMesh::~vtkPV4blockMesh" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hmm. pointNumberTextActors are not getting removed
|
// Hmm. pointNumberTextActors are not getting removed
|
||||||
@ -264,11 +264,11 @@ Foam::vtkPV398blockMesh::~vtkPV398blockMesh()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::vtkPV398blockMesh::updateInfo()
|
void Foam::vtkPV4blockMesh::updateInfo()
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398blockMesh::updateInfo"
|
Info<< "<beg> Foam::vtkPV4blockMesh::updateInfo"
|
||||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "] " << endl;
|
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "] " << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,16 +314,16 @@ void Foam::vtkPV398blockMesh::updateInfo()
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398blockMesh::updateInfo" << endl;
|
Info<< "<end> Foam::vtkPV4blockMesh::updateInfo" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398blockMesh::updateFoamMesh()
|
void Foam::vtkPV4blockMesh::updateFoamMesh()
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398blockMesh::updateFoamMesh" << endl;
|
Info<< "<beg> Foam::vtkPV4blockMesh::updateFoamMesh" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check to see if the OpenFOAM mesh has been created
|
// Check to see if the OpenFOAM mesh has been created
|
||||||
@ -355,12 +355,12 @@ void Foam::vtkPV398blockMesh::updateFoamMesh()
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398blockMesh::updateFoamMesh" << endl;
|
Info<< "<end> Foam::vtkPV4blockMesh::updateFoamMesh" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398blockMesh::Update
|
void Foam::vtkPV4blockMesh::Update
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output
|
vtkMultiBlockDataSet* output
|
||||||
)
|
)
|
||||||
@ -391,13 +391,13 @@ void Foam::vtkPV398blockMesh::Update
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398blockMesh::CleanUp()
|
void Foam::vtkPV4blockMesh::CleanUp()
|
||||||
{
|
{
|
||||||
reader_->UpdateProgress(1.0);
|
reader_->UpdateProgress(1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398blockMesh::renderPointNumbers
|
void Foam::vtkPV4blockMesh::renderPointNumbers
|
||||||
(
|
(
|
||||||
vtkRenderer* renderer,
|
vtkRenderer* renderer,
|
||||||
const bool show
|
const bool show
|
||||||
@ -456,7 +456,7 @@ void Foam::vtkPV398blockMesh::renderPointNumbers
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398blockMesh::PrintSelf(ostream& os, vtkIndent indent) const
|
void Foam::vtkPV4blockMesh::PrintSelf(ostream& os, vtkIndent indent) const
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
os << indent << "Number of nodes: "
|
os << indent << "Number of nodes: "
|
||||||
@ -22,24 +22,24 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::vtkPV398blockMesh
|
Foam::vtkPV4blockMesh
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Provides a reader interface for OpenFOAM blockMesh to VTK interaction
|
Provides a reader interface for OpenFOAM blockMesh to VTK interaction
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
vtkPV398blockMesh.C
|
vtkPV4blockMesh.C
|
||||||
vtkPV398blockMeshConvert.C
|
vtkPV4blockMeshConvert.C
|
||||||
vtkPV398blockMeshUpdate.C
|
vtkPV4blockMeshUpdate.C
|
||||||
vtkPV398blockMeshUtils.C
|
vtkPV4blockMeshUtils.C
|
||||||
|
|
||||||
// Needed by VTK:
|
// Needed by VTK:
|
||||||
vtkDataArrayTemplateImplicit.txx
|
vtkDataArrayTemplateImplicit.txx
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef vtkPV398blockMesh_H
|
#ifndef vtkPV4blockMesh_H
|
||||||
#define vtkPV398blockMesh_H
|
#define vtkPV4blockMesh_H
|
||||||
|
|
||||||
// do not include legacy strstream headers
|
// do not include legacy strstream headers
|
||||||
#ifndef VTK_EXCLUDE_STRSTREAM_HEADERS
|
#ifndef VTK_EXCLUDE_STRSTREAM_HEADERS
|
||||||
@ -58,7 +58,7 @@ SourceFiles
|
|||||||
class vtkDataArraySelection;
|
class vtkDataArraySelection;
|
||||||
class vtkDataSet;
|
class vtkDataSet;
|
||||||
class vtkPoints;
|
class vtkPoints;
|
||||||
class vtkPV398blockMeshReader;
|
class vtkPV4blockMeshReader;
|
||||||
class vtkRenderer;
|
class vtkRenderer;
|
||||||
class vtkTextActor;
|
class vtkTextActor;
|
||||||
class vtkMultiBlockDataSet;
|
class vtkMultiBlockDataSet;
|
||||||
@ -79,10 +79,10 @@ class blockMesh;
|
|||||||
template<class Type> class List;
|
template<class Type> class List;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class vtkPV398blockMesh Declaration
|
Class vtkPV4blockMesh Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class vtkPV398blockMesh
|
class vtkPV4blockMesh
|
||||||
{
|
{
|
||||||
// Private classes
|
// Private classes
|
||||||
|
|
||||||
@ -164,8 +164,8 @@ class vtkPV398blockMesh
|
|||||||
|
|
||||||
// Private Data
|
// Private Data
|
||||||
|
|
||||||
//- Access to the controlling vtkPV398blockMeshReader
|
//- Access to the controlling vtkPV4blockMeshReader
|
||||||
vtkPV398blockMeshReader* reader_;
|
vtkPV4blockMeshReader* reader_;
|
||||||
|
|
||||||
//- OpenFOAM time control
|
//- OpenFOAM time control
|
||||||
autoPtr<Time> dbPtr_;
|
autoPtr<Time> dbPtr_;
|
||||||
@ -294,31 +294,31 @@ class vtkPV398blockMesh
|
|||||||
|
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
vtkPV398blockMesh(const vtkPV398blockMesh&);
|
vtkPV4blockMesh(const vtkPV4blockMesh&);
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const vtkPV398blockMesh&);
|
void operator=(const vtkPV4blockMesh&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Static data members
|
//- Static data members
|
||||||
|
|
||||||
ClassName("vtkPV398blockMesh");
|
ClassName("vtkPV4blockMesh");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
vtkPV398blockMesh
|
vtkPV4blockMesh
|
||||||
(
|
(
|
||||||
const char* const FileName,
|
const char* const FileName,
|
||||||
vtkPV398blockMeshReader* reader
|
vtkPV4blockMeshReader* reader
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
~vtkPV398blockMesh();
|
~vtkPV4blockMesh();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -23,8 +23,8 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "vtkPV398blockMesh.H"
|
#include "vtkPV4blockMesh.H"
|
||||||
#include "vtkPV398blockMeshReader.h"
|
#include "vtkPV4blockMeshReader.h"
|
||||||
|
|
||||||
// OpenFOAM includes
|
// OpenFOAM includes
|
||||||
#include "blockMesh.H"
|
#include "blockMesh.H"
|
||||||
@ -43,7 +43,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::vtkPV398blockMesh::convertMeshBlocks
|
void Foam::vtkPV4blockMesh::convertMeshBlocks
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
int& blockNo
|
int& blockNo
|
||||||
@ -59,7 +59,7 @@ void Foam::vtkPV398blockMesh::convertMeshBlocks
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398blockMesh::convertMeshBlocks" << endl;
|
Info<< "<beg> Foam::vtkPV4blockMesh::convertMeshBlocks" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
int blockI = 0;
|
int blockI = 0;
|
||||||
@ -130,12 +130,12 @@ void Foam::vtkPV398blockMesh::convertMeshBlocks
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398blockMesh::convertMeshBlocks" << endl;
|
Info<< "<end> Foam::vtkPV4blockMesh::convertMeshBlocks" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398blockMesh::convertMeshEdges
|
void Foam::vtkPV4blockMesh::convertMeshEdges
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
int& blockNo
|
int& blockNo
|
||||||
@ -240,13 +240,13 @@ void Foam::vtkPV398blockMesh::convertMeshEdges
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398blockMesh::convertMeshEdges" << endl;
|
Info<< "<end> Foam::vtkPV4blockMesh::convertMeshEdges" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398blockMesh::convertMeshCorners
|
void Foam::vtkPV4blockMesh::convertMeshCorners
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
int& blockNo
|
int& blockNo
|
||||||
@ -261,7 +261,7 @@ void Foam::vtkPV398blockMesh::convertMeshCorners
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398blockMesh::convertMeshCorners" << endl;
|
Info<< "<beg> Foam::vtkPV4blockMesh::convertMeshCorners" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (true) // or some flag or other condition
|
if (true) // or some flag or other condition
|
||||||
@ -311,7 +311,7 @@ void Foam::vtkPV398blockMesh::convertMeshCorners
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398blockMesh::convertMeshCorners" << endl;
|
Info<< "<end> Foam::vtkPV4blockMesh::convertMeshCorners" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -26,8 +26,8 @@ Description
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "vtkPV398blockMesh.H"
|
#include "vtkPV4blockMesh.H"
|
||||||
#include "vtkPV398blockMeshReader.h"
|
#include "vtkPV4blockMeshReader.h"
|
||||||
|
|
||||||
// VTK includes
|
// VTK includes
|
||||||
#include "vtkDataArraySelection.h"
|
#include "vtkDataArraySelection.h"
|
||||||
@ -66,7 +66,7 @@ namespace Foam
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::vtkPV398blockMesh::AddToBlock
|
void Foam::vtkPV4blockMesh::AddToBlock
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
vtkDataSet* dataset,
|
vtkDataSet* dataset,
|
||||||
@ -84,7 +84,7 @@ void Foam::vtkPV398blockMesh::AddToBlock
|
|||||||
{
|
{
|
||||||
if (blockDO)
|
if (blockDO)
|
||||||
{
|
{
|
||||||
FatalErrorIn("Foam::vtkPV398blockMesh::AddToBlock")
|
FatalErrorIn("Foam::vtkPV4blockMesh::AddToBlock")
|
||||||
<< "Block already has a vtkDataSet assigned to it"
|
<< "Block already has a vtkDataSet assigned to it"
|
||||||
<< endl;
|
<< endl;
|
||||||
return;
|
return;
|
||||||
@ -126,7 +126,7 @@ void Foam::vtkPV398blockMesh::AddToBlock
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
vtkDataSet* Foam::vtkPV398blockMesh::GetDataSetFromBlock
|
vtkDataSet* Foam::vtkPV4blockMesh::GetDataSetFromBlock
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
const arrayRange& range,
|
const arrayRange& range,
|
||||||
@ -148,7 +148,7 @@ vtkDataSet* Foam::vtkPV398blockMesh::GetDataSetFromBlock
|
|||||||
|
|
||||||
|
|
||||||
// ununsed at the moment
|
// ununsed at the moment
|
||||||
Foam::label Foam::vtkPV398blockMesh::GetNumberOfDataSets
|
Foam::label Foam::vtkPV4blockMesh::GetNumberOfDataSets
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
const arrayRange& range
|
const arrayRange& range
|
||||||
@ -167,7 +167,7 @@ Foam::label Foam::vtkPV398blockMesh::GetNumberOfDataSets
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::wordHashSet Foam::vtkPV398blockMesh::getSelected
|
Foam::wordHashSet Foam::vtkPV4blockMesh::getSelected
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* select
|
vtkDataArraySelection* select
|
||||||
)
|
)
|
||||||
@ -187,7 +187,7 @@ Foam::wordHashSet Foam::vtkPV398blockMesh::getSelected
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::wordHashSet Foam::vtkPV398blockMesh::getSelected
|
Foam::wordHashSet Foam::vtkPV4blockMesh::getSelected
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* select,
|
vtkDataArraySelection* select,
|
||||||
const arrayRange& range
|
const arrayRange& range
|
||||||
@ -208,7 +208,7 @@ Foam::wordHashSet Foam::vtkPV398blockMesh::getSelected
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::stringList Foam::vtkPV398blockMesh::getSelectedArrayEntries
|
Foam::stringList Foam::vtkPV4blockMesh::getSelectedArrayEntries
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* select
|
vtkDataArraySelection* select
|
||||||
)
|
)
|
||||||
@ -247,7 +247,7 @@ Foam::stringList Foam::vtkPV398blockMesh::getSelectedArrayEntries
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::stringList Foam::vtkPV398blockMesh::getSelectedArrayEntries
|
Foam::stringList Foam::vtkPV4blockMesh::getSelectedArrayEntries
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* select,
|
vtkDataArraySelection* select,
|
||||||
const arrayRange& range
|
const arrayRange& range
|
||||||
@ -286,7 +286,7 @@ Foam::stringList Foam::vtkPV398blockMesh::getSelectedArrayEntries
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398blockMesh::setSelectedArrayEntries
|
void Foam::vtkPV4blockMesh::setSelectedArrayEntries
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* select,
|
vtkDataArraySelection* select,
|
||||||
const stringList& selections
|
const stringList& selections
|
||||||
@ -312,7 +312,7 @@ void Foam::vtkPV398blockMesh::setSelectedArrayEntries
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398blockMesh::updateBoolListStatus
|
void Foam::vtkPV4blockMesh::updateBoolListStatus
|
||||||
(
|
(
|
||||||
boolList& status,
|
boolList& status,
|
||||||
vtkDataArraySelection* selection
|
vtkDataArraySelection* selection
|
||||||
@ -320,7 +320,7 @@ void Foam::vtkPV398blockMesh::updateBoolListStatus
|
|||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV398blockMesh::updateBoolListStatus" << endl;
|
Info<< "<beg> Foam::vtkPV4blockMesh::updateBoolListStatus" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
const label nElem = selection->GetNumberOfArrays();
|
const label nElem = selection->GetNumberOfArrays();
|
||||||
@ -345,7 +345,7 @@ void Foam::vtkPV398blockMesh::updateBoolListStatus
|
|||||||
}
|
}
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV398blockMesh::updateBoolListStatus" << endl;
|
Info<< "<end> Foam::vtkPV4blockMesh::updateBoolListStatus" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
vtkPV4Readers.C
|
||||||
|
|
||||||
|
LIB = $(FOAM_LIBBIN)/libvtkPV4Readers
|
||||||
@ -26,7 +26,7 @@ Description
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "vtkPV398Readers.H"
|
#include "vtkPV4Readers.H"
|
||||||
|
|
||||||
// OpenFOAM includes
|
// OpenFOAM includes
|
||||||
#include "IFstream.H"
|
#include "IFstream.H"
|
||||||
@ -41,7 +41,7 @@ Description
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(vtkPV398Readers, 0);
|
defineTypeNameAndDebug(vtkPV4Readers, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ namespace Foam
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::vtkPV398Readers::AddToBlock
|
void Foam::vtkPV4Readers::AddToBlock
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
vtkDataSet* dataset,
|
vtkDataSet* dataset,
|
||||||
@ -93,7 +93,7 @@ void Foam::vtkPV398Readers::AddToBlock
|
|||||||
{
|
{
|
||||||
if (blockDO)
|
if (blockDO)
|
||||||
{
|
{
|
||||||
FatalErrorIn("Foam::vtkPV398Readers::AddToBlock")
|
FatalErrorIn("Foam::vtkPV4Readers::AddToBlock")
|
||||||
<< "Block already has a vtkDataSet assigned to it"
|
<< "Block already has a vtkDataSet assigned to it"
|
||||||
<< endl;
|
<< endl;
|
||||||
return;
|
return;
|
||||||
@ -135,7 +135,7 @@ void Foam::vtkPV398Readers::AddToBlock
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
vtkDataSet* Foam::vtkPV398Readers::GetDataSetFromBlock
|
vtkDataSet* Foam::vtkPV4Readers::GetDataSetFromBlock
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
const partInfo& selector,
|
const partInfo& selector,
|
||||||
@ -157,7 +157,7 @@ vtkDataSet* Foam::vtkPV398Readers::GetDataSetFromBlock
|
|||||||
|
|
||||||
|
|
||||||
// ununsed at the moment
|
// ununsed at the moment
|
||||||
Foam::label Foam::vtkPV398Readers::GetNumberOfDataSets
|
Foam::label Foam::vtkPV4Readers::GetNumberOfDataSets
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet* output,
|
vtkMultiBlockDataSet* output,
|
||||||
const partInfo& selector
|
const partInfo& selector
|
||||||
@ -176,13 +176,13 @@ Foam::label Foam::vtkPV398Readers::GetNumberOfDataSets
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Foam::word Foam::vtkPV398Readers::getPartName(int partId)
|
// Foam::word Foam::vtkPV4Readers::getPartName(int partId)
|
||||||
// {
|
// {
|
||||||
// return getFirstWord(reader_->GetPartArrayName(partId));
|
// return getFirstWord(reader_->GetPartArrayName(partId));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
Foam::wordHashSet Foam::vtkPV398Readers::getSelected
|
Foam::wordHashSet Foam::vtkPV4Readers::getSelected
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* select
|
vtkDataArraySelection* select
|
||||||
)
|
)
|
||||||
@ -202,7 +202,7 @@ Foam::wordHashSet Foam::vtkPV398Readers::getSelected
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::wordHashSet Foam::vtkPV398Readers::getSelected
|
Foam::wordHashSet Foam::vtkPV4Readers::getSelected
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* select,
|
vtkDataArraySelection* select,
|
||||||
const partInfo& selector
|
const partInfo& selector
|
||||||
@ -223,7 +223,7 @@ Foam::wordHashSet Foam::vtkPV398Readers::getSelected
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::stringList Foam::vtkPV398Readers::getSelectedArrayEntries
|
Foam::stringList Foam::vtkPV4Readers::getSelectedArrayEntries
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* select
|
vtkDataArraySelection* select
|
||||||
)
|
)
|
||||||
@ -262,7 +262,7 @@ Foam::stringList Foam::vtkPV398Readers::getSelectedArrayEntries
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::stringList Foam::vtkPV398Readers::getSelectedArrayEntries
|
Foam::stringList Foam::vtkPV4Readers::getSelectedArrayEntries
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* select,
|
vtkDataArraySelection* select,
|
||||||
const partInfo& selector
|
const partInfo& selector
|
||||||
@ -301,7 +301,7 @@ Foam::stringList Foam::vtkPV398Readers::getSelectedArrayEntries
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV398Readers::setSelectedArrayEntries
|
void Foam::vtkPV4Readers::setSelectedArrayEntries
|
||||||
(
|
(
|
||||||
vtkDataArraySelection* select,
|
vtkDataArraySelection* select,
|
||||||
const stringList& selections
|
const stringList& selections
|
||||||
@ -22,19 +22,19 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Namespace
|
Namespace
|
||||||
Foam::vtkPV398Readers
|
Foam::vtkPV4Readers
|
||||||
|
|
||||||
Description
|
Description
|
||||||
A collection of helper functions when building a reader interface in
|
A collection of helper functions when building a reader interface in
|
||||||
ParaView3.
|
ParaView3.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
vtkPV398Readers.C
|
vtkPV4Readers.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef vtkPV398Readers_H
|
#ifndef vtkPV4Readers_H
|
||||||
#define vtkPV398Readers_H
|
#define vtkPV4Readers_H
|
||||||
|
|
||||||
// do not include legacy strstream headers
|
// do not include legacy strstream headers
|
||||||
#ifndef VTK_EXCLUDE_STRSTREAM_HEADERS
|
#ifndef VTK_EXCLUDE_STRSTREAM_HEADERS
|
||||||
@ -53,7 +53,7 @@ SourceFiles
|
|||||||
class vtkDataArraySelection;
|
class vtkDataArraySelection;
|
||||||
class vtkDataSet;
|
class vtkDataSet;
|
||||||
class vtkPoints;
|
class vtkPoints;
|
||||||
class vtkPV398FoamReader;
|
class vtkPV4FoamReader;
|
||||||
class vtkRenderer;
|
class vtkRenderer;
|
||||||
class vtkTextActor;
|
class vtkTextActor;
|
||||||
class vtkMultiBlockDataSet;
|
class vtkMultiBlockDataSet;
|
||||||
@ -66,10 +66,10 @@ class vtkIndent;
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
namespace vtkPV398Readers
|
namespace vtkPV4Readers
|
||||||
{
|
{
|
||||||
//- Declare name of the class and its debug switch
|
//- Declare name of the class and its debug switch
|
||||||
NamespaceName("vtkPV398Readers");
|
NamespaceName("vtkPV4Readers");
|
||||||
|
|
||||||
//- Bookkeeping for GUI checklists and the multi-block organization
|
//- Bookkeeping for GUI checklists and the multi-block organization
|
||||||
class partInfo
|
class partInfo
|
||||||
@ -217,7 +217,7 @@ namespace vtkPV398Readers
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace vtkPV398
|
} // End namespace vtkPV4
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
@ -60,12 +60,18 @@ Description
|
|||||||
nw | Number of sampling windows | no | 100
|
nw | Number of sampling windows | no | 100
|
||||||
fl | Lower frequency band | no | 25
|
fl | Lower frequency band | no | 25
|
||||||
fU | Upper frequency band | no | 10000
|
fU | Upper frequency band | no | 10000
|
||||||
graphFormat | Output grapch format | no | raw
|
graphFormat | Output graph format | no | raw
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
|
Current graph outputs include:
|
||||||
|
- FFT of the pressure data
|
||||||
|
- narrow-band PFL (pressure-fluctuation level) spectrum
|
||||||
|
- one-third-octave-band PFL spectrum
|
||||||
|
- one-third-octave-band pressure spectrum
|
||||||
|
|
||||||
SeeAlso
|
SeeAlso
|
||||||
CSV.H
|
CSV.H
|
||||||
|
noiseFFT.H
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|||||||
271
bin/paraFoam4
Executable file
271
bin/paraFoam4
Executable file
@ -0,0 +1,271 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
|
# \\/ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# paraFoam
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# start paraview with the OpenFOAM libraries
|
||||||
|
#
|
||||||
|
# Note
|
||||||
|
# combining -block or -builtin options with the -region option yields
|
||||||
|
# undefined behaviour
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
usage() {
|
||||||
|
exec 1>&2
|
||||||
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
Usage: ${0##*/} [OPTION] [PARAVIEW_OPTION]
|
||||||
|
options:
|
||||||
|
-block use blockMesh reader (uses .blockMesh extension)
|
||||||
|
-builtin use VTK builtin OpenFOAM reader (uses .foam extension)
|
||||||
|
-case <dir> specify alternative case directory, default is the cwd
|
||||||
|
-region <name> specify alternative mesh region
|
||||||
|
-touch only create the file (eg, .blockMesh, .OpenFOAM, etc)
|
||||||
|
-touchAll create .blockMesh, .OpenFOAM files (and for all regions)
|
||||||
|
-help print the usage
|
||||||
|
|
||||||
|
|
||||||
|
paraview options start with a double dashes
|
||||||
|
|
||||||
|
* start paraview $ParaView_VERSION with the OpenFOAM libraries
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# We want to do nice exit when running paraview to give paraview opportunity
|
||||||
|
# to clean up
|
||||||
|
unset FOAM_ABORT
|
||||||
|
|
||||||
|
unset regionName optTouch
|
||||||
|
|
||||||
|
# Hack: change all locale to 'C' i.e. using '.' for decimal point. This is
|
||||||
|
# only needed temporarily until paraview is locale aware. (git version is
|
||||||
|
# already 2010-07)
|
||||||
|
export LC_ALL=C
|
||||||
|
|
||||||
|
# reader extension
|
||||||
|
extension=OpenFOAM
|
||||||
|
|
||||||
|
requirePV=1
|
||||||
|
|
||||||
|
# parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
-h | -help)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
-block | -blockMesh)
|
||||||
|
extension=blockMesh
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-builtin)
|
||||||
|
extension=foam
|
||||||
|
requirePV=0
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-case)
|
||||||
|
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||||
|
cd "$2" 2>/dev/null || usage "directory does not exist: '$2'"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
-region)
|
||||||
|
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||||
|
regionName=$2
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
-touch)
|
||||||
|
optTouch=true
|
||||||
|
requirePV=0
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-touchAll)
|
||||||
|
optTouch=all
|
||||||
|
requirePV=0
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--)
|
||||||
|
shift
|
||||||
|
break # stop here, treat balance as paraview options
|
||||||
|
;;
|
||||||
|
--*)
|
||||||
|
break # stop here, treat this and balance as paraview options
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
usage "unknown option/argument: '$*'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# check that reader module has been built
|
||||||
|
#
|
||||||
|
if [ $requirePV -eq 1 -a ! -f $PV_PLUGIN_PATH/libPV4FoamReader_SM.so ]
|
||||||
|
then
|
||||||
|
cat<< BUILDREADER
|
||||||
|
|
||||||
|
FATAL ERROR: ParaView reader module libraries do not exist
|
||||||
|
|
||||||
|
Please build the reader module before continuing:
|
||||||
|
cd \$FOAM_UTILITIES/postProcessing/graphics/PV4Readers
|
||||||
|
./Allwclean
|
||||||
|
./Allwmake
|
||||||
|
|
||||||
|
BUILDREADER
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# check for --data=... argument
|
||||||
|
#
|
||||||
|
hasDataArg()
|
||||||
|
{
|
||||||
|
hasData=false
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
(--data=*)
|
||||||
|
hasData=true
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
hasDataArg $@
|
||||||
|
|
||||||
|
|
||||||
|
# get a sensible caseName from the directory name
|
||||||
|
caseName=${PWD##*/}
|
||||||
|
caseFile="$caseName.$extension"
|
||||||
|
fvControls="system"
|
||||||
|
|
||||||
|
if [ -n "$regionName" ]
|
||||||
|
then
|
||||||
|
if [ ! -d constant/$regionName ]
|
||||||
|
then
|
||||||
|
echo "FATAL ERROR: Region $regionName does not exist"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
caseFile="$caseName{$regionName}.$extension"
|
||||||
|
fvControls="$fvControls/$regionName"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "${optTouch:-false}" in
|
||||||
|
all)
|
||||||
|
extension=OpenFOAM
|
||||||
|
if [ -f constant/polyMesh/blockMeshDict ]
|
||||||
|
then
|
||||||
|
touch "$caseName.blockMesh"
|
||||||
|
echo "created '$caseName.blockMesh'"
|
||||||
|
fi
|
||||||
|
touch "$caseName.$extension"
|
||||||
|
echo "created '$caseName.$extension'"
|
||||||
|
# discover probable regions
|
||||||
|
for region in constant/*
|
||||||
|
do
|
||||||
|
if [ -d $region -a -d $region/polyMesh ]
|
||||||
|
then
|
||||||
|
regionName=${region##*/}
|
||||||
|
touch "$caseName{$regionName}.$extension"
|
||||||
|
echo "created '$caseName{$regionName}.$extension'"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
true)
|
||||||
|
touch "$caseFile"
|
||||||
|
echo "created '$caseFile'"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
# parent directory for normal or parallel results
|
||||||
|
case "$caseName" in
|
||||||
|
processor*) parentDir=".." ;;
|
||||||
|
*) parentDir="." ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
if [ "${hasData:-false}" = true ]
|
||||||
|
then
|
||||||
|
|
||||||
|
# has --data=.., send directly to paraview
|
||||||
|
exec paraview "$@"
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
# check existence of essential files
|
||||||
|
warn="WARN file does not exist:"
|
||||||
|
case $extension in
|
||||||
|
blockMesh)
|
||||||
|
for check in \
|
||||||
|
system/controlDict \
|
||||||
|
constant/polyMesh/blockMeshDict \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
[ -s "$parentDir/$check" ] || {
|
||||||
|
[ -n "$warn" ] && echo "$warn" 1>&2
|
||||||
|
echo " $parentDir/$check" 1>&2
|
||||||
|
unset warn
|
||||||
|
}
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
|
||||||
|
builtin | OpenFOAM)
|
||||||
|
for check in \
|
||||||
|
system/controlDict \
|
||||||
|
$fvControls/fvSchemes \
|
||||||
|
$fvControls/fvSolution \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
[ -s "$parentDir/$check" ] || {
|
||||||
|
[ -n "$warn" ] && echo "$warn" 1>&2
|
||||||
|
echo " $parentDir/$check" 1>&2
|
||||||
|
unset warn
|
||||||
|
}
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# only create/remove caseFile if it didn't already exist
|
||||||
|
[ -e $caseFile ] || {
|
||||||
|
trap "rm -f $caseFile 2>/dev/null; exit 0" EXIT TERM INT
|
||||||
|
touch "$caseFile"
|
||||||
|
echo "created temporary '$caseFile'"
|
||||||
|
}
|
||||||
|
|
||||||
|
# For now filter out any ld.so errors. Caused by non-system compiler?
|
||||||
|
paraview --data="$caseFile" "$@" 2>&1 | fgrep -v 'Inconsistency detected by ld.so'
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
@ -41,6 +41,8 @@ usage: ${0##*/}
|
|||||||
--archOption arch specify architecture option (only 32 or 64 applicable)
|
--archOption arch specify architecture option (only 32 or 64 applicable)
|
||||||
--paraviewInstall dir specify ParaView_DIR (e.g. /opt/paraviewopenfoam3120)
|
--paraviewInstall dir specify ParaView_DIR (e.g. /opt/paraviewopenfoam3120)
|
||||||
--paraviewVersion ver specify ParaView_VERSION (e.g. 3.12.0)
|
--paraviewVersion ver specify ParaView_VERSION (e.g. 3.12.0)
|
||||||
|
--scotchArchPath dir specify SCOTCH_ARCH_PATH (e.g. /opt/OpenFOAM-scotch-6.0.0/)
|
||||||
|
--scotchVersion ver specify SCOTCH_VERSION (e.g. 6.0.0)
|
||||||
|
|
||||||
* hardcode paths to installation
|
* hardcode paths to installation
|
||||||
|
|
||||||
@ -49,32 +51,6 @@ USAGE
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Function to do replacement on file. Checks if any replacement has been done.
|
|
||||||
# inlineSed <file> <sedCommand> <description>
|
|
||||||
#_inlineSed()
|
|
||||||
#{
|
|
||||||
# [ -f "$1" ] || {
|
|
||||||
# echo "Missing file: $1"
|
|
||||||
# exit 1
|
|
||||||
# }
|
|
||||||
#
|
|
||||||
# backup="temp.$$"
|
|
||||||
# cp $1 $backup
|
|
||||||
# sed -i -e "$2" $1
|
|
||||||
#
|
|
||||||
# if cmp $1 $backup > /dev/null 2>&1
|
|
||||||
# then
|
|
||||||
# echo "Failed: $3 in $1"
|
|
||||||
# rm $backup 2>/dev/null
|
|
||||||
# exit 1
|
|
||||||
# else
|
|
||||||
# echo "Okay: $3 in $1"
|
|
||||||
# rm $backup 2>/dev/null
|
|
||||||
# fi
|
|
||||||
#
|
|
||||||
# return 0
|
|
||||||
#}
|
|
||||||
|
|
||||||
# Function to do replacement on file. Checks if any replacement has been done.
|
# Function to do replacement on file. Checks if any replacement has been done.
|
||||||
# _inlineSed <file> <regexp> <replacement> <msg>
|
# _inlineSed <file> <regexp> <replacement> <msg>
|
||||||
_inlineSed()
|
_inlineSed()
|
||||||
@ -103,7 +79,8 @@ _inlineSed()
|
|||||||
|
|
||||||
[ -f etc/bashrc ] || usage "Please run from top-level directory of installation"
|
[ -f etc/bashrc ] || usage "Please run from top-level directory of installation"
|
||||||
|
|
||||||
unset foamInstall projectName projectVersion archOption paraviewInstall
|
unset foamInstall projectName projectVersion archOption
|
||||||
|
unset paraviewInstall scotchArchPath
|
||||||
|
|
||||||
# parse options
|
# parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
@ -172,7 +149,7 @@ do
|
|||||||
etc/config/paraview.sh \
|
etc/config/paraview.sh \
|
||||||
'ParaView_DIR=.*' \
|
'ParaView_DIR=.*' \
|
||||||
'ParaView_DIR='"$paraviewInstall" \
|
'ParaView_DIR='"$paraviewInstall" \
|
||||||
"Replacing ParaView_DIR setting by '$paraviewInstall'"
|
"Replacing ParaView_DIR setting by '$paraviewInstall'"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-paraviewVersion | --paraviewVersion)
|
-paraviewVersion | --paraviewVersion)
|
||||||
@ -186,13 +163,36 @@ do
|
|||||||
"Replacing ParaView_VERSION setting by '$paraviewVersion'"
|
"Replacing ParaView_VERSION setting by '$paraviewVersion'"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
|
-scotchVersion | --scotchVersion)
|
||||||
|
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||||
|
scotchVersion="$2"
|
||||||
|
_inlineSed \
|
||||||
|
etc/config/scotch.sh \
|
||||||
|
'SCOTCH_VERSION=.*' \
|
||||||
|
'SCOTCH_VERSION='"$scotchVersion" \
|
||||||
|
"Replacing SCOTCH_VERSION setting by '$scotchVersion'"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
-scotchArchPath | --scotchArchPath)
|
||||||
|
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||||
|
scotchArchPath="$2"
|
||||||
|
_inlineSed \
|
||||||
|
etc/config/scotch.sh \
|
||||||
|
'SCOTCH_ARCH_PATH=.*' \
|
||||||
|
'SCOTCH_ARCH_PATH='"$scotchArchPath" \
|
||||||
|
"Replacing SCOTCH_ARCH_PATH setting by '$scotchArchPath'"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
usage "unknown option/argument: '$*'"
|
usage "unknown option/argument: '$*'"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -n "$foamInstall" -o -n "$projectName" -o -n "$projectVersion" -o -n "$archOption" -o -n "$paraviewInstall" -o -n "$paraviewVersion" ] || usage "Please specify at least one configure option"
|
[ -n "$foamInstall" -o -n "$projectName" -o -n "$projectVersion" -o -n "$archOption" \
|
||||||
|
-o -n "$paraviewInstall" -o -n "$paraviewVersion" \
|
||||||
|
-o -n "$scotchVersion" -o -n "$scotchArchPath" \
|
||||||
|
] || usage "Please specify at least one configure option"
|
||||||
|
|
||||||
#echo "Replacing WM_PROJECT setting by '$projectName'"
|
#echo "Replacing WM_PROJECT setting by '$projectName'"
|
||||||
#sed -i -e 's@WM_PROJECT=.*@WM_PROJECT='"$projectName@" etc/bashrc
|
#sed -i -e 's@WM_PROJECT=.*@WM_PROJECT='"$projectName@" etc/bashrc
|
||||||
|
|||||||
@ -107,9 +107,11 @@ motionControl
|
|||||||
|
|
||||||
polyMeshFiltering
|
polyMeshFiltering
|
||||||
{
|
{
|
||||||
filterEdges on;
|
filterEdges on;
|
||||||
filterFaces off;
|
filterFaces off;
|
||||||
writeTetDualMesh false;
|
writeTetDualMesh true;
|
||||||
|
writeCellShapeControlMesh true;
|
||||||
|
writeBackgroundMeshDecomposition true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -51,8 +51,7 @@ done
|
|||||||
|
|
||||||
|
|
||||||
#- ParaView version, automatically determine major version
|
#- ParaView version, automatically determine major version
|
||||||
#export ParaView_VERSION=3.12.0
|
export ParaView_VERSION=4.0.1
|
||||||
export ParaView_VERSION=3.98.1
|
|
||||||
export ParaView_MAJOR=detect
|
export ParaView_MAJOR=detect
|
||||||
|
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ wmakeLnInclude OpenFOAM
|
|||||||
wmakeLnInclude OSspecific/${WM_OSTYPE:-POSIX}
|
wmakeLnInclude OSspecific/${WM_OSTYPE:-POSIX}
|
||||||
Pstream/Allwmake $*
|
Pstream/Allwmake $*
|
||||||
|
|
||||||
OSspecific/${WM_OSTYPE:-POSIX}/Allwmake
|
OSspecific/${WM_OSTYPE:-POSIX}/Allwmake $*
|
||||||
wmake $makeType OpenFOAM
|
wmake $makeType OpenFOAM
|
||||||
|
|
||||||
wmake $makeType fileFormats
|
wmake $makeType fileFormats
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
makeType=${1:-libo}
|
||||||
|
|
||||||
unset COMP_FLAGS LINK_FLAGS
|
unset COMP_FLAGS LINK_FLAGS
|
||||||
|
|
||||||
@ -19,6 +20,6 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# make (non-shared) object
|
# make (non-shared) object
|
||||||
wmake libo
|
wmake $makeType
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -79,6 +79,9 @@ public:
|
|||||||
class const_iterator;
|
class const_iterator;
|
||||||
friend class const_iterator;
|
friend class const_iterator;
|
||||||
|
|
||||||
|
class const_reverse_iterator;
|
||||||
|
friend class const_reverse_iterator;
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
@ -254,6 +257,48 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// STL const_reverse_iterator
|
||||||
|
|
||||||
|
typedef typename LListBase::const_reverse_iterator
|
||||||
|
LListBase_const_reverse_iterator;
|
||||||
|
|
||||||
|
//- An STL-conforming const_reverse_iterator
|
||||||
|
class const_reverse_iterator
|
||||||
|
:
|
||||||
|
public LListBase_const_reverse_iterator
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Construct from base const_reverse_iterator
|
||||||
|
const_reverse_iterator(LListBase_const_reverse_iterator baseIter)
|
||||||
|
:
|
||||||
|
LListBase_const_reverse_iterator(baseIter)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Member operators
|
||||||
|
|
||||||
|
const T& operator*()
|
||||||
|
{
|
||||||
|
return
|
||||||
|
static_cast<const T&>
|
||||||
|
(LListBase_const_reverse_iterator::operator*());
|
||||||
|
}
|
||||||
|
|
||||||
|
const T& operator()()
|
||||||
|
{
|
||||||
|
return operator*();
|
||||||
|
}
|
||||||
|
|
||||||
|
const_reverse_iterator& operator++()
|
||||||
|
{
|
||||||
|
LListBase_const_reverse_iterator::operator++();
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// STL member operators
|
// STL member operators
|
||||||
|
|
||||||
//- Equality operation on ULists of the same type.
|
//- Equality operation on ULists of the same type.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -42,6 +42,12 @@ Foam::DLListBase::const_iterator Foam::DLListBase::endConstIter_
|
|||||||
reinterpret_cast<const link*>(0)
|
reinterpret_cast<const link*>(0)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Foam::DLListBase::const_reverse_iterator Foam::DLListBase::endConstRevIter_
|
||||||
|
(
|
||||||
|
static_cast<const DLListBase&>(DLListBase()),
|
||||||
|
reinterpret_cast<const link*>(0)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user