Commit dfe651dc authored by Franjo's avatar Franjo
Browse files

Replaced author for mesh checks and addressing where needed + protecting of include <omp.h>

parent 6c778a86
......@@ -33,7 +33,9 @@ Description
#include "tessellationDimSpace.H"
#include "demandDrivenData.H"
# ifdef USE_OMP
#include <omp.h>
# endif
// #define DEBUGTets
......
......@@ -34,7 +34,9 @@ Description
#include "labelPair.H"
#include "HashSet.H"
# ifdef USE_OMP
#include <omp.h>
# endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -32,7 +32,10 @@ Description
#include "demandDrivenData.H"
#include "labelPair.H"
# ifdef USE_OMP
#include <omp.h>
# endif
namespace Foam
{
......
......@@ -2,8 +2,8 @@
========= |
\\ / F ield | cfMesh: A library for mesh generation
\\ / O peration |
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
\\ / A nd | Copyright held by the original author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
......
......@@ -2,8 +2,8 @@
========= |
\\ / F ield | cfMesh: A library for mesh generation
\\ / O peration |
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
\\ / A nd | Copyright held by the original author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
......
......@@ -2,8 +2,8 @@
========= |
\\ / F ield | cfMesh: A library for mesh generation
\\ / O peration |
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
\\ / A nd | Copyright held by the original author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
......
......@@ -2,8 +2,8 @@
========= |
\\ / F ield | cfMesh: A library for mesh generation
\\ / O peration |
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
\\ / A nd | Copyright held by the original author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
......
......@@ -2,8 +2,8 @@
========= |
\\ / F ield | cfMesh: A library for mesh generation
\\ / O peration |
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
\\ / A nd | Copyright held by the original author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
......
......@@ -2,8 +2,8 @@
========= |
\\ / F ield | cfMesh: A library for mesh generation
\\ / O peration |
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
\\ / A nd | Copyright held by the original author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
......@@ -86,7 +86,7 @@ void polyMeshGenAddressing::printAllocated() const
{
Pout<< " Point-point" << endl;
}
if( cpPtr_ )
{
Pout<< " Cell-point" << endl;
......@@ -160,7 +160,7 @@ void polyMeshGenAddressing::clearParallelAddressing()
deleteDemandDrivenData(globalFaceLabelPtr_);
deleteDemandDrivenData(globalCellLabelPtr_);
deleteDemandDrivenData(globalEdgeLabelPtr_);
deleteDemandDrivenData(pProcsPtr_);
deleteDemandDrivenData(globalToLocalPointAddressingPtr_);
deleteDemandDrivenData(pointNeiProcsPtr_);
......
......@@ -2,8 +2,8 @@
========= |
\\ / F ield | cfMesh: A library for mesh generation
\\ / O peration |
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
\\ / A nd | Copyright held by the original author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
......
......@@ -2,8 +2,8 @@
========= |
\\ / F ield | cfMesh: A library for mesh generation
\\ / O peration |
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
\\ / A nd | Copyright held by the original author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
......
......@@ -2,8 +2,8 @@
========= |
\\ / F ield | cfMesh: A library for mesh generation
\\ / O peration |
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
\\ / A nd | Copyright held by the original author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
......
......@@ -2,8 +2,8 @@
========= |
\\ / F ield | cfMesh: A library for mesh generation
\\ / O peration |
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
\\ / A nd | Copyright held by the original author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
......
......@@ -2,8 +2,8 @@
========= |
\\ / F ield | cfMesh: A library for mesh generation
\\ / O peration |
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
\\ / A nd | Copyright held by the original author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
......
......@@ -2,8 +2,8 @@
========= |
\\ / F ield | cfMesh: A library for mesh generation
\\ / O peration |
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
\\ / A nd | Copyright held by the original author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
......
......@@ -2,8 +2,8 @@
========= |
\\ / F ield | cfMesh: A library for mesh generation
\\ / O peration |
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
\\ / A nd | Copyright held by the original author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
......
......@@ -2,8 +2,8 @@
========= |
\\ / F ield | cfMesh: A library for mesh generation
\\ / O peration |
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
\\ / A nd | Copyright held by the original author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
......@@ -26,7 +26,9 @@ License
#include "polyMeshGenAddressing.H"
#include "VRWGraphSMPModifier.H"
# ifdef USE_OMP
#include <omp.h>
# endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -26,7 +26,9 @@ License
#include "polyMeshGenAddressing.H"
#include "demandDrivenData.H"
# ifdef USE_OMP
#include <omp.h>
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -32,7 +32,9 @@ License
#include "ListOps.H"
#include "Map.H"
# ifdef USE_OMP
#include <omp.h>
# endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -2,8 +2,8 @@
========= |
\\ / F ield | cfMesh: A library for mesh generation
\\ / O peration |
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
\\ / A nd | Copyright held by the origina author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
......
......@@ -2,8 +2,8 @@
========= |
\\ / F ield | cfMesh: A library for mesh generation
\\ / O peration |
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
\\ / A nd | Copyright held by the original author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
......@@ -28,7 +28,9 @@ License
#include "cell.H"
#include "Map.H"
# ifdef USE_OMP
#include <omp.h>
# endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -28,7 +28,9 @@ Description
#include "polyMeshGenModifier.H"
#include "demandDrivenData.H"
# ifdef USE_OMP
#include <omp.h>
# endif
namespace Foam
{
......
......@@ -28,7 +28,9 @@ Description
#include "polyMeshGenModifier.H"
#include "demandDrivenData.H"
# ifdef USE_OMP
#include <omp.h>
# endif
namespace Foam
{
......
......@@ -28,7 +28,9 @@ Description
#include "polyMeshGenModifier.H"
#include "demandDrivenData.H"
# ifdef USE_OMP
#include <omp.h>
# endif
namespace Foam
{
......
......@@ -28,7 +28,9 @@ Description
#include "polyMeshGenModifier.H"
#include "demandDrivenData.H"
# ifdef USE_OMP
#include <omp.h>
# endif
// #define DEBUGSearch
......
......@@ -29,7 +29,9 @@ Description
#include "VRWGraphSMPModifier.H"
#include "demandDrivenData.H"
# ifdef USE_OMP
#include <omp.h>
# endif
namespace Foam
{
......
......@@ -31,7 +31,9 @@ Description
#include "triSurfAddressing.H"
# ifdef USE_OMP
#include <omp.h>
# endif
namespace Foam
{
......
......@@ -30,7 +30,9 @@ Description
#include "boundBox.H"
#include "demandDrivenData.H"
# ifdef USE_OMP
#include <omp.h>
# endif
//#define DEBUGSearch
......
......@@ -31,7 +31,10 @@ Description
#include "helperFunctions.H"
#include <map>
# ifdef USE_OMP
#include <omp.h>
# endif
//#define DEBUGAddressing
......
......@@ -29,7 +29,9 @@ Description
#include "VRWGraph.H"
#include "triSurf.H"
# ifdef USE_OMP
#include <omp.h>
# endif
//#define DEBUGSearch
......
......@@ -28,7 +28,9 @@ Description
#include "meshOctreeModifier.H"
#include "HashSet.H"
# ifdef USE_OMP
#include <omp.h>
# endif
//#define DEBUGSearch
......
......@@ -29,7 +29,10 @@ Description
#include "triSurf.H"
#include "HashSet.H"
# ifdef USE_OMP
#include <omp.h>
# endif
#include <sys/stat.h>
//#define OCTREETiming
......
......@@ -28,7 +28,9 @@ Description
#include "meshOctreeModifier.H"
#include "HashSet.H"
# ifdef USE_OMP
#include <omp.h>
# endif
//#define OCTREETiming
//#define OCTREE_DEBUG
......
......@@ -30,7 +30,9 @@ Description
#include "polyMeshGenAddressing.H"
#include "meshSurfaceEngine.H"
# ifdef USE_OMP
#include <omp.h>
# endif
//#define DEBUGSmooth
......
......@@ -32,7 +32,9 @@ Description
#include "decomposeFaces.H"
#include "decomposeCells.H"
# ifdef USE_OMP
#include <omp.h>
# endif
//#define DEBUGCheck
......
......@@ -30,7 +30,9 @@ Description
#include "helperFunctionsPar.H"
#include "sortEdgesIntoChains.H"
# ifdef USE_OMP
#include <omp.h>
# endif
//#define DEBUGCheck
......
......@@ -30,7 +30,9 @@ Description
#include "helperFunctions.H"
#include "meshSurfaceEngine.H"
# ifdef USE_OMP
#include <omp.h>
# endif
//#define DEBUGCheck
......
......@@ -32,7 +32,9 @@ Description
#include "addToRunTimeSelectionTable.H"
# ifdef USE_OMP
#include <omp.h>
# endif
// #define DEBUGSearch
......
......@@ -32,7 +32,9 @@ Description
#include "addToRunTimeSelectionTable.H"
# ifdef USE_OMP
#include <omp.h>
# endif
// #define DEBUGSearch
......
......@@ -36,7 +36,10 @@ Description
#include "OFstream.H"
#include <map>
# ifdef USE_OMP
#include <omp.h>
# endif
//#define DEBUGCurvatureEstimator
......
......@@ -31,7 +31,9 @@ Description
#include "demandDrivenData.H"
#include "labelPair.H"
# ifdef USE_OMP
#include <omp.h>
# endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -34,7 +34,9 @@ Description
#include "VRWGraph.H"
#include "VRWGraphModifier.H"
# ifdef USE_OMP
#include <omp.h>
# endif
using namespace Foam;
......@@ -44,7 +46,7 @@ using namespace Foam;
int main(int argc, char *argv[])
{
//# include "setRootCase.H"
//# include "createTime.H"
......@@ -56,32 +58,32 @@ int main(int argc, char *argv[])
forAllRow(origGraph, i, j)
origGraph(i, j) = i+j;
}
for(label i=0;i<10;++i)
{
omp_set_num_threads(1);
Info << "Starting transpose" << endl;
scalar before = omp_get_wtime();
{
VRWGraph reverse;
reverse.reverseAddressing(origGraph);
Info << "Single thread run " << omp_get_wtime() - before << endl;
}
omp_set_num_threads(2);
{
VRWGraph reverse;
before = omp_get_wtime();
VRWGraphModifier(reverse).reverseAddressing(origGraph);
Info << "Parallel run " << omp_get_wtime() - before << endl;
VRWGraph rev;
rev.reverseAddressing(origGraph);
forAll(reverse, rowI)
{
if( reverse.sizeOfRow(rowI) != rev.sizeOfRow(rowI) )
......@@ -93,10 +95,10 @@ int main(int argc, char *argv[])
}
}
}
//Info << "Orig graph " << origGraph << endl;
//Info << "Reversed graph " << reverse << endl;
Info << "End\n" << endl;
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment