Bugfix: update cfMesh to v1.1 which fixes self-comparison always evaluates to false [-Wtautological-compare]

This commit is contained in:
Danial Khazaei 2019-01-31 17:52:39 +03:30
parent b9ba5ebf2e
commit 5f08a2f90a
No known key found for this signature in database
GPG key ID: 0EF86F9BFB18F88C
305 changed files with 164476 additions and 162251 deletions

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | foam-extend: Open Source CFD \\ / F ield | cfMesh: A library for mesh generation
\\ / O peration | Version: 3.2 \\ / O peration |
\\ / A nd | Web: http://www.foam-extend.org \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | For copyright notice see file Copyright \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of foam-extend. This file is part of cfMesh.
foam-extend is free software: you can redistribute it and/or modify it cfMesh is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the 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 Free Software Foundation; either version 3 of the License, or (at your
option) any later version. option) any later version.
foam-extend is distributed in the hope that it will be useful, but cfMesh is distributed in the hope that it will be useful, but WITHOUT
WITHOUT ANY WARRANTY; without even the implied warranty of ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
General Public License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with foam-extend. If not, see <http://www.gnu.org/licenses/>. along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
Description Description
Reads the AVL's surface mesh Reads the AVL's surface mesh
@ -27,8 +27,6 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "argList.H" #include "argList.H"
#include "objectRegistry.H"
#include "foamTime.H"
#include "triSurf.H" #include "triSurf.H"
#include "triSurfModifier.H" #include "triSurfModifier.H"
#include "triFaceList.H" #include "triFaceList.H"

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | foam-extend: Open Source CFD \\ / F ield | cfMesh: A library for mesh generation
\\ / O peration | Version: 3.2 \\ / O peration |
\\ / A nd | Web: http://www.foam-extend.org \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | For copyright notice see file Copyright \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of foam-extend. This file is part of cfMesh.
foam-extend is free software: you can redistribute it and/or modify it cfMesh is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the 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 Free Software Foundation; either version 3 of the License, or (at your
option) any later version. option) any later version.
foam-extend is distributed in the hope that it will be useful, but cfMesh is distributed in the hope that it will be useful, but WITHOUT
WITHOUT ANY WARRANTY; without even the implied warranty of ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
General Public License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with foam-extend. If not, see <http://www.gnu.org/licenses/>. along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
Description Description
Creates surface patches from surface subsets Creates surface patches from surface subsets
@ -27,8 +27,6 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "argList.H" #include "argList.H"
#include "objectRegistry.H"
#include "foamTime.H"
#include "triSurf.H" #include "triSurf.H"
#include "triSurfaceCopyParts.H" #include "triSurfaceCopyParts.H"
#include "demandDrivenData.H" #include "demandDrivenData.H"

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | foam-extend: Open Source CFD \\ / F ield | cfMesh: A library for mesh generation
\\ / O peration | Version: 3.2 \\ / O peration |
\\ / A nd | Web: http://www.foam-extend.org \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | For copyright notice see file Copyright \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of foam-extend. This file is part of cfMesh.
foam-extend is free software: you can redistribute it and/or modify it cfMesh is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the 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 Free Software Foundation; either version 3 of the License, or (at your
option) any later version. option) any later version.
foam-extend is distributed in the hope that it will be useful, but cfMesh is distributed in the hope that it will be useful, but WITHOUT
WITHOUT ANY WARRANTY; without even the implied warranty of ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
General Public License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with foam-extend. If not, see <http://www.gnu.org/licenses/>. along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
Description Description
cfMesh utility to convert a surface file to VTK multiblock dataset cfMesh utility to convert a surface file to VTK multiblock dataset
@ -45,7 +45,7 @@ using namespace Foam;
void writePointsToVTK void writePointsToVTK
( (
const fileName& fn, const fileName& fn,
const string& title, const string& /*title*/,
const UList<point>& points const UList<point>& points
) )
{ {
@ -78,7 +78,7 @@ void writePointsToVTK
const fileName& fn, const fileName& fn,
const string& title, const string& title,
const UList<point>& points, const UList<point>& points,
unallocLabelList& addr UList<label>& addr
) )
{ {
// Create subaddressed points // Create subaddressed points
@ -102,7 +102,7 @@ void writePointsToVTK
void writeEdgesToVTK void writeEdgesToVTK
( (
const fileName& fn, const fileName& fn,
const string& title, const string& /*title*/,
const UList<point>& points, const UList<point>& points,
const LongList<edge>& edges const LongList<edge>& edges
) )
@ -158,7 +158,7 @@ void writeEdgesToVTK
const string& title, const string& title,
const UList<point>& points, const UList<point>& points,
const LongList<edge>& edges, const LongList<edge>& edges,
const unallocLabelList& addr const UList<label>& addr
) )
{ {
// Remove unused points and create subaddressed edges // Remove unused points and create subaddressed edges
@ -201,7 +201,7 @@ void writeEdgesToVTK
void writeFacetsToVTK void writeFacetsToVTK
( (
const fileName& fn, const fileName& fn,
const string& title, const string& /*title*/,
const UList<point>& points, const UList<point>& points,
const LongList<labelledTri>& facets const LongList<labelledTri>& facets
) )
@ -274,7 +274,7 @@ void writeFacetsToVTK
const string& title, const string& title,
const pointField& points, const pointField& points,
const LongList<labelledTri>& facets, const LongList<labelledTri>& facets,
const unallocLabelList& addr const UList<label>& addr
) )
{ {
// Remove unused points and create subaddressed facets // Remove unused points and create subaddressed facets

View file

@ -1,9 +1,9 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | foam-extend: Open Source CFD \\ / F ield | foam-extend: Open Source CFD
\\ / O peration | Version: 3.2 \\ / O peration |
\\ / A nd | Web: http://www.foam-extend.org \\ / A nd | For copyright notice see file Copyright
\\/ M anipulation | For copyright notice see file Copyright \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of foam-extend. This file is part of foam-extend.

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | foam-extend: Open Source CFD \\ / F ield | cfMesh: A library for mesh generation
\\ / O peration | Version: 3.2 \\ / O peration |
\\ / A nd | Web: http://www.foam-extend.org \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | For copyright notice see file Copyright \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of foam-extend. This file is part of cfMesh.
foam-extend is free software: you can redistribute it and/or modify it cfMesh is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the 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 Free Software Foundation; either version 3 of the License, or (at your
option) any later version. option) any later version.
foam-extend is distributed in the hope that it will be useful, but cfMesh is distributed in the hope that it will be useful, but WITHOUT
WITHOUT ANY WARRANTY; without even the implied warranty of ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
General Public License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with foam-extend. If not, see <http://www.gnu.org/licenses/>. along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
Application Application
Generates cartesian mesh Generates cartesian mesh
@ -30,8 +30,6 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "argList.H" #include "argList.H"
#include "objectRegistry.H"
#include "foamTime.H"
#include "cartesian2DMeshGenerator.H" #include "cartesian2DMeshGenerator.H"
using namespace Foam; using namespace Foam;

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | foam-extend: Open Source CFD \\ / F ield | cfMesh: A library for mesh generation
\\ / O peration | Version: 3.2 \\ / O peration |
\\ / A nd | Web: http://www.foam-extend.org \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | For copyright notice see file Copyright \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of foam-extend. This file is part of cfMesh.
foam-extend is free software: you can redistribute it and/or modify it cfMesh is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the 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 Free Software Foundation; either version 3 of the License, or (at your
option) any later version. option) any later version.
foam-extend is distributed in the hope that it will be useful, but cfMesh is distributed in the hope that it will be useful, but WITHOUT
WITHOUT ANY WARRANTY; without even the implied warranty of ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
General Public License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with foam-extend. If not, see <http://www.gnu.org/licenses/>. along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
Application Application
Generates cartesian mesh Generates cartesian mesh
@ -30,8 +30,6 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "argList.H" #include "argList.H"
#include "objectRegistry.H"
#include "foamTime.H"
#include "cartesianMeshGenerator.H" #include "cartesianMeshGenerator.H"
using namespace Foam; using namespace Foam;

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | foam-extend: Open Source CFD \\ / F ield | cfMesh: A library for mesh generation
\\ / O peration | Version: 3.2 \\ / O peration |
\\ / A nd | Web: http://www.foam-extend.org \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | For copyright notice see file Copyright \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of foam-extend. This file is part of cfMesh.
foam-extend is free software: you can redistribute it and/or modify it cfMesh is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the 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 Free Software Foundation; either version 3 of the License, or (at your
option) any later version. option) any later version.
foam-extend is distributed in the hope that it will be useful, but cfMesh is distributed in the hope that it will be useful, but WITHOUT
WITHOUT ANY WARRANTY; without even the implied warranty of ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
General Public License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with foam-extend. If not, see <http://www.gnu.org/licenses/>. along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
Description Description
Finds feature edges and corners of a triangulated surface Finds feature edges and corners of a triangulated surface

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | foam-extend: Open Source CFD \\ / F ield | cfMesh: A library for mesh generation
\\ / O peration | Version: 3.2 \\ / O peration |
\\ / A nd | Web: http://www.foam-extend.org \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | For copyright notice see file Copyright \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of foam-extend. This file is part of cfMesh.
foam-extend is free software: you can redistribute it and/or modify it cfMesh is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the 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 Free Software Foundation; either version 3 of the License, or (at your
option) any later version. option) any later version.
foam-extend is distributed in the hope that it will be useful, but cfMesh is distributed in the hope that it will be useful, but WITHOUT
WITHOUT ANY WARRANTY; without even the implied warranty of ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
General Public License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with foam-extend. If not, see <http://www.gnu.org/licenses/>. along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
Description Description
Reads the surface mesh, remove the selected facets Reads the surface mesh, remove the selected facets
@ -28,8 +28,6 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "argList.H" #include "argList.H"
#include "objectRegistry.H"
#include "foamTime.H"
#include "triSurf.H" #include "triSurf.H"
#include "triSurfaceExtrude2DEdges.H" #include "triSurfaceExtrude2DEdges.H"
#include "demandDrivenData.H" #include "demandDrivenData.H"

View file

@ -28,8 +28,6 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "argList.H" #include "argList.H"
#include "objectRegistry.H"
#include "foamTime.H"
#include "polyMeshGenModifier.H" #include "polyMeshGenModifier.H"
#include "meshOptimizer.H" #include "meshOptimizer.H"
#include "boundaryLayers.H" #include "boundaryLayers.H"

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | foam-extend: Open Source CFD \\ / F ield | cfMesh: A library for mesh generation
\\ / O peration | Version: 3.2 \\ / O peration |
\\ / A nd | Web: http://www.foam-extend.org \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | For copyright notice see file Copyright \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of foam-extend. This file is part of cfMesh.
foam-extend is free software: you can redistribute it and/or modify it cfMesh is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the 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 Free Software Foundation; either version 3 of the License, or (at your
option) any later version. option) any later version.
foam-extend is distributed in the hope that it will be useful, but cfMesh is distributed in the hope that it will be useful, but WITHOUT
WITHOUT ANY WARRANTY; without even the implied warranty of ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
General Public License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with foam-extend. If not, see <http://www.gnu.org/licenses/>. along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
Description Description
Finds feature edges and corners of a triangulated surface Finds feature edges and corners of a triangulated surface

View file

@ -28,8 +28,6 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "argList.H" #include "argList.H"
#include "objectRegistry.H"
#include "foamTime.H"
#include "polyMeshGenModifier.H" #include "polyMeshGenModifier.H"
#include "meshOptimizer.H" #include "meshOptimizer.H"

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | foam-extend: Open Source CFD \\ / F ield | cfMesh: A library for mesh generation
\\ / O peration | Version: 3.2 \\ / O peration |
\\ / A nd | Web: http://www.foam-extend.org \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | For copyright notice see file Copyright \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of foam-extend. This file is part of cfMesh.
foam-extend is free software: you can redistribute it and/or modify it cfMesh is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the 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 Free Software Foundation; either version 3 of the License, or (at your
option) any later version. option) any later version.
foam-extend is distributed in the hope that it will be useful, but cfMesh is distributed in the hope that it will be useful, but WITHOUT
WITHOUT ANY WARRANTY; without even the implied warranty of ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
General Public License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with foam-extend. If not, see <http://www.gnu.org/licenses/>. along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
Description Description
Ensures that all mesh points belonging to a symmetryPlane are Ensures that all mesh points belonging to a symmetryPlane are
@ -28,8 +28,6 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "argList.H" #include "argList.H"
#include "objectRegistry.H"
#include "foamTime.H"
#include "polyMeshGenModifier.H" #include "polyMeshGenModifier.H"
#include "symmetryPlaneOptimisation.H" #include "symmetryPlaneOptimisation.H"

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | foam-extend: Open Source CFD \\ / F ield | cfMesh: A library for mesh generation
\\ / O peration | Version: 3.2 \\ / O peration |
\\ / A nd | Web: http://www.foam-extend.org \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | For copyright notice see file Copyright \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of foam-extend. This file is part of cfMesh.
foam-extend is free software: you can redistribute it and/or modify it cfMesh is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the 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 Free Software Foundation; either version 3 of the License, or (at your
option) any later version. option) any later version.
foam-extend is distributed in the hope that it will be useful, but cfMesh is distributed in the hope that it will be useful, but WITHOUT
WITHOUT ANY WARRANTY; without even the implied warranty of ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
General Public License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with foam-extend. If not, see <http://www.gnu.org/licenses/>. along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
Description Description
cfMesh utility to merge the supplied list of patches onto a single cfMesh utility to merge the supplied list of patches onto a single
@ -31,8 +31,6 @@ Author
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "argList.H" #include "argList.H"
#include "objectRegistry.H"
#include "foamTime.H"
#include "autoPtr.H" #include "autoPtr.H"
#include "triSurf.H" #include "triSurf.H"
#include "triSurfModifier.H" #include "triSurfModifier.H"
@ -211,7 +209,7 @@ autoPtr<triSurf> mergeSurfacePatches
label faceI = 0; label faceI = 0;
forAll(patchAddr, patchI) forAll(patchAddr, patchI)
{ {
const unallocLabelList& addr = patchAddr[patchI]; const UList<label>& addr = patchAddr[patchI];
if(addr.size()) if(addr.size())
{ {

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | foam-extend: Open Source CFD \\ / F ield | cfMesh: A library for mesh generation
\\ / O peration | Version: 3.2 \\ / O peration |
\\ / A nd | Web: http://www.foam-extend.org \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | For copyright notice see file Copyright \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of foam-extend. This file is part of cfMesh.
foam-extend is free software: you can redistribute it and/or modify it cfMesh is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the 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 Free Software Foundation; either version 3 of the License, or (at your
option) any later version. option) any later version.
foam-extend is distributed in the hope that it will be useful, but cfMesh is distributed in the hope that it will be useful, but WITHOUT
WITHOUT ANY WARRANTY; without even the implied warranty of ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
General Public License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with foam-extend. If not, see <http://www.gnu.org/licenses/>. along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
Description Description
Writes the mesh in fpma format readable by AVL's CfdWM Writes the mesh in fpma format readable by AVL's CfdWM
@ -27,8 +27,6 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "argList.H" #include "argList.H"
#include "objectRegistry.H"
#include "foamTime.H"
#include "polyMeshGenModifier.H" #include "polyMeshGenModifier.H"
#include "writeMeshFPMA.H" #include "writeMeshFPMA.H"

View file

@ -30,8 +30,6 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "argList.H" #include "argList.H"
#include "objectRegistry.H"
#include "foamTime.H"
#include "voronoiMeshGenerator.H" #include "voronoiMeshGenerator.H"
using namespace Foam; using namespace Foam;

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | foam-extend: Open Source CFD \\ / F ield | cfMesh: A library for mesh generation
\\ / O peration | Version: 3.2 \\ / O peration |
\\ / A nd | Web: http://www.foam-extend.org \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | For copyright notice see file Copyright \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of foam-extend. This file is part of cfMesh.
foam-extend is free software: you can redistribute it and/or modify it cfMesh is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the 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 Free Software Foundation; either version 3 of the License, or (at your
option) any later version. option) any later version.
foam-extend is distributed in the hope that it will be useful, but cfMesh is distributed in the hope that it will be useful, but WITHOUT
WITHOUT ANY WARRANTY; without even the implied warranty of ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
General Public License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with foam-extend. If not, see <http://www.gnu.org/licenses/>. along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
Description Description
Converts specified patches into subsets Converts specified patches into subsets
@ -27,8 +27,6 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "argList.H" #include "argList.H"
#include "objectRegistry.H"
#include "foamTime.H"
#include "triSurf.H" #include "triSurf.H"
#include "triFaceList.H" #include "triFaceList.H"
#include "labelLongList.H" #include "labelLongList.H"

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | foam-extend: Open Source CFD \\ / F ield | cfMesh: A library for mesh generation
\\ / O peration | Version: 3.2 \\ / O peration |
\\ / A nd | Web: http://www.foam-extend.org \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | For copyright notice see file Copyright \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of foam-extend. This file is part of cfMesh.
foam-extend is free software: you can redistribute it and/or modify it cfMesh is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the 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 Free Software Foundation; either version 3 of the License, or (at your
option) any later version. option) any later version.
foam-extend is distributed in the hope that it will be useful, but cfMesh is distributed in the hope that it will be useful, but WITHOUT
WITHOUT ANY WARRANTY; without even the implied warranty of ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
General Public License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with foam-extend. If not, see <http://www.gnu.org/licenses/>. along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
Application Application
Prepares the case for a parallel mesh generation run Prepares the case for a parallel mesh generation run
@ -30,8 +30,7 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "argList.H" #include "argList.H"
#include "objectRegistry.H" #include "polyMeshGen.H"
#include "foamTime.H"
#include <sstream> #include <sstream>
@ -83,16 +82,13 @@ int main(int argc, char *argv[])
file += ss.str(); file += ss.str();
Info << "Creating " << file << endl; Info << "Creating " << file << endl;
// create a directory for processor data //- create a directory for processor data
mkDir(runTime.path()/file); mkDir(runTime.path()/file);
// generate constant directories //- copy the contents of the const directory into processor*
mkDir(runTime.path()/"constant");
// copy the contents of the const directory into processor*
cp(runTime.path()/"constant", runTime.path()/file); cp(runTime.path()/"constant", runTime.path()/file);
// generate 0 directories //- generate 0 directories for
mkDir(runTime.path()/file/"0"); mkDir(runTime.path()/file/"0");
} }

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | foam-extend: Open Source CFD \\ / F ield | cfMesh: A library for mesh generation
\\ / O peration | Version: 3.2 \\ / O peration |
\\ / A nd | Web: http://www.foam-extend.org \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | For copyright notice see file Copyright \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of foam-extend. This file is part of cfMesh.
foam-extend is free software: you can redistribute it and/or modify it cfMesh is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the 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 Free Software Foundation; either version 3 of the License, or (at your
option) any later version. option) any later version.
foam-extend is distributed in the hope that it will be useful, but cfMesh is distributed in the hope that it will be useful, but WITHOUT
WITHOUT ANY WARRANTY; without even the implied warranty of ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
General Public License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with foam-extend. If not, see <http://www.gnu.org/licenses/>. along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
Description Description
Reads the surface mesh, remove the selected facets Reads the surface mesh, remove the selected facets
@ -28,8 +28,6 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "argList.H" #include "argList.H"
#include "objectRegistry.H"
#include "foamTime.H"
#include "triSurf.H" #include "triSurf.H"
#include "triSurfaceRemoveFacets.H" #include "triSurfaceRemoveFacets.H"

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | foam-extend: Open Source CFD \\ / F ield | cfMesh: A library for mesh generation
\\ / O peration | Version: 3.2 \\ / O peration |
\\ / A nd | Web: http://www.foam-extend.org \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | For copyright notice see file Copyright \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of foam-extend. This file is part of cfMesh.
foam-extend is free software: you can redistribute it and/or modify it cfMesh is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the 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 Free Software Foundation; either version 3 of the License, or (at your
option) any later version. option) any later version.
foam-extend is distributed in the hope that it will be useful, but cfMesh is distributed in the hope that it will be useful, but WITHOUT
WITHOUT ANY WARRANTY; without even the implied warranty of ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
General Public License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with foam-extend. If not, see <http://www.gnu.org/licenses/>. along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
Description Description
Creates surface patches from surface subsets Creates surface patches from surface subsets
@ -27,8 +27,6 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "argList.H" #include "argList.H"
#include "objectRegistry.H"
#include "foamTime.H"
#include "triSurf.H" #include "triSurf.H"
#include "demandDrivenData.H" #include "demandDrivenData.H"

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | foam-extend: Open Source CFD \\ / F ield | cfMesh: A library for mesh generation
\\ / O peration | Version: 3.2 \\ / O peration |
\\ / A nd | Web: http://www.foam-extend.org \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | For copyright notice see file Copyright \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of foam-extend. This file is part of cfMesh.
foam-extend is free software: you can redistribute it and/or modify it cfMesh is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the 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 Free Software Foundation; either version 3 of the License, or (at your
option) any later version. option) any later version.
foam-extend is distributed in the hope that it will be useful, but cfMesh is distributed in the hope that it will be useful, but WITHOUT
WITHOUT ANY WARRANTY; without even the implied warranty of ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
General Public License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with foam-extend. If not, see <http://www.gnu.org/licenses/>. along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
Description Description
Finds feature edges and corners of a triangulated surface Finds feature edges and corners of a triangulated surface

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | foam-extend: Open Source CFD \\ / F ield | cfMesh: A library for mesh generation
\\ / O peration | Version: 3.2 \\ / O peration |
\\ / A nd | Web: http://www.foam-extend.org \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | For copyright notice see file Copyright \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of foam-extend. This file is part of cfMesh.
foam-extend is free software: you can redistribute it and/or modify it cfMesh is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the 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 Free Software Foundation; either version 3 of the License, or (at your
option) any later version. option) any later version.
foam-extend is distributed in the hope that it will be useful, but cfMesh is distributed in the hope that it will be useful, but WITHOUT
WITHOUT ANY WARRANTY; without even the implied warranty of ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
General Public License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with foam-extend. If not, see <http://www.gnu.org/licenses/>. along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
Description Description
Finds feature edges and corners of a triangulated surface Finds feature edges and corners of a triangulated surface
@ -29,14 +29,14 @@ Description
#include "argList.H" #include "argList.H"
#include "IFstream.H" #include "IFstream.H"
#include "fileName.H" #include "fileName.H"
#include "triSurf.H"
#include "triSurfModifier.H" #include "triSurfModifier.H"
#include "boundBox.H" #include "boundBox.H"
#include "OFstream.H" #include "OFstream.H"
#include <cstdlib> #include <cstdlib>
#include <sstream> #include <sstream>
#include "triSurfaceDetectFeatureEdges.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Main program: // Main program:
using namespace Foam; using namespace Foam;
@ -121,12 +121,12 @@ int main(int argc, char *argv[])
//- generate bounding bound triangles //- generate bounding bound triangles
const label nTriangles = origSurface.size(); const label nTriangles = origSurface.size();
LongList<labelledTri>& newTriangles = sMod.facetsAccess(); LongList<labelledTri>& newTriangles = sMod.facetsAccess();
newTriangles.setSize(nTriangles + 12); newTriangles.setSize(nTriangles+12);
//- create patches //- create patches
geometricSurfacePatchList& newPatches = sMod.patchesAccess(); geometricSurfacePatchList& newPatches = sMod.patchesAccess();
const label nPatches = origSurface.patches().size(); const label nPatches = origSurface.patches().size();
newPatches.setSize(nPatches + 6); newPatches.setSize(nPatches+6);
newPatches[nPatches].name() = "xMin"; newPatches[nPatches].name() = "xMin";
newPatches[nPatches+1].name() = "xMax"; newPatches[nPatches+1].name() = "xMax";

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | foam-extend: Open Source CFD \\ / F ield | cfMesh: A library for mesh generation
\\ / O peration | Version: 3.2 \\ / O peration |
\\ / A nd | Web: http://www.foam-extend.org \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | For copyright notice see file Copyright \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of foam-extend. This file is part of cfMesh.
foam-extend is free software: you can redistribute it and/or modify it cfMesh is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the 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 Free Software Foundation; either version 3 of the License, or (at your
option) any later version. option) any later version.
foam-extend is distributed in the hope that it will be useful, but cfMesh is distributed in the hope that it will be useful, but WITHOUT
WITHOUT ANY WARRANTY; without even the implied warranty of ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
General Public License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with foam-extend. If not, see <http://www.gnu.org/licenses/>. along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
Description Description
Reads the specified surface and writes it in the fms format. Reads the specified surface and writes it in the fms format.

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | foam-extend: Open Source CFD \\ / F ield | cfMesh: A library for mesh generation
\\ / O peration | Version: 3.2 \\ / O peration |
\\ / A nd | Web: http://www.foam-extend.org \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | For copyright notice see file Copyright \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of foam-extend. This file is part of cfMesh.
foam-extend is free software: you can redistribute it and/or modify it cfMesh is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the 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 Free Software Foundation; either version 3 of the License, or (at your
option) any later version. option) any later version.
foam-extend is distributed in the hope that it will be useful, but cfMesh is distributed in the hope that it will be useful, but WITHOUT
WITHOUT ANY WARRANTY; without even the implied warranty of ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
General Public License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with foam-extend. If not, see <http://www.gnu.org/licenses/>. along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
Application Application
Generates tetrahedral mesh Generates tetrahedral mesh
@ -30,8 +30,6 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "argList.H" #include "argList.H"
#include "objectRegistry.H"
#include "foamTime.H"
#include "tetMeshGenerator.H" #include "tetMeshGenerator.H"
using namespace Foam; using namespace Foam;

View file

@ -32,7 +32,6 @@ Description
#include "triSurfacePatchManipulator.H" #include "triSurfacePatchManipulator.H"
#include "triSurfaceCleanupDuplicateTriangles.H" #include "triSurfaceCleanupDuplicateTriangles.H"
#include "demandDrivenData.H" #include "demandDrivenData.H"
#include "foamTime.H"
#include "meshOctreeCreator.H" #include "meshOctreeCreator.H"
#include "cartesianMeshExtractor.H" #include "cartesianMeshExtractor.H"
#include "meshSurfaceEngine.H" #include "meshSurfaceEngine.H"
@ -188,7 +187,7 @@ void cartesian2DMeshGenerator::refBoundaryLayers()
void cartesian2DMeshGenerator::replaceBoundaries() void cartesian2DMeshGenerator::replaceBoundaries()
{ {
renameBoundaryPatches rbp(mesh_, meshDict_); renameBoundaryPatches rbp(mesh_, meshDict_, true);
} }
void cartesian2DMeshGenerator::renumberMesh() void cartesian2DMeshGenerator::renumberMesh()
@ -198,67 +197,53 @@ void cartesian2DMeshGenerator::renumberMesh()
void cartesian2DMeshGenerator::generateMesh() void cartesian2DMeshGenerator::generateMesh()
{ {
try if( controller_.runCurrentStep("templateGeneration") )
{ {
if( controller_.runCurrentStep("templateGeneration") ) createCartesianMesh();
{
createCartesianMesh();
}
if( controller_.runCurrentStep("surfaceTopology") )
{
surfacePreparation();
}
if( controller_.runCurrentStep("surfaceProjection") )
{
mapMeshToSurface();
}
if( controller_.runCurrentStep("patchAssignment") )
{
extractPatches();
}
if( controller_.runCurrentStep("edgeExtraction") )
{
mapEdgesAndCorners();
optimiseMeshSurface();
}
if( controller_.runCurrentStep("boundaryLayerGeneration") )
{
generateBoundaryLayers();
}
if( controller_.runCurrentStep("meshOptimisation") )
{
optimiseMeshSurface();
}
if( controller_.runCurrentStep("boundaryLayerRefinement") )
{
refBoundaryLayers();
}
renumberMesh();
replaceBoundaries();
controller_.workflowCompleted();
} }
catch(const std::string& message)
if( controller_.runCurrentStep("surfaceTopology") )
{ {
Info << message << endl; surfacePreparation();
} }
catch(...)
if( controller_.runCurrentStep("surfaceProjection") )
{ {
WarningIn mapMeshToSurface();
(
"void cartesian2DMeshGenerator::generateMesh()"
) << "Meshing process terminated!" << endl;
} }
if( controller_.runCurrentStep("patchAssignment") )
{
extractPatches();
}
if( controller_.runCurrentStep("edgeExtraction") )
{
mapEdgesAndCorners();
optimiseMeshSurface();
}
if( controller_.runCurrentStep("boundaryLayerGeneration") )
{
generateBoundaryLayers();
}
if( controller_.runCurrentStep("meshOptimisation") )
{
optimiseMeshSurface();
}
if( controller_.runCurrentStep("boundaryLayerRefinement") )
{
refBoundaryLayers();
}
renumberMesh();
replaceBoundaries();
controller_.workflowCompleted();
} }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -283,70 +268,87 @@ cartesian2DMeshGenerator::cartesian2DMeshGenerator(const Time& time)
mesh_(time), mesh_(time),
controller_(mesh_) controller_(mesh_)
{ {
if( true ) try
{ {
checkMeshDict cmd(meshDict_); if( true )
}
fileName surfaceFile = meshDict_.lookup("surfaceFile");
if( Pstream::parRun() )
surfaceFile = ".."/surfaceFile;
surfacePtr_ = new triSurf(db_.path()/surfaceFile);
if( true )
{
//- save meta data with the mesh (surface mesh + its topology info)
triSurfaceMetaData sMetaData(*surfacePtr_);
const dictionary& surfMetaDict = sMetaData.metaData();
mesh_.metaData().add("surfaceFile", surfaceFile, true);
mesh_.metaData().add("surfaceMeta", surfMetaDict, true);
triSurface2DCheck surfCheck(*surfacePtr_);
if( !surfCheck.is2DSurface() )
{ {
surfCheck.createSubsets(); checkMeshDict cmd(meshDict_);
Info << "Writting surface with subsets to file "
<< "badSurfaceWithSubsets.fms" << endl;
surfacePtr_->writeSurface("badSurfaceWithSubsets.fms");
} }
}
if( surfacePtr_->featureEdges().size() != 0 ) fileName surfaceFile = meshDict_.lookup("surfaceFile");
if( Pstream::parRun() )
surfaceFile = ".."/surfaceFile;
surfacePtr_ = new triSurf(db_.path()/surfaceFile);
if( true )
{
//- save meta data with the mesh (surface mesh + its topology info)
triSurfaceMetaData sMetaData(*surfacePtr_);
const dictionary& surfMetaDict = sMetaData.metaData();
mesh_.metaData().add("surfaceFile", surfaceFile, true);
mesh_.metaData().add("surfaceMeta", surfMetaDict, true);
triSurface2DCheck surfCheck(*surfacePtr_);
if( !surfCheck.is2DSurface() )
{
surfCheck.createSubsets();
Info << "Writting surface with subsets to file "
<< "badSurfaceWithSubsets.fms" << endl;
surfacePtr_->writeSurface("badSurfaceWithSubsets.fms");
}
}
if( surfacePtr_->featureEdges().size() != 0 )
{
//- get rid of duplicate triangles as they cause strange problems
triSurfaceCleanupDuplicateTriangles
(
const_cast<triSurf&>(*surfacePtr_)
);
//- create surface patches based on the feature edges
//- and update the meshDict based on the given data
triSurfacePatchManipulator manipulator(*surfacePtr_);
const triSurf* surfaceWithPatches =
manipulator.surfaceWithPatches(&meshDict_);
//- delete the old surface and assign the new one
deleteDemandDrivenData(surfacePtr_);
surfacePtr_ = surfaceWithPatches;
}
if( meshDict_.found("anisotropicSources") )
{
surfaceMeshGeometryModification surfMod(*surfacePtr_, meshDict_);
modSurfacePtr_ = surfMod.modifyGeometry();
octreePtr_ = new meshOctree(*modSurfacePtr_, true);
}
else
{
octreePtr_ = new meshOctree(*surfacePtr_, true);
}
meshOctreeCreator(*octreePtr_, meshDict_).createOctreeBoxes();
generateMesh();
}
catch(const std::string& message)
{ {
//- get rid of duplicate triangles as they cause strange problems Info << message << endl;
triSurfaceCleanupDuplicateTriangles(const_cast<triSurf&>(*surfacePtr_));
//- create surface patches based on the feature edges
//- and update the meshDict based on the given data
triSurfacePatchManipulator manipulator(*surfacePtr_);
const triSurf* surfaceWithPatches =
manipulator.surfaceWithPatches(&meshDict_);
//- delete the old surface and assign the new one
deleteDemandDrivenData(surfacePtr_);
surfacePtr_ = surfaceWithPatches;
} }
catch(...)
if( meshDict_.found("anisotropicSources") )
{ {
surfaceMeshGeometryModification surfMod(*surfacePtr_, meshDict_); WarningIn
(
modSurfacePtr_ = surfMod.modifyGeometry(); "cartesian2DMeshGenerator::cartesian2DMeshGenerator(const Time&)"
) << "Meshing process terminated!" << endl;
octreePtr_ = new meshOctree(*modSurfacePtr_, true);
} }
else
{
octreePtr_ = new meshOctree(*surfacePtr_, true);
}
meshOctreeCreator(*octreePtr_, meshDict_).createOctreeBoxes();
generateMesh();
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //

View file

@ -418,8 +418,8 @@ void cartesianMeshExtractor::createPolyMesh()
newFacePatch newFacePatch
); );
meshModifier.boundariesAccess()[1].patchType() = "patch"; meshModifier.boundariesAccess()[1].patchType() = "empty";
meshModifier.boundariesAccess()[2].patchType() = "patch"; meshModifier.boundariesAccess()[2].patchType() = "empty";
} }
Info << "Finished creating polyMesh" << endl; Info << "Finished creating polyMesh" << endl;

View file

@ -29,7 +29,6 @@ Description
#include "triSurf.H" #include "triSurf.H"
#include "triSurfacePatchManipulator.H" #include "triSurfacePatchManipulator.H"
#include "demandDrivenData.H" #include "demandDrivenData.H"
#include "foamTime.H"
#include "meshOctreeCreator.H" #include "meshOctreeCreator.H"
#include "cartesianMeshExtractor.H" #include "cartesianMeshExtractor.H"
#include "meshSurfaceEngine.H" #include "meshSurfaceEngine.H"
@ -247,69 +246,55 @@ void cartesianMeshGenerator::renumberMesh()
void cartesianMeshGenerator::generateMesh() void cartesianMeshGenerator::generateMesh()
{ {
try if( controller_.runCurrentStep("templateGeneration") )
{ {
if( controller_.runCurrentStep("templateGeneration") ) createCartesianMesh();
{
createCartesianMesh();
}
if( controller_.runCurrentStep("surfaceTopology") )
{
surfacePreparation();
}
if( controller_.runCurrentStep("surfaceProjection") )
{
mapMeshToSurface();
}
if( controller_.runCurrentStep("patchAssignment") )
{
extractPatches();
}
if( controller_.runCurrentStep("edgeExtraction") )
{
mapEdgesAndCorners();
optimiseMeshSurface();
}
if( controller_.runCurrentStep("boundaryLayerGeneration") )
{
generateBoundaryLayers();
}
if( controller_.runCurrentStep("meshOptimisation") )
{
optimiseFinalMesh();
projectSurfaceAfterBackScaling();
}
if( controller_.runCurrentStep("boundaryLayerRefinement") )
{
refBoundaryLayers();
}
renumberMesh();
replaceBoundaries();
controller_.workflowCompleted();
} }
catch(const std::string& message)
if( controller_.runCurrentStep("surfaceTopology") )
{ {
Info << message << endl; surfacePreparation();
} }
catch(...)
if( controller_.runCurrentStep("surfaceProjection") )
{ {
WarningIn mapMeshToSurface();
(
"void cartesianMeshGenerator::generateMesh()"
) << "Meshing process terminated!" << endl;
} }
if( controller_.runCurrentStep("patchAssignment") )
{
extractPatches();
}
if( controller_.runCurrentStep("edgeExtraction") )
{
mapEdgesAndCorners();
optimiseMeshSurface();
}
if( controller_.runCurrentStep("boundaryLayerGeneration") )
{
generateBoundaryLayers();
}
if( controller_.runCurrentStep("meshOptimisation") )
{
optimiseFinalMesh();
projectSurfaceAfterBackScaling();
}
if( controller_.runCurrentStep("boundaryLayerRefinement") )
{
refBoundaryLayers();
}
renumberMesh();
replaceBoundaries();
controller_.workflowCompleted();
} }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -334,57 +319,72 @@ cartesianMeshGenerator::cartesianMeshGenerator(const Time& time)
mesh_(time), mesh_(time),
controller_(mesh_) controller_(mesh_)
{ {
if( true ) try
{ {
checkMeshDict cmd(meshDict_); if( true )
{
checkMeshDict cmd(meshDict_);
}
fileName surfaceFile = meshDict_.lookup("surfaceFile");
if( Pstream::parRun() )
surfaceFile = ".."/surfaceFile;
surfacePtr_ = new triSurf(db_.path()/surfaceFile);
if( true )
{
//- save meta data with the mesh (surface mesh + its topology info)
triSurfaceMetaData sMetaData(*surfacePtr_);
const dictionary& surfMetaDict = sMetaData.metaData();
mesh_.metaData().add("surfaceFile", surfaceFile, true);
mesh_.metaData().add("surfaceMeta", surfMetaDict, true);
}
if( surfacePtr_->featureEdges().size() != 0 )
{
//- create surface patches based on the feature edges
//- and update the meshDict based on the given data
triSurfacePatchManipulator manipulator(*surfacePtr_);
const triSurf* surfaceWithPatches =
manipulator.surfaceWithPatches(&meshDict_);
//- delete the old surface and assign the new one
deleteDemandDrivenData(surfacePtr_);
surfacePtr_ = surfaceWithPatches;
}
if( meshDict_.found("anisotropicSources") )
{
surfaceMeshGeometryModification surfMod(*surfacePtr_, meshDict_);
modSurfacePtr_ = surfMod.modifyGeometry();
octreePtr_ = new meshOctree(*modSurfacePtr_);
}
else
{
octreePtr_ = new meshOctree(*surfacePtr_);
}
meshOctreeCreator(*octreePtr_, meshDict_).createOctreeBoxes();
generateMesh();
} }
catch(const std::string& message)
fileName surfaceFile = meshDict_.lookup("surfaceFile");
if( Pstream::parRun() )
surfaceFile = ".."/surfaceFile;
surfacePtr_ = new triSurf(db_.path()/surfaceFile);
if( true )
{ {
//- save meta data with the mesh (surface mesh + its topology info) Info << "Here" << endl;
triSurfaceMetaData sMetaData(*surfacePtr_); Info << message << endl;
const dictionary& surfMetaDict = sMetaData.metaData();
mesh_.metaData().add("surfaceFile", surfaceFile, true);
mesh_.metaData().add("surfaceMeta", surfMetaDict, true);
} }
catch(...)
if( surfacePtr_->featureEdges().size() != 0 )
{ {
//- create surface patches based on the feature edges WarningIn
//- and update the meshDict based on the given data (
triSurfacePatchManipulator manipulator(*surfacePtr_); "cartesianMeshGenerator::cartesianMeshGenerator(const Time&)"
) << "Meshing process terminated!" << endl;
const triSurf* surfaceWithPatches =
manipulator.surfaceWithPatches(&meshDict_);
//- delete the old surface and assign the new one
deleteDemandDrivenData(surfacePtr_);
surfacePtr_ = surfaceWithPatches;
} }
if( meshDict_.found("anisotropicSources") )
{
surfaceMeshGeometryModification surfMod(*surfacePtr_, meshDict_);
modSurfacePtr_ = surfMod.modifyGeometry();
octreePtr_ = new meshOctree(*modSurfacePtr_);
}
else
{
octreePtr_ = new meshOctree(*surfacePtr_);
}
meshOctreeCreator(*octreePtr_, meshDict_).createOctreeBoxes();
generateMesh();
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //

View file

@ -28,7 +28,6 @@ Description
#include "tetMeshGenerator.H" #include "tetMeshGenerator.H"
#include "triSurf.H" #include "triSurf.H"
#include "demandDrivenData.H" #include "demandDrivenData.H"
#include "foamTime.H"
#include "meshOctreeCreator.H" #include "meshOctreeCreator.H"
#include "tetMeshExtractorOctree.H" #include "tetMeshExtractorOctree.H"
#include "meshSurfaceEngine.H" #include "meshSurfaceEngine.H"
@ -235,69 +234,55 @@ void tetMeshGenerator::renumberMesh()
void tetMeshGenerator::generateMesh() void tetMeshGenerator::generateMesh()
{ {
try if( controller_.runCurrentStep("templateGeneration") )
{ {
if( controller_.runCurrentStep("templateGeneration") ) createTetMesh();
{
createTetMesh();
}
if( controller_.runCurrentStep("surfaceTopology") )
{
surfacePreparation();
}
if( controller_.runCurrentStep("surfaceProjection") )
{
mapMeshToSurface();
}
if( controller_.runCurrentStep("patchAssignment") )
{
extractPatches();
}
if( controller_.runCurrentStep("edgeExtraction") )
{
mapEdgesAndCorners();
optimiseMeshSurface();
}
if( controller_.runCurrentStep("boundaryLayerGeneration") )
{
generateBoundaryLayers();
}
if( controller_.runCurrentStep("meshOptimisation") )
{
optimiseFinalMesh();
projectSurfaceAfterBackScaling();
}
if( controller_.runCurrentStep("boundaryLayerRefinement") )
{
refBoundaryLayers();
}
renumberMesh();
replaceBoundaries();
controller_.workflowCompleted();
} }
catch(const std::string& message)
if( controller_.runCurrentStep("surfaceTopology") )
{ {
Info << message << endl; surfacePreparation();
} }
catch(...)
if( controller_.runCurrentStep("surfaceProjection") )
{ {
WarningIn mapMeshToSurface();
(
"void tetMeshGenerator::generateMesh()"
) << "Meshing process terminated!" << endl;
} }
if( controller_.runCurrentStep("patchAssignment") )
{
extractPatches();
}
if( controller_.runCurrentStep("edgeExtraction") )
{
mapEdgesAndCorners();
optimiseMeshSurface();
}
if( controller_.runCurrentStep("boundaryLayerGeneration") )
{
generateBoundaryLayers();
}
if( controller_.runCurrentStep("meshOptimisation") )
{
optimiseFinalMesh();
projectSurfaceAfterBackScaling();
}
if( controller_.runCurrentStep("boundaryLayerRefinement") )
{
refBoundaryLayers();
}
renumberMesh();
replaceBoundaries();
controller_.workflowCompleted();
} }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -323,55 +308,69 @@ tetMeshGenerator::tetMeshGenerator(const Time& time)
mesh_(time), mesh_(time),
controller_(mesh_) controller_(mesh_)
{ {
if( true ) try
{ {
checkMeshDict cmd(meshDict_); if( true )
{
checkMeshDict cmd(meshDict_);
}
const fileName surfaceFile = meshDict_.lookup("surfaceFile");
surfacePtr_ = new triSurf(runTime_.path()/surfaceFile);
if( true )
{
//- save meta data with the mesh (surface mesh + its topology info)
triSurfaceMetaData sMetaData(*surfacePtr_);
const dictionary& surfMetaDict = sMetaData.metaData();
mesh_.metaData().add("surfaceFile", surfaceFile, true);
mesh_.metaData().add("surfaceMeta", surfMetaDict, true);
}
if( surfacePtr_->featureEdges().size() != 0 )
{
//- create surface patches based on the feature edges
//- and update the meshDict based on the given data
triSurfacePatchManipulator manipulator(*surfacePtr_);
const triSurf* surfaceWithPatches =
manipulator.surfaceWithPatches(&meshDict_);
//- delete the old surface and assign the new one
deleteDemandDrivenData(surfacePtr_);
surfacePtr_ = surfaceWithPatches;
}
if( meshDict_.found("anisotropicSources") )
{
surfaceMeshGeometryModification surfMod(*surfacePtr_, meshDict_);
modSurfacePtr_ = surfMod.modifyGeometry();
octreePtr_ = new meshOctree(*modSurfacePtr_);
}
else
{
octreePtr_ = new meshOctree(*surfacePtr_);
}
meshOctreeCreator(*octreePtr_, meshDict_).createOctreeBoxes();
generateMesh();
} }
catch(const std::string& message)
const fileName surfaceFile = meshDict_.lookup("surfaceFile");
surfacePtr_ = new triSurf(runTime_.path()/surfaceFile);
if( true )
{ {
//- save meta data with the mesh (surface mesh + its topology info) Info << message << endl;
triSurfaceMetaData sMetaData(*surfacePtr_);
const dictionary& surfMetaDict = sMetaData.metaData();
mesh_.metaData().add("surfaceFile", surfaceFile, true);
mesh_.metaData().add("surfaceMeta", surfMetaDict, true);
} }
catch(...)
if( surfacePtr_->featureEdges().size() != 0 )
{ {
//- create surface patches based on the feature edges WarningIn
//- and update the meshDict based on the given data (
triSurfacePatchManipulator manipulator(*surfacePtr_); "tetMeshGenerator::tetMeshGenerator(const Time&)"
) << "Meshing process terminated!" << endl;
const triSurf* surfaceWithPatches =
manipulator.surfaceWithPatches(&meshDict_);
//- delete the old surface and assign the new one
deleteDemandDrivenData(surfacePtr_);
surfacePtr_ = surfaceWithPatches;
} }
if( meshDict_.found("anisotropicSources") )
{
surfaceMeshGeometryModification surfMod(*surfacePtr_, meshDict_);
modSurfacePtr_ = surfMod.modifyGeometry();
octreePtr_ = new meshOctree(*modSurfacePtr_);
}
else
{
octreePtr_ = new meshOctree(*surfacePtr_);
}
meshOctreeCreator(*octreePtr_, meshDict_).createOctreeBoxes();
generateMesh();
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //

View file

@ -176,7 +176,7 @@ void boxScaling::boundingPlanes(PtrList<plane>&pl) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dictionary boxScaling::dict(bool ignoreType) const dictionary boxScaling::dict(bool /*ignoreType*/) const
{ {
dictionary dict; dictionary dict;

View file

@ -46,7 +46,7 @@ coordinateModification::coordinateModification()
coordinateModification::coordinateModification coordinateModification::coordinateModification
( (
const word& name, const word& name,
const dictionary& dict const dictionary& /*dict*/
) )
: :
name_(name) name_(name)

View file

@ -36,8 +36,6 @@ SourceFiles
#ifndef coordinateModifier_H #ifndef coordinateModifier_H
#define coordinateModifier_H #define coordinateModifier_H
#include "objectRegistry.H"
#include "foamTime.H"
#include "word.H" #include "word.H"
#include "point.H" #include "point.H"
#include "coordinateModificationList.H" #include "coordinateModificationList.H"

View file

@ -153,7 +153,7 @@ void planeScaling::boundingPlanes(PtrList<plane>& pl) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dictionary planeScaling::dict(bool ignoreType) const dictionary planeScaling::dict(bool /*ignoreType*/) const
{ {
dictionary dict; dictionary dict;

View file

@ -35,8 +35,6 @@ SourceFiles
#ifndef boundaryLayers_H #ifndef boundaryLayers_H
#define boundaryLayers_H #define boundaryLayers_H
#include "objectRegistry.H"
#include "foamTime.H"
#include "polyMeshGenModifier.H" #include "polyMeshGenModifier.H"
#include "meshSurfaceEngine.H" #include "meshSurfaceEngine.H"
#include "meshSurfacePartitioner.H" #include "meshSurfacePartitioner.H"

View file

@ -686,7 +686,7 @@ void boundaryLayers::createNewPartitionVerticesParallel
( (
const labelLongList& procPoints, const labelLongList& procPoints,
const List<direction>& pVertices, const List<direction>& pVertices,
const boolList& treatPatches const boolList& /*treatPatches*/
) )
{ {
if( !Pstream::parRun() ) if( !Pstream::parRun() )

View file

@ -374,7 +374,7 @@ void extrudeLayer::createNewVertices()
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo(), procBoundaries[patchI].neiProcNo(),
globalLabels.byteSize() globalLabels.byteSize()
); );
@ -390,7 +390,7 @@ void extrudeLayer::createNewVertices()
labelList receivedData; labelList receivedData;
IPstream fromOtherProc IPstream fromOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo() procBoundaries[patchI].neiProcNo()
); );
@ -498,7 +498,7 @@ void extrudeLayer::createNewVertices()
DynList<label> edgeGroup; DynList<label> edgeGroup;
edgeGroup.setSize(dEdges.size()); edgeGroup.setSize(dEdges.size());
edgeGroup = -1; edgeGroup = label(-1);
//- check edge connections and store all edges which can be reached //- check edge connections and store all edges which can be reached
//- over other edges into the same group //- over other edges into the same group
@ -538,7 +538,7 @@ void extrudeLayer::createNewVertices()
//- find face groups from the groups assigned to dual edges //- find face groups from the groups assigned to dual edges
DynList<label> faceGroups; DynList<label> faceGroups;
faceGroups.setSize(pointFaces.sizeOfRow(pointI)); faceGroups.setSize(pointFaces.sizeOfRow(pointI));
faceGroups = -1; faceGroups = label(-1);
forAllRow(pointFaces, pointI, pfI) forAllRow(pointFaces, pointI, pfI)
{ {
@ -618,7 +618,7 @@ void extrudeLayer::createNewVertices()
//- assign groups to faces and cells //- assign groups to faces and cells
DynList<label> faceGroup; DynList<label> faceGroup;
faceGroup.setSize(pointFaces.sizeOfRow(pointI)); faceGroup.setSize(pointFaces.sizeOfRow(pointI));
faceGroup = -1; faceGroup = label(-1);
label group(0); label group(0);
@ -1114,7 +1114,7 @@ void extrudeLayer::createLayerCells()
//- find labels of points //- find labels of points
DynList<label> origFacePoints; DynList<label> origFacePoints;
origFacePoints.setSize(pointFaces.sizeOfRow(pointI)); origFacePoints.setSize(pointFaces.sizeOfRow(pointI));
origFacePoints = -1; origFacePoints = label(-1);
forAllRow(pointFaces, pointI, pfI) forAllRow(pointFaces, pointI, pfI)
{ {

View file

@ -36,8 +36,6 @@ SourceFiles
#ifndef extrudeLayer_H #ifndef extrudeLayer_H
#define extrudeLayer_H #define extrudeLayer_H
#include "objectRegistry.H"
#include "foamTime.H"
#include "polyMeshGenModifier.H" #include "polyMeshGenModifier.H"
#include "VRWGraphList.H" #include "VRWGraphList.H"
#include "labelPair.H" #include "labelPair.H"

View file

@ -36,8 +36,6 @@ SourceFiles
#ifndef refineBoundaryLayers_H #ifndef refineBoundaryLayers_H
#define refineBoundaryLayers_H #define refineBoundaryLayers_H
#include "objectRegistry.H"
#include "foamTime.H"
#include "polyMeshGenModifier.H" #include "polyMeshGenModifier.H"
#include "meshSurfaceEngine.H" #include "meshSurfaceEngine.H"
#include "DynList.H" #include "DynList.H"

View file

@ -885,7 +885,7 @@ void refineBoundaryLayers::refineCornerHexCell::generateNewPoints()
forAll(cellPoints_[i], j) forAll(cellPoints_[i], j)
{ {
cellPoints_[i][j].setSize(nLayersK_+1); cellPoints_[i][j].setSize(nLayersK_+1);
cellPoints_[i][j] = -1; cellPoints_[i][j] = label(-1);
} }
} }

View file

@ -250,7 +250,7 @@ void refineBoundaryLayers::refineFace
forAll(facePoints, i) forAll(facePoints, i)
{ {
facePoints[i].setSize(nLayersDir1+1); facePoints[i].setSize(nLayersDir1+1);
facePoints[i] = -1; facePoints[i] = label(-1);
} }
//- add points in the matrix //- add points in the matrix
@ -1049,7 +1049,7 @@ void refineBoundaryLayers::generateNewFaces()
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo(), procBoundaries[patchI].neiProcNo(),
sendData.byteSize() sendData.byteSize()
); );
@ -1065,7 +1065,7 @@ void refineBoundaryLayers::generateNewFaces()
IPstream fromOtherProc IPstream fromOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo() procBoundaries[patchI].neiProcNo()
); );

View file

@ -269,7 +269,7 @@ bool refineBoundaryLayers::analyseLayers()
{ {
if( allZMin[patchI] ^ allZMax[patchI] ) if( allZMin[patchI] ^ allZMax[patchI] )
{ {
nLayersAtPatch[patchI] = -1; nLayersAtPatch[patchI] = label(-1);
layerAtPatch_[patchI].clear(); layerAtPatch_[patchI].clear();
} }
} }
@ -599,7 +599,7 @@ void refineBoundaryLayers::generateNewVertices()
//- on edges of the mesh //- on edges of the mesh
DynList<label> numPointsAtThread; DynList<label> numPointsAtThread;
numPointsAtThread.setSize(nThreads); numPointsAtThread.setSize(nThreads);
numPointsAtThread = 0; numPointsAtThread = label(0);
# ifdef USE_OMP # ifdef USE_OMP
# pragma omp parallel for num_threads(nThreads) schedule(static, 1) # pragma omp parallel for num_threads(nThreads) schedule(static, 1)

View file

@ -36,8 +36,6 @@ SourceFiles
#ifndef triangulateNonPlanarBaseFaces_H #ifndef triangulateNonPlanarBaseFaces_H
#define triangulateNonPlanarBaseFaces_H #define triangulateNonPlanarBaseFaces_H
#include "objectRegistry.H"
#include "foamTime.H"
#include "polyMeshGenModifier.H" #include "polyMeshGenModifier.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View file

@ -764,6 +764,54 @@ void checkMeshDict::checkRenameBoundary() const
} }
} }
//Mesh quality criteria specified by the user
void checkMeshDict::checkQualitySettings() const
{
if( meshDict_.found("meshQualitySettings") )
{
const dictionary& qualityDict = meshDict_.subDict("meshQualitySettings");
//- read maximum non-orthogonality defined by the user
if( qualityDict.found("maxNonOrthogonality") )
{
readScalar(qualityDict.lookup("maxNonOrthogonality"));
}
//- read maximum skewness defined by the user
if( qualityDict.found("maxSkewness") )
{
readScalar(qualityDict.lookup("maxSkewness"));
}
//- read minimum volume of the face pyramid defined by the user
if( qualityDict.found("minPyramidVolume") )
{
readScalar(qualityDict.lookup("minPyramidVolume"));
}
//- read face flatness defined by the user
if( qualityDict.found("faceFlatness") )
{
readScalar(qualityDict.lookup("faceFlatness"));
}
//- read minimum tetrahedral part of a cell defined by the user
if( qualityDict.found("minCellPartTetrahedra") )
{
readScalar(qualityDict.lookup("minCellPartTetrahedra"));
}
//- read minimum area of a face defined by the user
if( qualityDict.found("minimumFaceArea") )
{
readScalar(qualityDict.lookup("minimumFaceArea"));
}
}
}
void checkMeshDict::checkEntries() const void checkMeshDict::checkEntries() const
{ {
checkBasicSettings(); checkBasicSettings();
@ -785,6 +833,8 @@ void checkMeshDict::checkEntries() const
checkBoundaryLayers(); checkBoundaryLayers();
checkRenameBoundary(); checkRenameBoundary();
checkQualitySettings();
} }
void checkMeshDict::updatePatchCellSize void checkMeshDict::updatePatchCellSize
@ -860,7 +910,7 @@ void checkMeshDict::updatePatchCellSize
void checkMeshDict::updateSubsetCellSize void checkMeshDict::updateSubsetCellSize
( (
const std::map<word, wordList>& patchesFromPatch const std::map<word, wordList>& /*patchesFromPatch*/
) )
{ {
@ -1028,7 +1078,7 @@ void checkMeshDict::updateRemoveCellsIntersectingPatches
void checkMeshDict::updateObjectRefinements void checkMeshDict::updateObjectRefinements
( (
const std::map<word, wordList>& patchesFromPatch const std::map<word, wordList>& /*patchesFromPatch*/
) )
{ {

View file

@ -35,8 +35,6 @@ SourceFiles
#ifndef checkMeshDict_H #ifndef checkMeshDict_H
#define checkMeshDict_H #define checkMeshDict_H
#include "objectRegistry.H"
#include "foamTime.H"
#include "IOdictionary.H" #include "IOdictionary.H"
#include <map> #include <map>
@ -92,6 +90,9 @@ class checkMeshDict
//- check renameBoundary entry //- check renameBoundary entry
void checkRenameBoundary() const; void checkRenameBoundary() const;
//- check entry for mesh quality
void checkQualitySettings() const;
//- perform all checks //- perform all checks
void checkEntries() const; void checkEntries() const;

View file

@ -29,9 +29,11 @@ License
// Construct from Istream // Construct from Istream
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
Foam::DynList<T, staticSize>::DynList(Istream& is) Foam::DynList<T, staticSize>::DynList(Istream&)
: :
UList<T>(), dataPtr_(nullptr),
nAllocated_(0),
staticData_(),
nextFree_(0) nextFree_(0)
{ {
FatalErrorIn FatalErrorIn
@ -39,11 +41,6 @@ Foam::DynList<T, staticSize>::DynList(Istream& is)
"template<class T, Foam::label staticSize>" "template<class T, Foam::label staticSize>"
"\nFoam::DynList<T, staticSize>::DynList(Istream& is)" "\nFoam::DynList<T, staticSize>::DynList(Istream& is)"
) << "Not implemented" << exit(FatalError); ) << "Not implemented" << exit(FatalError);
List<T> helper(is);
nextFree_ = helper.size();
UList<T>::swap(helper);
} }
@ -54,7 +51,7 @@ Foam::Ostream& Foam::operator<<
const Foam::DynList<T, staticSize>& DL const Foam::DynList<T, staticSize>& DL
) )
{ {
UList<T> helper(const_cast<T*>(DL.begin()), DL.nextFree_); UList<T> helper(DL.dataPtr_, DL.nextFree_);
os << helper; os << helper;
return os; return os;
@ -75,8 +72,10 @@ Foam::Istream& Foam::operator>>
"(Foam::Istream& is, Foam::DynList<T, staticSize>& DL)" "(Foam::Istream& is, Foam::DynList<T, staticSize>& DL)"
) << "Not implemented" << exit(FatalError); ) << "Not implemented" << exit(FatalError);
is >> static_cast<List<T>&>(DL); UList<T> helper(DL.dataPtr_, DL.nextFree_);
DL.nextFree_ = DL.List<T>::size(); //is >> static_cast<List<T>&>(DL);
is >> helper;
DL.nextFree_ = helper.size();
return is; return is;
} }

View file

@ -73,10 +73,14 @@ Istream& operator>>
template<class T, label staticSize = 16> template<class T, label staticSize = 16>
class DynList class DynList
:
public UList<T>
{ {
// Private data // Private data
//- pointer to the data
T* dataPtr_;
//- size of the allocated data
label nAllocated_;
//- statically allocated data (used for short lists) //- statically allocated data (used for short lists)
T staticData_[staticSize]; T staticData_[staticSize];
@ -84,12 +88,21 @@ class DynList
label nextFree_; label nextFree_;
// Private member functions // Private member functions
//- access to the data pointer
inline T* data();
//- const access to the data pointer
inline const T* data() const;
//- allocate list size //- allocate list size
inline void allocateSize(const label); inline void allocateSize(const label);
//- check if index is inside the scope (used for debugging only) //- check if index is inside the scope (used for debugging only)
inline void checkIndex(const label) const; inline void checkIndex(const label) const;
//- check if nAllocated_ is greater or equal to nextFree_
inline void checkAllocation() const;
public: public:
// Constructors // Constructors
@ -100,6 +113,11 @@ public:
//- Construct given size //- Construct given size
explicit inline DynList(const label); explicit inline DynList(const label);
#if WM_LABEL_SIZE == 64
//- Construct given size
explicit inline DynList(const int);
#endif
//- Construct from given size and defualt value //- Construct from given size and defualt value
explicit inline DynList(const label, const T&); explicit inline DynList(const label, const T&);
@ -205,6 +223,10 @@ public:
template<class ListType> template<class ListType>
inline void operator=(const ListType&); inline void operator=(const ListType&);
//- Compare the list with the another one
inline bool operator==(const DynList<T, staticSize>&) const;
inline bool operator!=(const DynList<T, staticSize>&) const;
// IOstream operators // IOstream operators

View file

@ -23,48 +23,66 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class T, Foam::label staticSize>
inline T* Foam::DynList<T, staticSize>::data()
{
return dataPtr_;
}
template<class T, Foam::label staticSize>
inline const T* Foam::DynList<T, staticSize>::data() const
{
return dataPtr_;
}
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
inline void Foam::DynList<T, staticSize>::allocateSize(const label s) inline void Foam::DynList<T, staticSize>::allocateSize(const label s)
{ {
if( s > UList<T>::size() ) checkAllocation();
if( s > staticSize )
{ {
T* newData = new T[s]; if( s > nAllocated_ )
{
//- allocates enough space for the elements
T* newData = new T[s];
for(label i=0;i<nextFree_;++i) for(label i=0;i<nextFree_;++i)
newData[i] = this->operator[](i); newData[i] = this->operator[](i);
T* data = UList<T>::begin(); if( nAllocated_ > staticSize )
if( data && (data != staticData_) ) delete [] dataPtr_;
delete [] data;
//UList<T>::reset(newData, s); dataPtr_ = newData;
this->UList<T>::operator=(UList<T>(newData, s)); nAllocated_ = s;
}
else if( s < nAllocated_ )
{
//- shrinks the list
T* newData = new T[s];
for(label i=0;i<s;++i)
newData[i] = this->operator[](i);
delete [] dataPtr_;
dataPtr_ = newData;
nAllocated_ = s;
}
} }
else if( (s > staticSize) && (s < UList<T>::size()) ) else
{ {
T* newData = new T[s]; if( nAllocated_ > staticSize )
{
//- delete dynamically allocated data
for(label i=0;i<s;++i)
staticData_[i] = dataPtr_[i];
for(label i=0;i<s;++i) delete [] dataPtr_;
newData[i] = this->operator[](i); }
T* data = UList<T>::begin(); dataPtr_ = staticData_;
delete [] data; nAllocated_ = staticSize;
//UList<T>::reset(newData, s);
this->UList<T>::operator=(UList<T>(newData, s));
}
else if( (s <= staticSize) && (UList<T>::size() > staticSize) )
{
for(label i=0;i<s;++i)
staticData_[i] = UList<T>::operator[](i);
T* data = UList<T>::begin();
if( data && (data != staticData_) )
delete [] data;
//UList<T>::reset(staticData_, staticSize);
this->UList<T>::operator=(UList<T>(staticData_, staticSize));
} }
} }
@ -82,60 +100,124 @@ inline void Foam::DynList<T, staticSize>::checkIndex(const label i) const
} }
} }
template<class T, Foam::label staticSize>
inline void Foam::DynList<T, staticSize>::checkAllocation() const
{
if( nextFree_ > nAllocated_ )
FatalErrorIn
(
"template<class T, Foam::label staticSize> "
"inline void Foam::DynList<T, staticSize>::"
"checkAllocation() const"
) << "nextFree_ is out of scope 0 " << " and " << nAllocated_
<< abort(FatalError);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
//- Construct null //- Construct null
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
inline Foam::DynList<T, staticSize>::DynList() inline Foam::DynList<T, staticSize>::DynList()
: :
UList<T>(staticData_, staticSize), dataPtr_(nullptr),
nAllocated_(0),
staticData_(),
nextFree_(0) nextFree_(0)
{} {
setSize(0);
# ifdef DEBUG
checkAllocation();
# endif
}
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
inline Foam::DynList<T, staticSize>::DynList(const label s) inline Foam::DynList<T, staticSize>::DynList(const label s)
: :
UList<T>(staticData_, staticSize), dataPtr_(nullptr),
nAllocated_(0),
staticData_(),
nextFree_(0) nextFree_(0)
{ {
setSize(s); setSize(s);
# ifdef DEBUG
checkAllocation();
# endif
} }
#if WM_LABEL_SIZE == 64
template<class T, Foam::label staticSize>
inline Foam::DynList<T, staticSize>::DynList(const int s)
:
dataPtr_(nullptr),
nAllocated_(0),
staticData_(),
nextFree_(0)
{
setSize(s);
# ifdef DEBUG
checkAllocation();
# endif
}
#endif
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
inline Foam::DynList<T, staticSize>::DynList(const label s, const T& val) inline Foam::DynList<T, staticSize>::DynList(const label s, const T& val)
: :
UList<T>(staticData_, staticSize), dataPtr_(nullptr),
nAllocated_(0),
staticData_(),
nextFree_(0) nextFree_(0)
{ {
setSize(s); setSize(s);
for(label i=0;i<s;++i) for(label i=0;i<s;++i)
this->operator[](i) = val; this->operator[](i) = val;
# ifdef DEBUG
checkAllocation();
# endif
} }
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
inline Foam::DynList<T, staticSize>::DynList(const UList<T>& ul) inline Foam::DynList<T, staticSize>::DynList(const UList<T>& ul)
: :
UList<T>(staticData_, staticSize), dataPtr_(nullptr),
nAllocated_(0),
staticData_(),
nextFree_(0) nextFree_(0)
{ {
setSize(ul.size()); setSize(ul.size());
forAll(ul, i) forAll(ul, i)
this->operator[](i) = ul[i]; this->operator[](i) = ul[i];
# ifdef DEBUG
checkAllocation();
# endif
} }
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
template<class ListType> template<class ListType>
inline Foam::DynList<T, staticSize>::DynList(const ListType& l) inline Foam::DynList<T, staticSize>::DynList(const ListType& l)
: :
UList<T>(staticData_, staticSize), dataPtr_(nullptr),
nAllocated_(0),
staticData_(),
nextFree_(0) nextFree_(0)
{ {
setSize(l.size()); setSize(l.size());
for(label i=0;i<nextFree_;++i) for(label i=0;i<nextFree_;++i)
this->operator[](i) = l[i]; this->operator[](i) = l[i];
# ifdef DEBUG
checkAllocation();
# endif
} }
//- Copy construct //- Copy construct
@ -145,19 +227,24 @@ inline Foam::DynList<T, staticSize>::DynList
const DynList<T, staticSize>& dl const DynList<T, staticSize>& dl
) )
: :
UList<T>(staticData_, staticSize), dataPtr_(nullptr),
nAllocated_(0),
staticData_(),
nextFree_(0) nextFree_(0)
{ {
setSize(dl.size()); setSize(dl.size());
for(label i=0;i<nextFree_;++i) for(label i=0;i<nextFree_;++i)
this->operator[](i) = dl[i]; this->operator[](i) = dl[i];
# ifdef DEBUG
checkAllocation();
# endif
} }
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
inline Foam::DynList<T, staticSize>::~DynList() inline Foam::DynList<T, staticSize>::~DynList()
{ {
allocateSize(0); allocateSize(0);
//UList<T>::reset(nullptr, 0);
} }
@ -166,12 +253,20 @@ inline Foam::DynList<T, staticSize>::~DynList()
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
inline Foam::label Foam::DynList<T, staticSize>::size() const inline Foam::label Foam::DynList<T, staticSize>::size() const
{ {
# ifdef DEBUG
checkAllocation();
# endif
return nextFree_; return nextFree_;
} }
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
inline Foam::label Foam::DynList<T, staticSize>::byteSize() const inline Foam::label Foam::DynList<T, staticSize>::byteSize() const
{ {
# ifdef DEBUG
checkAllocation();
# endif
if( !contiguous<T>() ) if( !contiguous<T>() )
{ {
FatalErrorIn("DynList<T>::byteSize()") FatalErrorIn("DynList<T>::byteSize()")
@ -181,20 +276,31 @@ inline Foam::label Foam::DynList<T, staticSize>::byteSize() const
} }
return nextFree_*sizeof(T); return nextFree_*sizeof(T);
} }
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
inline void Foam::DynList<T, staticSize>::setSize(const label s) inline void Foam::DynList<T, staticSize>::setSize(const label s)
{ {
# ifdef DEBUG
checkAllocation();
# endif
allocateSize(s); allocateSize(s);
nextFree_ = s; nextFree_ = s;
# ifdef DEBUG
checkAllocation();
# endif
} }
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
inline void Foam::DynList<T, staticSize>::clear() inline void Foam::DynList<T, staticSize>::clear()
{ {
# ifdef DEBUG
checkAllocation();
# endif
nextFree_ = 0; nextFree_ = 0;
} }
@ -202,34 +308,62 @@ inline void Foam::DynList<T, staticSize>::clear()
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
void Foam::DynList<T, staticSize>::shrink() void Foam::DynList<T, staticSize>::shrink()
{ {
# ifdef DEBUG
checkAllocation();
# endif
allocateSize(nextFree_); allocateSize(nextFree_);
# ifdef DEBUG
checkAllocation();
# endif
} }
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
inline void Foam::DynList<T, staticSize>::append(const T& e) inline void Foam::DynList<T, staticSize>::append(const T& e)
{ {
if( nextFree_ >= UList<T>::size() ) # ifdef DEBUG
checkAllocation();
# endif
if( nextFree_ >= nAllocated_ )
{ {
const label newSize = 2*UList<T>::size()+2; const label newSize = 2*nAllocated_+2;
allocateSize(newSize); allocateSize(newSize);
} }
UList<T>::operator[](nextFree_++) = e; # ifdef DEBUG
checkAllocation();
# endif
this->operator[](nextFree_++) = e;
} }
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
inline void Foam::DynList<T, staticSize>::appendIfNotIn(const T& e) inline void Foam::DynList<T, staticSize>::appendIfNotIn(const T& e)
{ {
# ifdef DEBUG
checkAllocation();
# endif
if( !contains(e) ) if( !contains(e) )
append(e); append(e);
# ifdef DEBUG
checkAllocation();
# endif
} }
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
inline bool Foam::DynList<T, staticSize>::contains(const T& e) const inline bool Foam::DynList<T, staticSize>::contains(const T& e) const
{ {
# ifdef DEBUG
checkAllocation();
# endif
for(label i=0;i<nextFree_;++i) for(label i=0;i<nextFree_;++i)
{ {
if( UList<T>::operator[](i) == e ) if( this->operator[](i) == e )
return true; return true;
} }
@ -242,9 +376,13 @@ inline Foam::label Foam::DynList<T, staticSize>::containsAtPosition
const T& e const T& e
) const ) const
{ {
# ifdef DEBUG
checkAllocation();
# endif
for(label i=0;i<nextFree_;++i) for(label i=0;i<nextFree_;++i)
{ {
if( UList<T>::operator[](i) == e ) if( this->operator[](i) == e )
return i; return i;
} }
@ -254,12 +392,20 @@ inline Foam::label Foam::DynList<T, staticSize>::containsAtPosition
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
inline const T& Foam::DynList<T, staticSize>::lastElement() const inline const T& Foam::DynList<T, staticSize>::lastElement() const
{ {
# ifdef DEBUG
checkAllocation();
# endif
return this->operator[](nextFree_-1); return this->operator[](nextFree_-1);
} }
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
inline T Foam::DynList<T, staticSize>::removeLastElement() inline T Foam::DynList<T, staticSize>::removeLastElement()
{ {
# ifdef DEBUG
checkAllocation();
# endif
if( nextFree_ == 0 ) if( nextFree_ == 0 )
{ {
FatalErrorIn FatalErrorIn
@ -268,13 +414,18 @@ inline T Foam::DynList<T, staticSize>::removeLastElement()
) << "List is empty" << abort(FatalError); ) << "List is empty" << abort(FatalError);
} }
T el = UList<T>::operator[](--nextFree_); T el = this->operator[](nextFree_-1);
--nextFree_;
return el; return el;
} }
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
inline T Foam::DynList<T, staticSize>::removeElement(const label i) inline T Foam::DynList<T, staticSize>::removeElement(const label i)
{ {
# ifdef DEBUG
checkAllocation();
# endif
if( nextFree_ == 0 ) if( nextFree_ == 0 )
{ {
FatalErrorIn FatalErrorIn
@ -287,12 +438,20 @@ inline T Foam::DynList<T, staticSize>::removeElement(const label i)
this->operator[](i) = this->operator[](nextFree_-1); this->operator[](i) = this->operator[](nextFree_-1);
--nextFree_; --nextFree_;
# ifdef DEBUG
checkAllocation();
# endif
return el; return el;
} }
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
inline T& Foam::DynList<T, staticSize>::newElmt(const label i) inline T& Foam::DynList<T, staticSize>::newElmt(const label i)
{ {
# ifdef DEBUG
checkAllocation();
# endif
return this->operator()(i); return this->operator()(i);
} }
@ -301,13 +460,21 @@ inline T& Foam::DynList<T, staticSize>::newElmt(const label i)
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
inline T& Foam::DynList<T, staticSize>::operator()(const label i) inline T& Foam::DynList<T, staticSize>::operator()(const label i)
{ {
# ifdef DEBUG
checkAllocation();
# endif
nextFree_ = Foam::max(nextFree_, i + 1); nextFree_ = Foam::max(nextFree_, i + 1);
if( nextFree_ >= UList<T>::size() ) if( nextFree_ >= nAllocated_ )
{ {
allocateSize(2 * nextFree_+1); allocateSize(2 * nextFree_+1);
} }
# ifdef DEBUG
checkAllocation();
# endif
return this->operator[](i); return this->operator[](i);
} }
@ -315,20 +482,22 @@ template<class T, Foam::label staticSize>
inline const T& Foam::DynList<T, staticSize>::operator[](const label i) const inline const T& Foam::DynList<T, staticSize>::operator[](const label i) const
{ {
# ifdef FULLDEBUG # ifdef FULLDEBUG
checkAllocation();
checkIndex(i); checkIndex(i);
# endif # endif
return UList<T>::operator[](i); return dataPtr_[i];
} }
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
inline T& Foam::DynList<T, staticSize>::operator[](const label i) inline T& Foam::DynList<T, staticSize>::operator[](const label i)
{ {
# ifdef FULLDEBUG # ifdef FULLDEBUG
checkAllocation();
checkIndex(i); checkIndex(i);
# endif # endif
return UList<T>::operator[](i); return dataPtr_[i];
} }
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
@ -374,7 +543,12 @@ inline const T& Foam::DynList<T, staticSize>::rcElement
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
inline void Foam::DynList<T, staticSize>::operator=(const T& t) inline void Foam::DynList<T, staticSize>::operator=(const T& t)
{ {
UList<T>::operator=(t); # ifdef DEBUG
checkAllocation();
# endif
for(label i=0;i<nextFree_;++i)
operator[](i) = t;
} }
template<class T, Foam::label staticSize> template<class T, Foam::label staticSize>
@ -383,9 +557,17 @@ inline void Foam::DynList<T, staticSize>::operator=
const DynList<T, staticSize>& dl const DynList<T, staticSize>& dl
) )
{ {
# ifdef DEBUG
checkAllocation();
# endif
allocateSize(dl.size()); allocateSize(dl.size());
nextFree_ = dl.size(); nextFree_ = dl.size();
# ifdef DEBUG
checkAllocation();
# endif
for(label i=0;i<nextFree_;++i) for(label i=0;i<nextFree_;++i)
this->operator[](i) = dl[i]; this->operator[](i) = dl[i];
} }
@ -394,12 +576,45 @@ template<class T, Foam::label staticSize>
template<class ListType> template<class ListType>
inline void Foam::DynList<T, staticSize>::operator=(const ListType& l) inline void Foam::DynList<T, staticSize>::operator=(const ListType& l)
{ {
# ifdef DEBUG
checkAllocation();
# endif
allocateSize(l.size()); allocateSize(l.size());
nextFree_ = l.size(); nextFree_ = l.size();
# ifdef DEBUG
checkAllocation();
# endif
for(label i=0;i<nextFree_;++i) for(label i=0;i<nextFree_;++i)
this->operator[](i) = l[i]; this->operator[](i) = l[i];
} }
template<class T, Foam::label staticSize>
inline bool Foam::DynList<T, staticSize>::operator==
(
const DynList<T, staticSize>& DL
) const
{
if( nextFree_ != DL.nextFree_ )
return false;
forAll(DL, i)
if( this->operator[](i) != DL[i] )
return false;
return true;
}
template<class T, Foam::label staticSize>
inline bool Foam::DynList<T, staticSize>::operator!=
(
const DynList<T, staticSize>& DL
) const
{
return !operator==(DL);
}
// ************************************************************************* // // ************************************************************************* //

