From 91c5607c9712b9eb0a1b49f00b9a26460e89fa36 Mon Sep 17 00:00:00 2001 From: henry Date: Mon, 9 Jun 2008 13:37:13 +0100 Subject: [PATCH] Mark's correction to the building of libccmio.so --- .../mesh/conversion/Optional/AllwmakeOptional | 13 +- .../dataConversion/foamToEnsight/Make/files | 6 - .../dataConversion/foamToEnsight/Make/options | 8 - .../dataConversion/foamToEnsight/cellSets.H | 102 -- .../dataConversion/foamToEnsight/checkData.H | 18 - .../foamToEnsight/checkMeshMoving.H | 20 - .../foamToEnsight/checkSprayData.H | 13 - .../foamToEnsight/ensightCaseHeader.H | 5 - .../foamToEnsight/ensightCaseTail.H | 33 - .../foamToEnsight/ensightField.C | 537 ---------- .../foamToEnsight/ensightField.H | 79 -- .../foamToEnsight/ensightMesh.C | 932 ------------------ .../foamToEnsight/ensightMesh.H | 213 ---- .../foamToEnsight/ensightParticlePositions.C | 93 -- .../foamToEnsight/ensightParticlePositions.H | 54 - .../foamToEnsight/ensightSprayField.C | 117 --- .../foamToEnsight/ensightSprayField.H | 64 -- .../dataConversion/foamToEnsight/faceSets.H | 88 -- .../foamToEnsight/foamToEnsight.C | 388 -------- .../dataConversion/foamToEnsight/itoa.C | 64 -- .../dataConversion/foamToEnsight/itoa.H | 45 - .../dataConversion/foamToEnsight/moveMesh.H | 28 - 22 files changed, 10 insertions(+), 2910 deletions(-) delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/Make/files delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/Make/options delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/cellSets.H delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/checkData.H delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/checkMeshMoving.H delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/checkSprayData.H delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightCaseHeader.H delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightCaseTail.H delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.H delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.H delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightParticlePositions.C delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightParticlePositions.H delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightSprayField.C delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightSprayField.H delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/faceSets.H delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/itoa.C delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/itoa.H delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToEnsight/moveMesh.H diff --git a/applications/utilities/mesh/conversion/Optional/AllwmakeOptional b/applications/utilities/mesh/conversion/Optional/AllwmakeOptional index 7bc282cf42..c5536397a1 100755 --- a/applications/utilities/mesh/conversion/Optional/AllwmakeOptional +++ b/applications/utilities/mesh/conversion/Optional/AllwmakeOptional @@ -2,11 +2,18 @@ # Build optional components (eg, may depend on third-party libraries) set -x -# if the library exists, assume there are headers too +# build libccmio if required +if [ ! -e $FOAM_LIBBIN/libccmio.so ] +then +( + cd $WM_PROJECT_DIR/../ThirdParty && ./AllwmakeLibccmio +) +fi + +# if the library built okay, the headers must exist too if [ -e $FOAM_LIBBIN/libccmio.so ] then - ( cd $WM_PROJECT_DIR/../ThirdParty && ./AllwmakeLibccmio ) \ - && wmake ccm26ToFoam + wmake ccm26ToFoam fi # end diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/Make/files b/applications/utilities/postProcessing/dataConversion/foamToEnsight/Make/files deleted file mode 100644 index 44c513a079..0000000000 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/Make/files +++ /dev/null @@ -1,6 +0,0 @@ -itoa.C -ensightMesh.C -ensightParticlePositions.C -foamToEnsight.C - -EXE = $(FOAM_APPBIN)/foamToEnsight diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/Make/options b/applications/utilities/postProcessing/dataConversion/foamToEnsight/Make/options deleted file mode 100644 index db2e26ca8b..0000000000 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/Make/options +++ /dev/null @@ -1,8 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/lagrangian/basic/lnInclude - -EXE_LIBS = \ - -lfiniteVolume \ - -llagrangian \ - diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/cellSets.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/cellSets.H deleted file mode 100644 index 72859dff2b..0000000000 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/cellSets.H +++ /dev/null @@ -1,102 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::cellSets - -Description - -\*---------------------------------------------------------------------------*/ - -#ifndef cellSets_H -#define cellSets_H - -#include "labelList.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class cellSets Declaration -\*---------------------------------------------------------------------------*/ - -class cellSets -{ - // Private Member Functions - - //- Disallow default bitwise copy construct - cellSets(const cellSets&); - - //- Disallow default bitwise assignment - void operator=(const cellSets&); - - -public: - - label nHexesWedges; - label nPrisms; - label nPyrs; - label nTets; - label nPolys; - - labelList tets; - labelList pyrs; - labelList prisms; - labelList wedges; - labelList hexes; - labelList polys; - - - // Constructors - - //- Construct given the number ov cells - cellSets(const label nCells) - : - nHexesWedges(0), - nPrisms(0), - nPyrs(0), - nTets(0), - nPolys(0), - - tets(nCells), - pyrs(nCells), - prisms(nCells), - wedges(nCells), - hexes(nCells), - polys(nCells) - {} -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkData.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkData.H deleted file mode 100644 index 59be3c5dc9..0000000000 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkData.H +++ /dev/null @@ -1,18 +0,0 @@ -for (int n1=startTime; n1 2 && fieldName(fieldName.size() - 2, 2) == "_0") - { - variableGood = false; - break; - } - - IOobject fieldObjectHeader - ( - fieldName, - Times[n1].name(), - mesh, - IOobject::NO_READ - ); - - variableGood = variableGood && fieldObjectHeader.headerOk(); -} diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkMeshMoving.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkMeshMoving.H deleted file mode 100644 index 37299fc2f3..0000000000 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkMeshMoving.H +++ /dev/null @@ -1,20 +0,0 @@ -bool meshMoving = true; -if (Times.size() > 2) -{ - for(label n2=2; n2 -scalarField map -( - const Field& vf, - const labelList& map, - const label cmpt -) -{ - scalarField mf(map.size()); - - forAll(map, i) - { - mf[i] = component(vf[map[i]], cmpt); - } - - return mf; -} - - -template -scalarField map -( - const Field& vf, - const labelList& map1, - const labelList& map2, - const label cmpt -) -{ - scalarField mf(map1.size() + map2.size()); - - forAll(map1, i) - { - mf[i] = component(vf[map1[i]], cmpt); - } - - label offset = map1.size(); - - forAll(map2, i) - { - mf[i + offset] = component(vf[map2[i]], cmpt); - } - - return mf; -} - - -template -void writeAllData -( - const char* key, - const Field& vf, - const labelList& prims, - const label nPrims, - OFstream& ensightFile -) -{ - if (nPrims) - { - if (Pstream::master()) - { - ensightFile << key << nl; - - for (direction cmpt=0; cmpt::nComponents; cmpt++) - { - writeData(map(vf, prims, cmpt), ensightFile); - - for (int slave=1; slave::nComponents; cmpt++) - { - OPstream toMaster(Pstream::scheduled, Pstream::masterNo()); - toMaster<< map(vf, prims, cmpt); - } - } - } -} - - -template -void writeAllFaceData -( - const char* key, - const labelList& prims, - const label nPrims, - const Field& pf, - const labelList& patchProcessors, - OFstream& ensightFile -) -{ - if (nPrims) - { - if (Pstream::master()) - { - ensightFile << key << nl; - - for (direction cmpt=0; cmpt::nComponents; cmpt++) - { - writeData(map(pf, prims, cmpt), ensightFile); - - forAll (patchProcessors, i) - { - if (patchProcessors[i] != 0) - { - label slave = patchProcessors[i]; - IPstream fromSlave(Pstream::scheduled, slave); - scalarField pf(fromSlave); - - writeData(pf, ensightFile); - } - } - } - } - else - { - for (direction cmpt=0; cmpt::nComponents; cmpt++) - { - OPstream toMaster(Pstream::scheduled, Pstream::masterNo()); - toMaster<< map(pf, prims, cmpt); - } - } - } -} - - -template -bool writePatchField -( - const Foam::Field& pf, - const Foam::label patchi, - const Foam::label ensightPatchi, - const Foam::faceSets& boundaryFaceSet, - const Foam::ensightMesh::nFacePrims& nfp, - const Foam::labelList& patchProcessors, - Foam::OFstream& ensightFile -) -{ - if (nfp.nTris || nfp.nQuads || nfp.nPolys) - { - if (Pstream::master()) - { - ensightFile - << "part" << nl - << setw(10) << ensightPatchi << nl; - } - - writeAllFaceData - ( - "tria3", - boundaryFaceSet.tris, - nfp.nTris, - pf, - patchProcessors, - ensightFile - ); - - writeAllFaceData - ( - "quad4", - boundaryFaceSet.quads, - nfp.nQuads, - pf, - patchProcessors, - ensightFile - ); - - writeAllFaceData - ( - "nsided", - boundaryFaceSet.polys, - nfp.nPolys, - pf, - patchProcessors, - ensightFile - ); - - return true; - } - else - { - return false; - } -} - - -template -void writePatchField -( - const Foam::word& fieldName, - const Foam::Field& pf, - const Foam::word& patchName, - const Foam::ensightMesh& eMesh, - const Foam::fileName& postProcPath, - const Foam::word& prepend, - const Foam::label timeIndex, - Foam::Ostream& ensightCaseFile -) -{ - const Time& runTime = eMesh.mesh.time(); - - const List& boundaryFaceSets = eMesh.boundaryFaceSets; - const HashTable& allPatchNames = eMesh.allPatchNames; - const HashTable