View file

@ -34,15 +34,34 @@ Foam::Ostream& Foam::operator<<
const Foam::FRWGraph<T, width>& DL const Foam::FRWGraph<T, width>& DL
) )
{ {
os << DL.size() << "(" << endl; os << DL.size() << "(" << nl;
for(register label i=0;i<DL.size();++i)
for(label i=0;i<DL.size();++i)
{ {
os << width << "("; os << width << "(";
for(label j=0;j<width;++j) for(label j=0;j<width;++j)
os << DL(i, j) << " " << endl; {
os << ")" << endl; if( j )
{
os << " ";
}
os << DL(i, j);
}
os << ")" << nl;
} }
os << ")"; os << ")";
// Check state of IOstream
os.check
(
"template<class T, Foam::label width>Foam::Ostream& Foam::operator<<"
"(Foam::Ostream& os, const Foam::FRWGraph<T, width>&)"
);
return os; return os;
} }

View file

@ -105,7 +105,7 @@ inline Foam::label Foam::FRWGraph<T,width>::size() const
} }
template<class T, Foam::label width> template<class T, Foam::label width>
inline Foam::label Foam::FRWGraph<T,width>::sizeOfRow(const label rowI) const inline Foam::label Foam::FRWGraph<T,width>::sizeOfRow(const label) const
{ {
return width; return width;
} }
@ -155,7 +155,8 @@ inline bool Foam::FRWGraph<T,width>::contains
) const ) const
{ {
const label start = rowI * width; const label start = rowI * width;
for(register label i=0;i<width;++i)
for(label i=0;i<width;++i)
if( data_[start+i] == e ) if( data_[start+i] == e )
return true; return true;
@ -170,7 +171,8 @@ inline Foam::label Foam::FRWGraph<T,width>::containsAtPosition
) const ) const
{ {
const label start = rowI * width; const label start = rowI * width;
for(register label i=0;i<width;++i)
for(label i=0;i<width;++i)
if( data_[start+i] == e ) if( data_[start+i] == e )
return i; return i;

View file

@ -46,7 +46,6 @@ IODynList<T, IndexType>::IODynList(const IOobject& io)
( (
io.readOpt() == IOobject::MUST_READ io.readOpt() == IOobject::MUST_READ
|| (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|| (io.readOpt() == IOobject::READ_IF_PRESENT_IF_MODIFIED && headerOk())
) )
{ {
readStream(typeName) >> *this; readStream(typeName) >> *this;
@ -77,11 +76,7 @@ IODynList<T, IndexType>::IODynList
regIOobject(io), regIOobject(io),
DynList<T, IndexType>() DynList<T, IndexType>()
{ {
if if (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
(
(io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|| (io.readOpt() == IOobject::READ_IF_PRESENT_IF_MODIFIED && headerOk())
)
{ {
readStream(typeName) >> *this; readStream(typeName) >> *this;
close(); close();

View file

@ -46,7 +46,6 @@ IOLongList<T, Offset>::IOLongList(const IOobject& io)
( (
io.readOpt() == IOobject::MUST_READ io.readOpt() == IOobject::MUST_READ
|| (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|| (io.readOpt() == IOobject::READ_IF_PRESENT_IF_MODIFIED && headerOk())
) )
{ {
readStream(typeName) >> *this; readStream(typeName) >> *this;
@ -77,11 +76,7 @@ IOLongList<T, Offset>::IOLongList
regIOobject(io), regIOobject(io),
LongList<T, Offset>() LongList<T, Offset>()
{ {
if if (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
(
(io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|| (io.readOpt() == IOobject::READ_IF_PRESENT_IF_MODIFIED && headerOk())
)
{ {
readStream(typeName) >> *this; readStream(typeName) >> *this;
close(); close();

View file

@ -202,7 +202,7 @@ Foam::Istream& Foam::operator>>
if( listDelimiter == token::BEGIN_LIST ) if( listDelimiter == token::BEGIN_LIST )
{ {
for(register label i=0;i<size;++i) for(label i=0;i<size;++i)
{ {
is >> DL[i]; is >> DL[i];
@ -223,7 +223,7 @@ Foam::Istream& Foam::operator>>
"reading the single entry" "reading the single entry"
); );
for(register label i=0;i<size;++i) for(label i=0;i<size;++i)
{ {
DL[i] = element; DL[i] = element;
} }
@ -306,7 +306,7 @@ void Foam::LongList<T, Offset>::appendFromStream(Istream& is)
if( listDelimiter == token::BEGIN_LIST ) if( listDelimiter == token::BEGIN_LIST )
{ {
for(register label i=0;i<size;++i) for(label i=0;i<size;++i)
{ {
is >> this->operator[](origSize); is >> this->operator[](origSize);
++origSize; ++origSize;
@ -328,7 +328,7 @@ void Foam::LongList<T, Offset>::appendFromStream(Istream& is)
"reading the single entry" "reading the single entry"
); );
for(register label i=0;i<size;++i) for(label i=0;i<size;++i)
{ {
this->operator[](origSize) = element; this->operator[](origSize) = element;
++origSize; ++origSize;
@ -346,31 +346,6 @@ void Foam::LongList<T, Offset>::appendFromStream(Istream& is)
forAll(buf, i) forAll(buf, i)
this->operator[](origSize++) = buf[i]; this->operator[](origSize++) = buf[i];
/*const label blockSize = 1<<shift_;
Info << "nextFree_ " << nextFree_ << endl;
//- append elements by reading binary block
while( origSize < nextFree_ )
{
const label currBlock = origSize >> shift_;
const label currPos = origSize & mask_;
Info << "Orig size " << origSize
<< nl << "currBlock " << currBlock
<< nl << "currPos " << currPos << endl;
T* data = &dataPtr_[currBlock][currPos];
label bs = Foam::min(nextFree_-origSize, blockSize);
bs = Foam::min(blockSize - currPos, bs);
Info << "bs " << bs << endl;
is.read(reinterpret_cast<char*>(data), bs * sizeof(T));
origSize += bs;
} */
is.fatalCheck is.fatalCheck
( (
"appendFromStream(Istream& is)" "appendFromStream(Istream& is)"

View file

@ -78,7 +78,7 @@ inline void Foam::LongList<T, Offset>::allocateSize(const label s)
if( numblock1 < numBlocks_ ) if( numblock1 < numBlocks_ )
{ {
for(register label i=numblock1;i<numBlocks_;++i) for(label i=numblock1;i<numBlocks_;++i)
delete [] dataPtr_[i]; delete [] dataPtr_[i];
} }
else if( numblock1 > numBlocks_ ) else if( numblock1 > numBlocks_ )
@ -91,7 +91,8 @@ inline void Foam::LongList<T, Offset>::allocateSize(const label s)
} while( numblock1 > numAllocatedBlocks_ ); } while( numblock1 > numAllocatedBlocks_ );
T** dataptr1 = new T*[numAllocatedBlocks_]; T** dataptr1 = new T*[numAllocatedBlocks_];
for(register label i=0;i<numBlocks_;++i)
for(label i=0;i<numBlocks_;++i)
dataptr1[i] = dataPtr_[i]; dataptr1[i] = dataPtr_[i];
if( dataPtr_ ) if( dataPtr_ )
@ -99,7 +100,7 @@ inline void Foam::LongList<T, Offset>::allocateSize(const label s)
dataPtr_ = dataptr1; dataPtr_ = dataptr1;
} }
for(register label i=numBlocks_;i<numblock1;++i) for(label i=numBlocks_;i<numblock1;++i)
dataPtr_[i] = new T[blockSize]; dataPtr_[i] = new T[blockSize];
} }
@ -110,7 +111,7 @@ inline void Foam::LongList<T, Offset>::allocateSize(const label s)
template<class T, Foam::label Offset> template<class T, Foam::label Offset>
void Foam::LongList<T, Offset>::clearOut() void Foam::LongList<T, Offset>::clearOut()
{ {
for(register label i=0;i<numBlocks_;++i) for(label i=0;i<numBlocks_;++i)
delete [] dataPtr_[i]; delete [] dataPtr_[i];
if( dataPtr_ ) if( dataPtr_ )
@ -281,7 +282,7 @@ inline void Foam::LongList<T, Offset>::appendIfNotIn(const T& e)
template<class T, Foam::label Offset> template<class T, Foam::label Offset>
inline bool Foam::LongList<T, Offset>::contains(const T& e) const inline bool Foam::LongList<T, Offset>::contains(const T& e) const
{ {
for(register label i=0;i<nextFree_;++i) for(label i=0;i<nextFree_;++i)
if( (*this)[i] == e ) if( (*this)[i] == e )
return true; return true;
@ -294,7 +295,7 @@ inline Foam::label Foam::LongList<T, Offset>::containsAtPosition
const T& e const T& e
) const ) const
{ {
for(register label i=0;i<nextFree_;++i) for(label i=0;i<nextFree_;++i)
if( (*this)[i] == e ) if( (*this)[i] == e )
return i; return i;
@ -376,7 +377,7 @@ inline T& Foam::LongList<T, Offset>::newElmt(const label i)
template<class T, Foam::label Offset> template<class T, Foam::label Offset>
inline void Foam::LongList<T, Offset>::operator=(const T& t) inline void Foam::LongList<T, Offset>::operator=(const T& t)
{ {
for(register label i=0;i<nextFree_;++i) for(label i=0;i<nextFree_;++i)
operator[](i) = t; operator[](i) = t;
} }
@ -384,7 +385,8 @@ template<class T, Foam::label Offset>
inline void Foam::LongList<T, Offset>::operator=(const LongList<T, Offset>& l) inline void Foam::LongList<T, Offset>::operator=(const LongList<T, Offset>& l)
{ {
setSize(l.size()); setSize(l.size());
for(register label i=0;i<l.nextFree_;++i)
for(label i=0;i<l.nextFree_;++i)
operator[](i) = l[i]; operator[](i) = l[i];
} }

View file

@ -35,22 +35,29 @@ Foam::Ostream& Foam::operator<<
const Foam::VRWGraph& DL const Foam::VRWGraph& DL
) )
{ {
os << DL.size() << nl << token::BEGIN_LIST; os << DL.size() << nl << token::BEGIN_LIST << nl;
for(register label i=0;i<DL.size();++i) for(label i=0;i<DL.size();++i)
{ {
os << nl << DL.sizeOfRow(i) << token::BEGIN_LIST; os << DL.sizeOfRow(i) << token::BEGIN_LIST;
for(label j=0;j<DL.sizeOfRow(i);++j) for(label j=0;j<DL.sizeOfRow(i);++j)
{ {
if( j > 0 ) os << token::SPACE; if( j ) os << token::SPACE;
os << DL(i, j); os << DL(i, j);
} }
os << token::END_LIST; os << token::END_LIST << nl;
} }
os << nl << token::END_LIST; os << token::END_LIST;
// Check state of IOstream
os.check
(
"Foam::Ostream& Foam::operator<<(Foam::Ostream&, const Foam::VRWGraph&)"
);
return os; return os;
} }

View file

@ -48,6 +48,7 @@ SourceFiles
namespace Foam namespace Foam
{ {
// Forward declaration of classes
class VRWGraphModifier; class VRWGraphModifier;
class rowElement class rowElement
@ -95,6 +96,12 @@ class rowElement
} }
}; };
// Forward declaration of friend functions and operators
class VRWGraph;
Ostream& operator<<(Ostream&, const VRWGraph&);
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class VRWGraph Declaration Class VRWGraph Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View file

@ -518,7 +518,7 @@ inline bool Foam::VRWGraph::contains
return false; return false;
const label size = rows_[rowI].size(); const label size = rows_[rowI].size();
for(register label i=0;i<size;++i) for(label i=0;i<size;++i)
if( data_[start+i] == e ) if( data_[start+i] == e )
return true; return true;
@ -536,7 +536,8 @@ inline Foam::label Foam::VRWGraph::containsAtPosition
return -1; return -1;
const label size = rows_[rowI].size(); const label size = rows_[rowI].size();
for(register label i=0;i<size;++i)
for(label i=0;i<size;++i)
if( data_[start+i] == e ) if( data_[start+i] == e )
return i; return i;

View file

@ -37,12 +37,20 @@ Foam::Ostream& Foam::operator<<
{ {
os << DL.size() << nl << token::BEGIN_LIST; os << DL.size() << nl << token::BEGIN_LIST;
for(register label i=0;i<DL.size();++i) for(label i=0;i<DL.size();++i)
{ {
os << nl << DL[i]; os << nl << DL[i];
} }
os << nl << token::END_LIST; os << nl << token::END_LIST;
// Check state of IOstream
os.check
(
"Foam::Ostream& Foam::operator<<"
"(Foam::Ostream&, const Foam::VRWGraphList&)"
);
return os; return os;
} }

View file

@ -45,6 +45,12 @@ SourceFiles
namespace Foam namespace Foam
{ {
// Forward declaration of friend functions and operators
class VRWGraphList;
Ostream& operator<<(Ostream&, const VRWGraphList&);
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class VRWGraphList Declaration Class VRWGraphList Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View file

@ -26,8 +26,6 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "objectRegistry.H"
#include "foamTime.H"
#include "polyMeshGen.H" #include "polyMeshGen.H"
#include "meshSurfaceEngine.H" #include "meshSurfaceEngine.H"
#include "OFstream.H" #include "OFstream.H"

View file

@ -117,7 +117,7 @@ void decomposeCells::checkFaceConnections(const boolList& decomposeCell)
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo(), procBoundaries[patchI].neiProcNo(),
decFace.byteSize() decFace.byteSize()
); );
@ -132,7 +132,7 @@ void decomposeCells::checkFaceConnections(const boolList& decomposeCell)
IPstream fromOtherProc IPstream fromOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo() procBoundaries[patchI].neiProcNo()
); );
@ -162,7 +162,7 @@ void decomposeCells::createPointsAndCellFaces(const boolList& decomposeCell)
} }
} }
void decomposeCells::storeBoundaryFaces(const boolList& decomposeCell) void decomposeCells::storeBoundaryFaces(const boolList& /*decomposeCell*/)
{ {
meshSurfaceEngine mse(mesh_); meshSurfaceEngine mse(mesh_);
const faceList::subList& bFaces = mse.boundaryFaces(); const faceList::subList& bFaces = mse.boundaryFaces();

View file

@ -23,7 +23,7 @@ License
Description Description
\*----------------------p-----------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "decomposeCells.H" #include "decomposeCells.H"
#include "helperFunctions.H" #include "helperFunctions.H"
@ -55,8 +55,10 @@ void decomposeCells::findAddressingForCell
const faceListPMG& faces = mesh_.faces(); const faceListPMG& faces = mesh_.faces();
forAll(faceEdges, feI) forAll(faceEdges, feI)
{ {
faceEdges[feI].setSize(faces[c[feI]].size()); DynList<label, 8>& fEdges = faceEdges[feI];
faceEdges[feI] = -1;
fEdges.setSize(faces[c[feI]].size());
fEdges = label(-1);
} }
forAll(c, fI) forAll(c, fI)
@ -127,9 +129,9 @@ void decomposeCells::findAddressingForCell
label decomposeCells::findTopVertex label decomposeCells::findTopVertex
( (
const label cellI, const label cellI,
const DynList<label, 32>& vrt, const DynList<label, 32>& /*vrt*/,
const DynList<edge, 64>& edges, const DynList<edge, 64>& /*edges*/,
const DynList<DynList<label, 2>, 64>& edgeFaces const DynList<DynList<label, 2>, 64>& /*edgeFaces*/
) )
{ {
const cell& c = mesh_.cells()[cellI]; const cell& c = mesh_.cells()[cellI];

View file

@ -370,7 +370,7 @@ void decomposeFaces::decomposeConcaveInternalFaces
# endif # endif
//- decompose internal faces //- decompose internal faces
for(register label faceI=0;faceI<nIntFaces;++faceI) for(label faceI=0;faceI<nIntFaces;++faceI)
{ {
const face& f = faces[faceI]; const face& f = faces[faceI];

View file

@ -26,6 +26,7 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "quadricFitting.H" #include "quadricFitting.H"
#include "helperFunctions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -48,11 +49,15 @@ void quadricFitting::calculateNormalVector()
mat /= otherPoints_.size(); mat /= otherPoints_.size();
//- find the eigenvalues of the tensor //- find the eigenvalues of the tensor
const vector ev = eigenValues(mat); const vector ev = help::eigenValues(mat);
//- estimate the normal as the eigenvector associated //- estimate the normal as the eigenvector associated
//- to the smallest eigenvalue //- to the smallest eigenvalue
normal_ = eigenVector(mat, ev[0]); # ifdef OpenCFDSpecific
normal_ = eigenVectors(mat, ev).x();
# else
normal_ = help::eigenVector(mat, ev[0]);
# endif
} }
void quadricFitting::calculateCoordinateSystem() void quadricFitting::calculateCoordinateSystem()

View file

@ -87,7 +87,7 @@ public:
return pts_[i]; return pts_[i];
} }
inline bool operator !=(const parPartTet& ptf) const inline bool operator !=(const parPartTet& /*ptf*/) const
{ {
Serr << "Not implemented" << endl; Serr << "Not implemented" << endl;
::exit(1); ::exit(1);

View file

@ -99,12 +99,10 @@ class parTriFace
// Member operators // Member operators
inline bool operator !=(const parTriFace& ptf) const inline bool operator !=(const parTriFace& /*ptf*/) const
{ {
Serr << "parTriFace::operator!= Not implemented" << endl; Serr << "parTriFace::operator!= Not implemented" << endl;
::exit(1); ::exit(1);
return true;
} }
// Friend operators // Friend operators

View file

@ -50,7 +50,7 @@ void sortEdgesIntoChains::createNodeLabels()
newNodeLabel_.insert(e.end(), nPoints++); newNodeLabel_.insert(e.end(), nPoints++);
} }
edgesAtPoint_.setSize(nPoints, DynList<label>()); edgesAtPoint_.setSize(nPoints);
forAll(bEdges_, eI) forAll(bEdges_, eI)
{ {
const edge& e = bEdges_[eI]; const edge& e = bEdges_[eI];
@ -69,7 +69,7 @@ void sortEdgesIntoChains::createNodeLabels()
bool sortEdgesIntoChains::findPointsBelongingToTheChain bool sortEdgesIntoChains::findPointsBelongingToTheChain
( (
const label currPos, const label currPos,
boolList& chainEdges DynList<bool>& chainEdges
) const ) const
{ {
# ifdef DEBUGSort # ifdef DEBUGSort
@ -150,7 +150,7 @@ bool sortEdgesIntoChains::findPointsBelongingToTheChain
return true; return true;
} }
void sortEdgesIntoChains::shrinkEdges(const boolList& chainEdges) void sortEdgesIntoChains::shrinkEdges(const DynList<bool>& chainEdges)
{ {
forAll(chainEdges, eI) forAll(chainEdges, eI)
if( chainEdges[eI] ) if( chainEdges[eI] )
@ -168,14 +168,14 @@ void sortEdgesIntoChains::shrinkEdges(const boolList& chainEdges)
} }
} }
void sortEdgesIntoChains::createChainFromEdges(const boolList& chainEdges) void sortEdgesIntoChains::createChainFromEdges(const DynList<bool>& chainEdges)
{ {
direction i(0); label i(0);
forAll(chainEdges, eI) forAll(chainEdges, eI)
if( chainEdges[eI] ) if( chainEdges[eI] )
++i; ++i;
labelList chainPoints(i); DynList<label> chainPoints(i);
i = 0; i = 0;
forAll(chainEdges, eI) forAll(chainEdges, eI)
@ -232,7 +232,7 @@ void sortEdgesIntoChains::sortEdges()
if( !openEdges_ ) if( !openEdges_ )
{ {
boolList chainEdges(bEdges_.size()); DynList<bool> chainEdges(bEdges_.size());
forAll(edgesAtPoint_, pI) forAll(edgesAtPoint_, pI)
if( findPointsBelongingToTheChain(pI, chainEdges) ) if( findPointsBelongingToTheChain(pI, chainEdges) )
{ {
@ -257,12 +257,11 @@ sortEdgesIntoChains::sortEdgesIntoChains(const DynList<edge>& bEdges)
} }
sortEdgesIntoChains::~sortEdgesIntoChains() sortEdgesIntoChains::~sortEdgesIntoChains()
{ {}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *// // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
// Member functions // Member functions
const DynList<labelList>& sortEdgesIntoChains::sortedChains() const const DynList<DynList<label> >& sortEdgesIntoChains::sortedChains() const
{ {
return createdChains_; return createdChains_;
} }

View file

@ -39,7 +39,6 @@ SourceFiles
#include "labelList.H" #include "labelList.H"
#include "edge.H" #include "edge.H"
#include "Map.H" #include "Map.H"
#include "boolList.H"
namespace Foam namespace Foam
{ {
@ -57,9 +56,9 @@ class sortEdgesIntoChains
Map<label> newNodeLabel_; Map<label> newNodeLabel_;
List<DynList<label> > edgesAtPoint_; DynList<DynList<label> > edgesAtPoint_;
DynList<labelList> createdChains_; DynList<DynList<label> > createdChains_;
// Private member functions // Private member functions
void createNodeLabels(); void createNodeLabels();
@ -67,12 +66,12 @@ class sortEdgesIntoChains
bool findPointsBelongingToTheChain bool findPointsBelongingToTheChain
( (
const label currPos, const label currPos,
boolList& chainEdges DynList<bool>& chainEdges
) const; ) const;
void shrinkEdges(const boolList& chainEdges); void shrinkEdges(const DynList<bool>& chainEdges);
void createChainFromEdges(const boolList& chainEdges); void createChainFromEdges(const DynList<bool>& chainEdges);
void sortEdges(); void sortEdges();
@ -88,7 +87,7 @@ class sortEdgesIntoChains
// Member functions // Member functions
//- a list of points which have not yet been resolved //- a list of points which have not yet been resolved
const DynList<labelList>& sortedChains() const; const DynList<DynList<label> >& sortedChains() const;
}; };
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View file

@ -316,7 +316,7 @@ label groupMarking
//- ones into a new group //- ones into a new group
DynList<label> globalGroupLabel; DynList<label> globalGroupLabel;
globalGroupLabel.setSize(nGroups); globalGroupLabel.setSize(nGroups);
globalGroupLabel = -1; globalGroupLabel = label(-1);
//- reduce the information about the groups //- reduce the information about the groups
label counter(0); label counter(0);

View file

@ -65,6 +65,12 @@ namespace help
template<class ListType> template<class ListType>
bool isinf(const ListType&); bool isinf(const ListType&);
//- calculate eigenvalues
inline vector eigenValues(const tensor&);
//- calculate eigenvector associated with a given eigenvalue
inline vector eigenVector(const tensor&, const scalar eigenValue);
//- check if the faces share a convex edge //- check if the faces share a convex edge
template<class Face1, class Face2> template<class Face1, class Face2>
inline bool isSharedEdgeConvex inline bool isSharedEdgeConvex
@ -289,6 +295,9 @@ namespace help
DynList<bool>& OkPoints DynList<bool>& OkPoints
); );
//- calculate quality metric of a tetrahedron
inline scalar tetQuality(const tetrahedron<point, point>& tet);
//- check if the vertex is on the positive side of the face plane //- check if the vertex is on the positive side of the face plane
inline bool isVertexVisible(const point& p, const plane& pl); inline bool isVertexVisible(const point& p, const plane& pl);

View file

@ -69,6 +69,168 @@ bool isinf(const ListType& l)
return false; return false;
} }
inline vector eigenValues(const tensor& t)
{
vector ret(vector::zero);
if
(
(
mag(t.xy()) + mag(t.xz()) + mag(t.yx())
+ mag(t.yz()) + mag(t.zx()) + mag(t.zy())
)
< SMALL
)
{
// diagonal matrix
ret.x() = t.xx();
ret.y() = t.yy();
ret.z() = t.zz();
}
else
{
const scalar a = -t.xx() - t.yy() - t.zz();
const scalar b = t.xx()*t.yy() + t.xx()*t.zz() + t.yy()*t.zz()
- t.xy()*t.yx() - t.xz()*t.zx() - t.yz()*t.zy();
const scalar c = - t.xx()*t.yy()*t.zz() - t.xy()*t.yz()*t.zx()
- t.xz()*t.yx()*t.zy() + t.xz()*t.yy()*t.zx()
+ t.xy()*t.yx()*t.zz() + t.xx()*t.yz()*t.zy();
// If there is a zero root
if( mag(c) < ROOTVSMALL )
{
const scalar disc = max(sqr(a) - 4*b, 0.0);
const scalar q = -0.5 * sqrt(max(0.0, disc));
ret.x() = 0;
ret.y() = -0.5 * a + q;
ret.z() = -0.5 * a - q;
}
else
{
const scalar Q = (a*a - 3*b)/9.0;
const scalar R = (2.0*a*a*a - 9.0*a*b + 27.0*c)/54.0;
const scalar R2 = sqr(R);
const scalar Q3 = pow3(Q);
if( R2 < Q3 )
{
//- there exist three real roots
const scalar sqrtQ = sqrt(Q);
const scalar theta = acos(R / (Q*sqrtQ));
const scalar m2SqrtQ = -2.0 * sqrtQ;
const scalar aBy3 = a / 3.0;
ret.x() = m2SqrtQ*cos(theta/3) - aBy3;
ret.y() = m2SqrtQ*cos((theta + 2.0 * M_PI)/3.0) - aBy3;
ret.z() = m2SqrtQ*cos((theta - 2.0 * M_PI)/3.0) - aBy3;
}
else
{
const scalar A = cbrt(R + sqrt(R2 - Q3));
//- three equal roots exist in this case
if( A < SMALL )
{
const scalar root = -a/3;
return vector(root, root, root);
}
else
{
//- roots are complex, return zero in this case
return vector::zero;
}
}
}
}
// Sort the eigenvalues into ascending order
if( ret.x() > ret.y() )
{
Swap(ret.x(), ret.y());
}
if( ret.y() > ret.z() )
{
Swap(ret.y(), ret.z());
}
if( ret.x() > ret.y() )
{
Swap(ret.x(), ret.y());
}
return ret;
}
inline vector eigenVector(const tensor& t, const scalar eigenValue)
{
if( mag(eigenValue) < SMALL )
{
return vector::zero;
}
// Construct the matrix for the eigenvector problem
const tensor A(t - eigenValue*I);
// Calculate the sub-determinants of the 3 components
scalar sd0 = A.yy()*A.zz() - A.yz()*A.zy();
scalar sd1 = A.xx()*A.zz() - A.xz()*A.zx();
scalar sd2 = A.xx()*A.yy() - A.xy()*A.yx();
scalar magSd0 = mag(sd0);
scalar magSd1 = mag(sd1);
scalar magSd2 = mag(sd2);
// Evaluate the eigenvector using the largest sub-determinant
if (magSd0 >= magSd1 && magSd0 >= magSd2 && magSd0 > SMALL)
{
vector ev
(
1,
(A.yz()*A.zx() - A.zz()*A.yx())/sd0,
(A.zy()*A.yx() - A.yy()*A.zx())/sd0
);
ev /= (mag(ev) + VSMALL);
return ev;
}
else if (magSd1 >= magSd2 && magSd1 > SMALL)
{
vector ev
(
(A.xz()*A.zy() - A.zz()*A.xy())/sd1,
1,
(A.zx()*A.xy() - A.xx()*A.zy())/sd1
);
ev /= (mag(ev) + VSMALL);
return ev;
}
else if (magSd2 > SMALL)
{
vector ev
(
(A.xy()*A.yz() - A.yy()*A.xz())/sd2,
(A.yx()*A.xz() - A.xx()*A.yz())/sd2,
1
);
ev /= (mag(ev) + VSMALL);
return ev;
}
else
{
return vector::zero;
}
}
template<class Face1, class Face2> template<class Face1, class Face2>
inline bool isSharedEdgeConvex inline bool isSharedEdgeConvex
( (
@ -1056,7 +1218,7 @@ inline bool doTrianglesOverlap
x /= (mag(x) + VSMALL); x /= (mag(x) + VSMALL);
vector y = vec ^ x; vector y = vec ^ x;
DynList<point2D, 6> poly2D(3); DynList<point2D, 6> poly2D(label(3));
poly2D[0] = point2D((tri0.a() - origin) & x, (tri0.a() - origin) & y); poly2D[0] = point2D((tri0.a() - origin) & x, (tri0.a() - origin) & y);
poly2D[1] = point2D((tri0.b() - origin) & x, (tri0.b() - origin) & y); poly2D[1] = point2D((tri0.b() - origin) & x, (tri0.b() - origin) & y);
poly2D[2] = point2D((tri0.c() - origin) & x, (tri0.c() - origin) & y); poly2D[2] = point2D((tri0.c() - origin) & x, (tri0.c() - origin) & y);
@ -1612,6 +1774,17 @@ inline bool isFaceConvexAndOk
return valid; return valid;
} }
inline scalar tetQuality(const tetrahedron<point, point>& tet)
{
return
tet.mag()
/(
8.0/(9.0*sqrt(3.0))
*pow3(min(tet.circumRadius(), GREAT))
+ ROOTVSMALL
);
}
inline point nearestPointOnTheEdge inline point nearestPointOnTheEdge
( (
const point& edgePoint0, const point& edgePoint0,

View file

@ -79,7 +79,7 @@ void whisperReduce(const ListType& neis, const scatterOp& sop, gatherOp& gop)
{ {
//- receive the data //- receive the data
List<T> receivedData; List<T> receivedData;
IPstream fromOtherProc(Pstream::blocking, above[aboveI]); IPstream fromOtherProc(Pstream::commsTypes::blocking, above[aboveI]);
fromOtherProc >> receivedData; fromOtherProc >> receivedData;
gop(receivedData); gop(receivedData);
@ -94,7 +94,13 @@ void whisperReduce(const ListType& neis, const scatterOp& sop, gatherOp& gop)
sop(dts); sop(dts);
//- send the data //- send the data
OPstream toOtherProc(Pstream::blocking, neiProc, dts.byteSize()); OPstream toOtherProc
(
Pstream::commsTypes::blocking,
neiProc,
dts.byteSize()
);
toOtherProc << dts; toOtherProc << dts;
} }
@ -104,7 +110,7 @@ void whisperReduce(const ListType& neis, const scatterOp& sop, gatherOp& gop)
{ {
//- receive the data //- receive the data
List<T> receivedData; List<T> receivedData;
IPstream fromOtherProc(Pstream::blocking, below[belowI]); IPstream fromOtherProc(Pstream::commsTypes::blocking, below[belowI]);
fromOtherProc >> receivedData; fromOtherProc >> receivedData;
gop(receivedData); gop(receivedData);
@ -119,7 +125,13 @@ void whisperReduce(const ListType& neis, const scatterOp& sop, gatherOp& gop)
sop(dts); sop(dts);
//- send the data //- send the data
OPstream toOtherProc(Pstream::blocking, neiProc, dts.byteSize()); OPstream toOtherProc
(
Pstream::commsTypes::blocking,
neiProc,
dts.byteSize()
);
toOtherProc << dts; toOtherProc << dts;
} }
} }
@ -143,14 +155,24 @@ void exchangeMap
labelHashSet receiveData; labelHashSet receiveData;
for(iter=m.begin();iter!=m.end();++iter) for(iter=m.begin();iter!=m.end();++iter)
{ {
OPstream toOtherProc(Pstream::blocking, iter->first, sizeof(label)); OPstream toOtherProc
(
Pstream::commsTypes::blocking,
iter->first,
sizeof(label)
);
toOtherProc << iter->second.size(); toOtherProc << iter->second.size();
} }
for(iter=m.begin();iter!=m.end();++iter) for(iter=m.begin();iter!=m.end();++iter)
{ {
IPstream fromOtherProc(Pstream::blocking, iter->first, sizeof(label)); IPstream fromOtherProc
(
Pstream::commsTypes::blocking,
iter->first,
sizeof(label)
);
label s; label s;
fromOtherProc >> s; fromOtherProc >> s;
@ -159,7 +181,7 @@ void exchangeMap
receiveData.insert(iter->first); receiveData.insert(iter->first);
} }
if( commsType == Pstream::blocking ) if( commsType == Pstream::commsTypes::blocking )
{ {
//- start with blocking type of send and received operation //- start with blocking type of send and received operation
@ -173,7 +195,7 @@ void exchangeMap
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
iter->first, iter->first,
dts.byteSize() dts.byteSize()
); );
@ -186,11 +208,16 @@ void exchangeMap
if( !receiveData.found(iter->first) ) if( !receiveData.found(iter->first) )
continue; continue;
IPstream fromOtherProc(Pstream::blocking, iter->first); IPstream fromOtherProc
(
Pstream::commsTypes::blocking,
iter->first
);
data.appendFromStream(fromOtherProc); data.appendFromStream(fromOtherProc);
} }
} }
else if( commsType == Pstream::scheduled ) else if( commsType == Pstream::commsTypes::scheduled )
{ {
//- start with scheduled data transfer //- start with scheduled data transfer
//- this type of transfer is intended for long messages because //- this type of transfer is intended for long messages because
@ -204,13 +231,13 @@ void exchangeMap
if( !receiveData.found(iter->first) ) if( !receiveData.found(iter->first) )
continue; continue;
//List<T> receive; IPstream fromOtherProc
IPstream fromOtherProc(Pstream::scheduled, iter->first); (
//fromOtherProc >> receive; Pstream::commsTypes::scheduled,
data.appendFromStream(fromOtherProc); iter->first
);
//forAll(receive, i) data.appendFromStream(fromOtherProc);
// data.append(receive[i]);
} }
//- send data to processors with greater ids //- send data to processors with greater ids
@ -226,7 +253,7 @@ void exchangeMap
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::scheduled, Pstream::commsTypes::scheduled,
iter->first, iter->first,
dts.byteSize() dts.byteSize()
); );
@ -243,13 +270,13 @@ void exchangeMap
if( !receiveData.found(riter->first) ) if( !receiveData.found(riter->first) )
continue; continue;
IPstream fromOtherProc(Pstream::scheduled, riter->first); IPstream fromOtherProc
//List<T> receive; (
//fromOtherProc >> receive; Pstream::commsTypes::scheduled,
data.appendFromStream(fromOtherProc); riter->first
);
//forAll(receive, i) data.appendFromStream(fromOtherProc);
// data.append(receive[i]);
} }
//- send data to processors with lower ids //- send data to processors with lower ids
@ -265,7 +292,7 @@ void exchangeMap
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::scheduled, Pstream::commsTypes::scheduled,
riter->first, riter->first,
dts.byteSize() dts.byteSize()
); );
@ -317,7 +344,7 @@ void exchangeMap
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
iter->first, iter->first,
dataToSend.byteSize() dataToSend.byteSize()
); );
@ -330,7 +357,12 @@ void exchangeMap
mOut.insert(std::make_pair(iter->first, List<T>())); mOut.insert(std::make_pair(iter->first, List<T>()));
List<T>& dataToReceive = mOut[iter->first]; List<T>& dataToReceive = mOut[iter->first];
IPstream fromOtherProc(Pstream::blocking, iter->first); IPstream fromOtherProc
(
Pstream::commsTypes::blocking,
iter->first
);
fromOtherProc >> dataToReceive; fromOtherProc >> dataToReceive;
} }
} }

View file

@ -65,7 +65,7 @@ void exchangeMap
( (
const std::map<label, ListType>&, const std::map<label, ListType>&,
LongList<T>&, LongList<T>&,
const Pstream::commsTypes commsType = Pstream::blocking const Pstream::commsTypes commsType = Pstream::commsTypes::blocking
); );
//- sends the data stored in a map to other processors and receives the data //- sends the data stored in a map to other processors and receives the data

View file

@ -488,7 +488,7 @@ inline void zipOpenChain(DynList<edge>& bEdges)
} }
bool closed(true); bool closed(true);
DynList<label> openVertices(2); DynList<label> openVertices(label(2));
forAll(chainVertices, pI) forAll(chainVertices, pI)
if( nAppearances[pI] == 1 ) if( nAppearances[pI] == 1 )
{ {

View file

@ -591,7 +591,7 @@ void partTetMesh::updateOrigMesh(boolList* changedFacePtr)
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
pBnd[patchI].neiProcNo(), pBnd[patchI].neiProcNo(),
sendData.byteSize() sendData.byteSize()
); );
@ -605,7 +605,7 @@ void partTetMesh::updateOrigMesh(boolList* changedFacePtr)
IPstream fromOtherProc IPstream fromOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
pBnd[patchI].neiProcNo() pBnd[patchI].neiProcNo()
); );

View file

@ -88,7 +88,7 @@ void partTetMesh::createPointsAndTets
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo(), procBoundaries[patchI].neiProcNo(),
dataToSend.byteSize() dataToSend.byteSize()
); );
@ -103,7 +103,7 @@ void partTetMesh::createPointsAndTets
IPstream fromOtherProc IPstream fromOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo() procBoundaries[patchI].neiProcNo()
); );

View file

@ -46,8 +46,8 @@ namespace Foam
void partTetMesh::createParallelAddressing void partTetMesh::createParallelAddressing
( (
const labelLongList& nodeLabelForPoint, const labelLongList& nodeLabelForPoint,
const labelLongList& nodeLabelForFace, const labelLongList& /*nodeLabelForFace*/,
const labelLongList& nodeLabelForCell const labelLongList& /*nodeLabelForCell*/
) )
{ {
//- vertices marked as SMOOTH and BOUNDARY are used by the smoother //- vertices marked as SMOOTH and BOUNDARY are used by the smoother

View file

@ -47,7 +47,7 @@ namespace Foam
void partTriMesh::createParallelAddressing void partTriMesh::createParallelAddressing
( (
const labelList& nodeLabelForPoint, const labelList& nodeLabelForPoint,
const labelList& nodeLabelForFace const labelList& /*nodeLabelForFace*/
) )
{ {
const meshSurfaceEngine& mse = mPart_.surfaceEngine(); const meshSurfaceEngine& mse = mPart_.surfaceEngine();
@ -351,7 +351,7 @@ void partTriMesh::createBufferLayers()
{ {
const parTriFace& tri = receivedTrias[i]; const parTriFace& tri = receivedTrias[i];
DynList<label, 3> triPointLabels(3); DynList<label, 3> triPointLabels(label(3));
for(label j=0;j<3;++j) for(label j=0;j<3;++j)
{ {
const label gpI = tri.globalLabelOfPoint(j); const label gpI = tri.globalLabelOfPoint(j);

View file

@ -90,7 +90,7 @@ void processorBoundaryPatch::write(Ostream& os) const
this->operator<<(os); this->operator<<(os);
} }
void processorBoundaryPatch::writeDict(Ostream& os) const void processorBoundaryPatch::writeDict(Ostream& /*os*/) const
{ {
} }

View file

@ -37,7 +37,7 @@ SourceFiles
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "polyMeshGenCells.H" #include "polyMeshGenCells.H"
#include "dictionary.H" #include "IOdictionary.H"
namespace Foam namespace Foam
{ {

View file

@ -37,7 +37,6 @@ SourceFiles
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "objectRegistry.H"
#include "foamTime.H" #include "foamTime.H"
#include "meshSubset.H" #include "meshSubset.H"
#include "pointFieldPMG.H" #include "pointFieldPMG.H"

View file

@ -131,7 +131,7 @@ void polyMeshGenAddressing::calcGlobalPointLabels() const
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo(), procBoundaries[patchI].neiProcNo(),
dataToSend.byteSize() dataToSend.byteSize()
); );
@ -142,7 +142,7 @@ void polyMeshGenAddressing::calcGlobalPointLabels() const
{ {
IPstream fromOtherProc IPstream fromOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo() procBoundaries[patchI].neiProcNo()
); );
labelList receivedData; labelList receivedData;
@ -236,7 +236,7 @@ void polyMeshGenAddressing::calcGlobalPointLabels() const
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo(), procBoundaries[patchI].neiProcNo(),
dataToSend.byteSize() dataToSend.byteSize()
); );
@ -247,7 +247,7 @@ void polyMeshGenAddressing::calcGlobalPointLabels() const
{ {
IPstream fromOtherProc IPstream fromOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo() procBoundaries[patchI].neiProcNo()
); );
labelList receivedData; labelList receivedData;
@ -344,7 +344,7 @@ void polyMeshGenAddressing::calcGlobalFaceLabels() const
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo(), procBoundaries[patchI].neiProcNo(),
dataToSend.byteSize() dataToSend.byteSize()
); );
@ -358,7 +358,7 @@ void polyMeshGenAddressing::calcGlobalFaceLabels() const
{ {
IPstream fromOtherProc IPstream fromOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo() procBoundaries[patchI].neiProcNo()
); );
@ -529,7 +529,7 @@ void polyMeshGenAddressing::calcGlobalEdgeLabels() const
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo(), procBoundaries[patchI].neiProcNo(),
dataToSend.byteSize() dataToSend.byteSize()
); );
@ -540,7 +540,7 @@ void polyMeshGenAddressing::calcGlobalEdgeLabels() const
{ {
IPstream fromOtherProc IPstream fromOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo() procBoundaries[patchI].neiProcNo()
); );
labelList receivedData; labelList receivedData;
@ -642,7 +642,7 @@ void polyMeshGenAddressing::calcGlobalEdgeLabels() const
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo(), procBoundaries[patchI].neiProcNo(),
dataToSend.byteSize() dataToSend.byteSize()
); );
@ -653,7 +653,7 @@ void polyMeshGenAddressing::calcGlobalEdgeLabels() const
{ {
IPstream fromOtherProc IPstream fromOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo() procBoundaries[patchI].neiProcNo()
); );
labelList receivedData; labelList receivedData;

View file

@ -82,6 +82,66 @@ bool checkFaceAreas
const boolList* changedFacePtr = nullptr const boolList* changedFacePtr = nullptr
); );
//- Check quality of tetrahedra
bool checkTetQuality
(
const polyMeshGen&,
const bool report = false,
const scalar minTetQuality = VSMALL,
labelHashSet* setPtr = nullptr,
const boolList* changedFacePtr = nullptr
);
//- Check minimum face twist
bool checkMinTwist
(
const polyMeshGen&,
const bool report = false,
const scalar minTwist = VSMALL,
labelHashSet* setPtr = nullptr,
const boolList* changedFacePtr = nullptr
);
//- Check the area of internal faces versus boundary faces
bool checkCellDeterminant
(
const polyMeshGen&,
const bool report = false,
const scalar warnDet = 1e-3,
labelHashSet* setPtr = nullptr,
const boolList* changedFacePtr = nullptr
);
//- Check volume ratio
void checkMinVolRatio
(
const polyMeshGen&,
scalarField&,
const boolList* changedFacePtr = nullptr
);
bool checkMinVolRatio
(
const polyMeshGen&,
const bool report = false,
const scalar warnVolRatio = 0.01,
labelHashSet* setPtr = nullptr,
const boolList* changedFacePtr = nullptr
);
//- Check face triangle twist
bool checkTriangleTwist
(
const polyMeshGen&,
const bool report = false,
const scalar minTwist = VSMALL,
labelHashSet* setPtr = nullptr,
const boolList* changedFacePtr = nullptr
);
//- Check for negative part tetrahedra //- Check for negative part tetrahedra
//- Cells are decomposed into tetrahedra formed by //- Cells are decomposed into tetrahedra formed by
//- the cell centre, face centre and the edge vertices //- the cell centre, face centre and the edge vertices
@ -238,6 +298,15 @@ bool checkGeometry(const polyMeshGen&, const bool report = false);
//- Check mesh for correctness. Returns false for no error. //- Check mesh for correctness. Returns false for no error.
bool checkMesh(const polyMeshGen&, const bool report = false); bool checkMesh(const polyMeshGen&, const bool report = false);
//- Read the user defined mesh quality settings
label findBadFacesAdditionalChecks
(
const polyMeshGen& mesh,
const bool report,
labelHashSet& badFaces,
const boolList* activeFacePtr = nullptr
);
//- checks for bad faces making the mesh unusable //- checks for bad faces making the mesh unusable
//- checks for negative pyramids and zero area faces //- checks for negative pyramids and zero area faces
label findBadFacesRelaxed label findBadFacesRelaxed

View file

@ -87,7 +87,7 @@ void polyMeshGenModifier::addBufferCells()
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo() procBoundaries[patchI].neiProcNo()
); );
@ -100,7 +100,7 @@ void polyMeshGenModifier::addBufferCells()
List<labelledPoint> receivedPoints; List<labelledPoint> receivedPoints;
IPstream fromOtherProc IPstream fromOtherProc
( (
IPstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo() procBoundaries[patchI].neiProcNo()
); );
@ -154,7 +154,7 @@ void polyMeshGenModifier::addBufferCells()
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo() procBoundaries[patchI].neiProcNo()
); );
@ -171,7 +171,7 @@ void polyMeshGenModifier::addBufferCells()
IPstream fromOtherProc IPstream fromOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo() procBoundaries[patchI].neiProcNo()
); );

View file

@ -126,7 +126,7 @@ void polyMeshGenModifier::removeFaces(const boolList& removeFace)
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo(), procBoundaries[patchI].neiProcNo(),
removeProcFace.byteSize() removeProcFace.byteSize()
); );
@ -142,7 +142,7 @@ void polyMeshGenModifier::removeFaces(const boolList& removeFace)
boolList removeOtherProcFace; boolList removeOtherProcFace;
IPstream fromOtherProc IPstream fromOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procBoundaries[patchI].neiProcNo() procBoundaries[patchI].neiProcNo()
); );
fromOtherProc >> removeOtherProcFace; fromOtherProc >> removeOtherProcFace;
@ -187,7 +187,7 @@ void polyMeshGenModifier::removeFaces(const boolList& removeFace)
neiProcNo[npI] = procBoundaries[patchI].neiProcNo(); neiProcNo[npI] = procBoundaries[patchI].neiProcNo();
nFacesInPatch[npI] = 0; nFacesInPatch[npI] = 0;
for(register label faceI=0;faceI<oldNumFacesInPatch;++faceI) for(label faceI=0;faceI<oldNumFacesInPatch;++faceI)
{ {
if( if(
!removeFace[oldStart+faceI] && !removeFace[oldStart+faceI] &&

View file

@ -170,7 +170,7 @@ inline bool meshSubset::operator==(const meshSubset& ms) const
{ {
if( ms.name_ != name_ ) if( ms.name_ != name_ )
return false; return false;
if( ms.type_ != ms.type_ ) if( ms.type_ != type_ )
return false; return false;
forAllConstIter(std::set<label>, data_, it) forAllConstIter(std::set<label>, data_, it)

View file

@ -81,28 +81,22 @@ void triSurfAddressing::calculateEdges() const
const label triI = pFacets(pI, pfI); const label triI = pFacets(pI, pfI);
const labelledTri& tri = facets_[triI]; const labelledTri& tri = facets_[triI];
label pos(-1);
forAll(tri, i) forAll(tri, i)
{ {
if( tri[i] == pI ) if( tri[i] == pI )
{ {
pos = i; if( tri[(i+1)%3] >= pI )
if( tri[(pos+1)%3] >= pI )
edgesAtPoint.insert edgesAtPoint.insert
( (
std::make_pair(pI, tri[(pos+1)%3]) std::make_pair(pI, tri[(i+1)%3])
); );
if( tri[(pos+2)%3] >= pI ) if( tri[(i+2)%3] >= pI )
edgesAtPoint.insert edgesAtPoint.insert
( (
std::make_pair(pI, tri[(pos+2)%3]) std::make_pair(pI, tri[(i+2)%3])
); );
} }
} }
} }
std::set<std::pair<label, label> >::const_iterator it; std::set<std::pair<label, label> >::const_iterator it;
@ -119,7 +113,6 @@ void triSurfAddressing::calculateEdges() const
# endif # endif
nEdgesForThread[threadI] = edgesHelper.size(); nEdgesForThread[threadI] = edgesHelper.size();
# ifdef USE_OMP # ifdef USE_OMP
# pragma omp critical # pragma omp critical
# endif # endif

View file

@ -133,7 +133,7 @@ void meshOctree::setOctantVectorsAndPositions()
//- set vrtLeavesPos_ //- set vrtLeavesPos_
for(label vrtI=0;vrtI<8;++vrtI) for(label vrtI=0;vrtI<8;++vrtI)
{ {
FixedList<label, 3> vc(0); FixedList<label, 3> vc(label(0));
if( vrtI & 1 ) if( vrtI & 1 )
vc[0] += 1; vc[0] += 1;

View file

@ -171,7 +171,7 @@ void meshOctreeAddressing::calcGlobalPointLabels() const
{ {
//- receive the data //- receive the data
labelList receivedLabels; labelList receivedLabels;
IPstream fromOtherProc(Pstream::blocking, above[aboveI]); IPstream fromOtherProc(Pstream::commsTypes::blocking, above[aboveI]);
fromOtherProc >> receivedLabels; fromOtherProc >> receivedLabels;
label counter(0); label counter(0);
@ -245,7 +245,7 @@ void meshOctreeAddressing::calcGlobalPointLabels() const
} }
//- send the data //- send the data
OPstream toOtherProc(Pstream::blocking, neiProc, dts.byteSize()); OPstream toOtherProc(Pstream::commsTypes::blocking, neiProc, dts.byteSize());
toOtherProc << dts; toOtherProc << dts;
} }
@ -255,7 +255,7 @@ void meshOctreeAddressing::calcGlobalPointLabels() const
{ {
//- receive the data //- receive the data
labelList receivedLabels; labelList receivedLabels;
IPstream fromOtherProc(Pstream::blocking, below[belowI]); IPstream fromOtherProc(Pstream::commsTypes::blocking, below[belowI]);
fromOtherProc >> receivedLabels; fromOtherProc >> receivedLabels;
label counter(0); label counter(0);
@ -329,7 +329,7 @@ void meshOctreeAddressing::calcGlobalPointLabels() const
} }
//- send the data //- send the data
OPstream toOtherProc(Pstream::blocking, neiProc, dts.byteSize()); OPstream toOtherProc(Pstream::commsTypes::blocking, neiProc, dts.byteSize());
toOtherProc << dts; toOtherProc << dts;
} }
} }
@ -437,7 +437,7 @@ void meshOctreeAddressing::calcGlobalLeafLabels() const
//- exchange the data with other processors //- exchange the data with other processors
LongList<meshOctreeCubeBasic> rLeaves; LongList<meshOctreeCubeBasic> rLeaves;
help::exchangeMap(exchangeData, rLeaves, Pstream::scheduled); help::exchangeMap(exchangeData, rLeaves, Pstream::commsTypes::scheduled);
//- update the local data //- update the local data
forAll(rLeaves, i) forAll(rLeaves, i)
@ -479,9 +479,9 @@ void meshOctreeAddressing::calcGlobalLeafLabels() const
//- exchange the data //- exchange the data
rLeaves.clear(); rLeaves.clear();
help::exchangeMap(exchangeData, rLeaves, Pstream::scheduled); help::exchangeMap(exchangeData, rLeaves, Pstream::commsTypes::scheduled);
labelLongList rLabels; labelLongList rLabels;
help::exchangeMap(exchangeLabels, rLabels, Pstream::scheduled); help::exchangeMap(exchangeLabels, rLabels, Pstream::commsTypes::scheduled);
if( rLeaves.size() != rLabels.size() ) if( rLeaves.size() != rLabels.size() )
FatalErrorIn("void meshOctreeAddressing::calcGlobalLeafLabels() const") FatalErrorIn("void meshOctreeAddressing::calcGlobalLeafLabels() const")
@ -526,7 +526,7 @@ void meshOctreeAddressing::calcGlobalLeafLabels() const
//- exchange the data //- exchange the data
rLabels.clear(); rLabels.clear();
help::exchangeMap(exchangeLabels, rLabels, Pstream::scheduled); help::exchangeMap(exchangeLabels, rLabels, Pstream::commsTypes::scheduled);
//- update the local data //- update the local data
label counter(0); label counter(0);

View file

@ -135,7 +135,7 @@ void meshOctreeAutomaticRefinement::setMaxRefLevel()
{ {
finished = false; finished = false;
const scalar lSize = size / pow(2, label(maxRefLevel_)); const scalar lSize = size / pow(2.0, label(maxRefLevel_));
if( lSize < cs ) if( lSize < cs )
{ {

View file

@ -770,7 +770,7 @@ void meshOctreeCreator::refineBoxesIntersectingEdgeMeshes()
const point& sp = points[e.start()]; const point& sp = points[e.start()];
const point& ep = points[e.end()]; const point& ep = points[e.end()];
boundBox edgeBB(sp, ep); boundBox edgeBB(min(sp, ep), max(sp, ep));
edgeBB.min() -= tol; edgeBB.min() -= tol;
edgeBB.max() += tol; edgeBB.max() += tol;

View file

@ -84,12 +84,12 @@ void meshOctreeCreator::setRootCubeSizeAndRefParameters()
{ {
finished = false; finished = false;
const scalar lSize = size / Foam::pow(2, label(globalRefLevel_)); const scalar lSize = size / pow(label(2), label(globalRefLevel_));
if( lSize < (maxSize * (1.0-SMALL)) ) if( lSize < (maxSize * (1.0-SMALL)) )
{ {
const scalar bbSize = const scalar bbSize =
0.5 * maxSize * Foam::pow(2, label(globalRefLevel_)); 0.5 * maxSize * pow(label(2), label(globalRefLevel_));
rootBox.max() = c + point(bbSize, bbSize, bbSize); rootBox.max() = c + point(bbSize, bbSize, bbSize);
rootBox.min() = c - point(bbSize, bbSize, bbSize); rootBox.min() = c - point(bbSize, bbSize, bbSize);
finished = true; finished = true;
@ -133,7 +133,7 @@ void meshOctreeCreator::setRootCubeSizeAndRefParameters()
{ {
finished = false; finished = false;
const scalar lSize = maxSize / Foam::pow(2, addLevel); const scalar lSize = maxSize / Foam::pow(label(2), addLevel);
if( lSize <= cs ) if( lSize <= cs )
{ {
@ -230,7 +230,7 @@ void meshOctreeCreator::setRootCubeSizeAndRefParameters()
{ {
finished = false; finished = false;
const scalar lSize = maxSize / Foam::pow(2, addLevel); const scalar lSize = maxSize / Foam::pow(label(2), addLevel);
if( lSize <= cs ) if( lSize <= cs )
{ {
@ -308,7 +308,7 @@ void meshOctreeCreator::setRootCubeSizeAndRefParameters()
{ {
finished = false; finished = false;
const scalar lSize = maxSize / Foam::pow(2, addLevel); const scalar lSize = maxSize / Foam::pow(label(2), addLevel);
if( lSize <= cs ) if( lSize <= cs )
{ {
@ -380,7 +380,7 @@ void meshOctreeCreator::setRootCubeSizeAndRefParameters()
{ {
finished = false; finished = false;
const scalar lSize = maxSize / Foam::pow(2, nLevel); const scalar lSize = maxSize / Foam::pow(label(2), nLevel);
if( lSize <= cs ) if( lSize <= cs )
{ {

View file

@ -97,7 +97,7 @@ inline meshOctreeCubeCoordinates meshOctreeCubeCoordinates::refineForPosition
) const ) const
{ {
//- create new boxes in z-order fashion //- create new boxes in z-order fashion
FixedList<label, 3> addPos(0); FixedList<label, 3> addPos(label(0));
if( i & 1 ) if( i & 1 )
addPos[0] = 1; addPos[0] = 1;
if( i & 2 ) if( i & 2 )
@ -523,16 +523,23 @@ inline Istream& operator>>
meshOctreeCubeCoordinates& cc meshOctreeCubeCoordinates& cc
) )
{ {
// Read beginning of meshOctreeCubeCoordinates //- Read beginning of meshOctreeCubeCoordinates
is.readBegin("meshOctreeCubeCoordinates"); is.readBegin("meshOctreeCubeCoordinates");
//- read the level in the octree structure
label l; label l;
is >> l; is >> l;
cc.level_ = l; cc.level_ = l;
//- read x, y and z coordinates
is.readBegin("meshOctreeCubeCoordinates");
is >> cc.posX_; is >> cc.posX_;
is >> cc.posY_; is >> cc.posY_;
is >> cc.posZ_; is >> cc.posZ_;
is.readEnd("meshOctreeCubeCoordinates");
// Read end of meshOctreeCubeCoordinates // Read end of meshOctreeCubeCoordinates
is.readEnd("meshOctreeCubeCoordinates"); is.readEnd("meshOctreeCubeCoordinates");
@ -551,10 +558,15 @@ inline Ostream& operator<<
os << token::BEGIN_LIST; os << token::BEGIN_LIST;
os << label(cc.level_) << token::SPACE; os << label(cc.level_) << token::SPACE;
os << token::BEGIN_LIST;
os << cc.posX_ << token::SPACE; os << cc.posX_ << token::SPACE;
os << cc.posY_ << token::SPACE; os << cc.posY_ << token::SPACE;
os << cc.posZ_ << token::END_LIST; os << cc.posZ_ << token::END_LIST;
os << token::END_LIST;
// Check state of Ostream // Check state of Ostream
os.check("operator<<(Ostream&, const meshOctreeCubeCoordinates"); os.check("operator<<(Ostream&, const meshOctreeCubeCoordinates");

View file

@ -136,6 +136,16 @@ void meshOctree::findNearestSurfacePointInRegion
const point& p const point& p
) const ) const
{ {
if( region < 0 )
{
WarningIn
(
"void meshOctree::findNearestSurfacePointInRegion(point&, scalar&,"
"label&, const label, const point&) const"
) << "Region " << region << " is not valid!" << endl;
return;
}
const label cLabel = findLeafContainingVertex(p); const label cLabel = findLeafContainingVertex(p);
vector sizeVec; vector sizeVec;
if( cLabel < 0 ) if( cLabel < 0 )

View file

@ -214,7 +214,7 @@ void meshOctreeModifier::loadDistribution(const direction usedType)
List<meshOctreeCubeBasic> mc; List<meshOctreeCubeBasic> mc;
IPstream fromOtherProc(Pstream::blocking, iter.key()); IPstream fromOtherProc(Pstream::commsTypes::blocking, iter.key());
fromOtherProc >> mc; fromOtherProc >> mc;
@ -254,7 +254,7 @@ void meshOctreeModifier::loadDistribution(const direction usedType)
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procI, procI,
sendCoordinates.byteSize() sendCoordinates.byteSize()
); );
@ -270,7 +270,7 @@ void meshOctreeModifier::loadDistribution(const direction usedType)
List<meshOctreeCubeBasic> mc; List<meshOctreeCubeBasic> mc;
IPstream fromOtherProc(Pstream::blocking, iter.key()); IPstream fromOtherProc(Pstream::commsTypes::blocking, iter.key());
fromOtherProc >> mc; fromOtherProc >> mc;
@ -309,7 +309,7 @@ void meshOctreeModifier::loadDistribution(const direction usedType)
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
procI, procI,
sendCoordinates.byteSize() sendCoordinates.byteSize()
); );

View file

@ -26,7 +26,7 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "meshOctreeModifier.H" #include "meshOctreeModifier.H"
#include "helperFunctionsPar.H" #include "helperFunctions.H"
#include "triSurf.H" #include "triSurf.H"
#include <map> #include <map>
@ -119,8 +119,8 @@ void meshOctreeModifier::refineTreeForCoordinates
void meshOctreeModifier::refineTreeForCoordinates void meshOctreeModifier::refineTreeForCoordinates
( (
const meshOctreeCubeCoordinates& cc, const meshOctreeCubeCoordinates& cc,
const labelList& containedTriangles, const labelList& /*containedTriangles*/,
const labelList& containedEdges, const labelList& /*containedEdges*/,
const short procNo, const short procNo,
const direction cubeType const direction cubeType
) )
@ -203,8 +203,6 @@ void meshOctreeModifier::addLayerFromNeighbouringProcessors()
return; return;
const LongList<meshOctreeCube*>& leaves = octree_.leaves_; const LongList<meshOctreeCube*>& leaves = octree_.leaves_;
const labelList& neiProcs = octree_.neiProcs_;
const List<Pair<meshOctreeCubeCoordinates> >& neiRange = octree_.neiRange_;
forAll(leaves, leafI) forAll(leaves, leafI)
if( leaves[leafI]->procNo() != Pstream::myProcNo() ) if( leaves[leafI]->procNo() != Pstream::myProcNo() )
@ -212,6 +210,9 @@ void meshOctreeModifier::addLayerFromNeighbouringProcessors()
Info << "Adding an additional layer of cells" << endl; Info << "Adding an additional layer of cells" << endl;
const labelList& neiProcs = octree_.neiProcs_;
const List<Pair<meshOctreeCubeCoordinates> >& neiRange = octree_.neiRange_;
meshOctreeCubeCoordinates minCoord, maxCoord; meshOctreeCubeCoordinates minCoord, maxCoord;
std::map<label, LongList<meshOctreeCubeBasic> > toProcs; std::map<label, LongList<meshOctreeCubeBasic> > toProcs;
forAll(neiProcs, i) forAll(neiProcs, i)
@ -227,11 +228,14 @@ void meshOctreeModifier::addLayerFromNeighbouringProcessors()
forAll(neiProcs, procI) forAll(neiProcs, procI)
{ {
if( if
(
(maxCoord >= neiRange[procI].first()) && (maxCoord >= neiRange[procI].first()) &&
(minCoord <= neiRange[procI].second()) (minCoord <= neiRange[procI].second())
) )
{
toProcs[neiProcs[procI]].append(*leaves[leafI]); toProcs[neiProcs[procI]].append(*leaves[leafI]);
}
} }
} }
@ -240,6 +244,9 @@ void meshOctreeModifier::addLayerFromNeighbouringProcessors()
{ {
if( i == Pstream::myProcNo() ) if( i == Pstream::myProcNo() )
{ {
Pout << "Neighbour processors " << neiProcs << endl;
Pout << "Neighbour range " << neiRange << endl;
std::map<label, LongList<meshOctreeCubeBasic> >::iterator it; std::map<label, LongList<meshOctreeCubeBasic> >::iterator it;
for(it=toProcs.begin();it!=toProcs.end();++it) for(it=toProcs.begin();it!=toProcs.end();++it)
{ {
@ -254,7 +261,7 @@ void meshOctreeModifier::addLayerFromNeighbouringProcessors()
//- exchange data with other processors //- exchange data with other processors
LongList<meshOctreeCubeBasic> receivedCoordinates; LongList<meshOctreeCubeBasic> receivedCoordinates;
help::exchangeMap(toProcs, receivedCoordinates, Pstream::blocking); help::exchangeMap(toProcs, receivedCoordinates, Pstream::commsTypes::blocking);
# ifdef OCTREE_DEBUG # ifdef OCTREE_DEBUG
Pout << "Received " << receivedCoordinates.size() Pout << "Received " << receivedCoordinates.size()

View file

@ -489,8 +489,12 @@ void meshOctreeModifier::refineSelectedBoxes
} }
} }
//- update the list of leaves
createListOfLeaves(); createListOfLeaves();
//- update the communication pattern
updateCommunicationPattern();
# ifdef OCTREETiming # ifdef OCTREETiming
Info << "Time for actual refinement " << (omp_get_wtime()-regTime) << endl; Info << "Time for actual refinement " << (omp_get_wtime()-regTime) << endl;
# endif # endif

View file

@ -116,7 +116,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
{ {
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
neiProcs_[neiProcI], neiProcs_[neiProcI],
sizeof(label) sizeof(label)
); );
@ -129,7 +129,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
{ {
IPstream fromOtherProc IPstream fromOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
neiProcs_[neiProcI], neiProcs_[neiProcI],
sizeof(label) sizeof(label)
); );
@ -147,7 +147,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
continue; continue;
//- receive data from other processor //- receive data from other processor
IPstream fromOtherProc(Pstream::scheduled, neiProcs_[neiProcI]); IPstream fromOtherProc(Pstream::commsTypes::scheduled, neiProcs_[neiProcI]);
dataToReceive.appendFromStream(fromOtherProc); dataToReceive.appendFromStream(fromOtherProc);
} }
@ -159,7 +159,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
continue; continue;
//- send data to other processor //- send data to other processor
OPstream toOtherProc(Pstream::scheduled, neiProcs_[neiProcI]); OPstream toOtherProc(Pstream::commsTypes::scheduled, neiProcs_[neiProcI]);
toOtherProc << toProcs[neiProcI]; toOtherProc << toProcs[neiProcI];
} }
@ -172,7 +172,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
continue; continue;
//- receive data from other processor //- receive data from other processor
IPstream fromOtherProc(Pstream::scheduled, neiProcs_[neiProcI]); IPstream fromOtherProc(Pstream::commsTypes::scheduled, neiProcs_[neiProcI]);
dataToReceive.appendFromStream(fromOtherProc); dataToReceive.appendFromStream(fromOtherProc);
} }
@ -184,7 +184,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
continue; continue;
//- send data to other processor //- send data to other processor
OPstream toOtherProc(Pstream::scheduled, neiProcs_[neiProcI]); OPstream toOtherProc(Pstream::commsTypes::scheduled, neiProcs_[neiProcI]);
toOtherProc << toProcs[neiProcI]; toOtherProc << toProcs[neiProcI];
} }
} }
@ -268,7 +268,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
{ {
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
neiProcs_[neiProcI], neiProcs_[neiProcI],
sizeof(label) sizeof(label)
); );
@ -281,7 +281,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
{ {
IPstream fromOtherProc IPstream fromOtherProc
( (
Pstream::blocking, Pstream::commsTypes::blocking,
neiProcs_[neiProcI], neiProcs_[neiProcI],
sizeof(label) sizeof(label)
); );
@ -299,7 +299,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
continue; continue;
//- receive data from other processor //- receive data from other processor
IPstream fromOtherProc(Pstream::scheduled, neiProcs_[neiProcI]); IPstream fromOtherProc(Pstream::commsTypes::scheduled, neiProcs_[neiProcI]);
dataToReceive.appendFromStream(fromOtherProc); dataToReceive.appendFromStream(fromOtherProc);
} }
@ -312,7 +312,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
continue; continue;
//- send data to other processor //- send data to other processor
OPstream toOtherProc(Pstream::scheduled, neiProcs_[neiProcI]); OPstream toOtherProc(Pstream::commsTypes::scheduled, neiProcs_[neiProcI]);
toOtherProc << toProcs[neiProcI]; toOtherProc << toProcs[neiProcI];
} }
@ -325,7 +325,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
continue; continue;
//- receive data from other processor //- receive data from other processor
IPstream fromOtherProc(Pstream::scheduled, neiProcs_[neiProcI]); IPstream fromOtherProc(Pstream::commsTypes::scheduled, neiProcs_[neiProcI]);
dataToReceive.appendFromStream(fromOtherProc); dataToReceive.appendFromStream(fromOtherProc);
} }
@ -338,7 +338,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
continue; continue;
//- send data to other processor //- send data to other processor
OPstream toOtherProc(Pstream::scheduled, neiProcs_[neiProcI]); OPstream toOtherProc(Pstream::commsTypes::scheduled, neiProcs_[neiProcI]);
toOtherProc << toProcs[neiProcI]; toOtherProc << toProcs[neiProcI];
} }
@ -353,7 +353,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
continue; continue;
//- receive data from other processor //- receive data from other processor
IPstream fromOtherProc(Pstream::scheduled, neiProcs_[neiProcI]); IPstream fromOtherProc(Pstream::commsTypes::scheduled, neiProcs_[neiProcI]);
receivedRanges.appendFromStream(fromOtherProc); receivedRanges.appendFromStream(fromOtherProc);
} }
@ -368,7 +368,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
//- send data to other processor //- send data to other processor
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::scheduled, Pstream::commsTypes::scheduled,
neiProcs_[neiProcI], neiProcs_[neiProcI],
attributesToProcs[neiProcI].byteSize() attributesToProcs[neiProcI].byteSize()
); );
@ -385,7 +385,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
continue; continue;
//- receive data from other processor //- receive data from other processor
IPstream fromOtherProc(Pstream::scheduled, neiProcs_[neiProcI]); IPstream fromOtherProc(Pstream::commsTypes::scheduled, neiProcs_[neiProcI]);
receivedRanges.appendFromStream(fromOtherProc); receivedRanges.appendFromStream(fromOtherProc);
} }
@ -400,7 +400,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
//- send data to other processor //- send data to other processor
OPstream toOtherProc OPstream toOtherProc
( (
Pstream::scheduled, Pstream::commsTypes::scheduled,
neiProcs_[neiProcI], neiProcs_[neiProcI],
attributesToProcs[neiProcI].byteSize() attributesToProcs[neiProcI].byteSize()
); );

View file

@ -94,7 +94,7 @@ bool boxRefinement::intersectsObject(const boundBox& bb) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dictionary boxRefinement::dict(bool ignoreType) const dictionary boxRefinement::dict(bool /*ignoreType*/) const
{ {
dictionary dict; dictionary dict;

View file

@ -106,7 +106,7 @@ bool coneRefinement::intersectsObject(const boundBox& bb) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dictionary coneRefinement::dict(bool ignoreType) const dictionary coneRefinement::dict(bool /*ignoreType*/) const
{ {
dictionary dict; dictionary dict;

View file

@ -115,7 +115,7 @@ bool hollowConeRefinement::intersectsObject(const boundBox& bb) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dictionary hollowConeRefinement::dict(bool ignoreType) const dictionary hollowConeRefinement::dict(bool /*ignoreType*/) const
{ {
dictionary dict; dictionary dict;
@ -235,7 +235,7 @@ void hollowConeRefinement::operator=(const dictionary& d)
{ {
FatalErrorIn FatalErrorIn
( (
"void hollowConeRefinement::operator=(const dictionary& d)" "void hollowConeRefinement::operator=(const dictionary& d)"
) << "Entry radius0_Inner is not specified!" << exit(FatalError); ) << "Entry radius0_Inner is not specified!" << exit(FatalError);
r0Inner_ = -1.0; r0Inner_ = -1.0;
} }
@ -272,11 +272,11 @@ void hollowConeRefinement::operator=(const dictionary& d)
// specify radius // specify radius
if( dict.found("radius1_Inner") ) if( dict.found("radius1_Inner") )
{ {
r1Inner_ = readScalar(dict.lookup("radius1_Inner")); r1Inner_ = readScalar(dict.lookup("radius1_Inner"));
} }
else else
{ {
FatalErrorIn FatalErrorIn
( (
"void hollowConeRefinement::operator=(const dictionary& d)" "void hollowConeRefinement::operator=(const dictionary& d)"
) << "Entry radius1_Inner is not specified!" << exit(FatalError); ) << "Entry radius1_Inner is not specified!" << exit(FatalError);

Some files were not shown because too many files have changed in this diff Show more