Bugfix: update cfMesh to v1.1 which fixes self-comparison always evaluates to false [-Wtautological-compare]
This commit is contained in:
parent
b9ba5ebf2e
commit
5f08a2f90a
305 changed files with 164476 additions and 162251 deletions
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 3.2
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
\\ / F ield | cfMesh: A library for mesh generation
|
||||
\\ / O peration |
|
||||
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
|
||||
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
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.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
cfMesh is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Reads the AVL's surface mesh
|
||||
|
@ -27,8 +27,6 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "triSurf.H"
|
||||
#include "triSurfModifier.H"
|
||||
#include "triFaceList.H"
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 3.2
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
\\ / F ield | cfMesh: A library for mesh generation
|
||||
\\ / O peration |
|
||||
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
|
||||
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
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.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
cfMesh is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Creates surface patches from surface subsets
|
||||
|
@ -27,8 +27,6 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "triSurf.H"
|
||||
#include "triSurfaceCopyParts.H"
|
||||
#include "demandDrivenData.H"
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 3.2
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
\\ / F ield | cfMesh: A library for mesh generation
|
||||
\\ / O peration |
|
||||
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
|
||||
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
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.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
cfMesh is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
cfMesh utility to convert a surface file to VTK multiblock dataset
|
||||
|
@ -45,7 +45,7 @@ using namespace Foam;
|
|||
void writePointsToVTK
|
||||
(
|
||||
const fileName& fn,
|
||||
const string& title,
|
||||
const string& /*title*/,
|
||||
const UList<point>& points
|
||||
)
|
||||
{
|
||||
|
@ -78,7 +78,7 @@ void writePointsToVTK
|
|||
const fileName& fn,
|
||||
const string& title,
|
||||
const UList<point>& points,
|
||||
unallocLabelList& addr
|
||||
UList<label>& addr
|
||||
)
|
||||
{
|
||||
// Create subaddressed points
|
||||
|
@ -102,7 +102,7 @@ void writePointsToVTK
|
|||
void writeEdgesToVTK
|
||||
(
|
||||
const fileName& fn,
|
||||
const string& title,
|
||||
const string& /*title*/,
|
||||
const UList<point>& points,
|
||||
const LongList<edge>& edges
|
||||
)
|
||||
|
@ -158,7 +158,7 @@ void writeEdgesToVTK
|
|||
const string& title,
|
||||
const UList<point>& points,
|
||||
const LongList<edge>& edges,
|
||||
const unallocLabelList& addr
|
||||
const UList<label>& addr
|
||||
)
|
||||
{
|
||||
// Remove unused points and create subaddressed edges
|
||||
|
@ -201,7 +201,7 @@ void writeEdgesToVTK
|
|||
void writeFacetsToVTK
|
||||
(
|
||||
const fileName& fn,
|
||||
const string& title,
|
||||
const string& /*title*/,
|
||||
const UList<point>& points,
|
||||
const LongList<labelledTri>& facets
|
||||
)
|
||||
|
@ -274,7 +274,7 @@ void writeFacetsToVTK
|
|||
const string& title,
|
||||
const pointField& points,
|
||||
const LongList<labelledTri>& facets,
|
||||
const unallocLabelList& addr
|
||||
const UList<label>& addr
|
||||
)
|
||||
{
|
||||
// Remove unused points and create subaddressed facets
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 3.2
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
\\ / O peration |
|
||||
\\ / A nd | For copyright notice see file Copyright
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of foam-extend.
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 3.2
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
\\ / F ield | cfMesh: A library for mesh generation
|
||||
\\ / O peration |
|
||||
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
|
||||
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
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.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
cfMesh is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
Generates cartesian mesh
|
||||
|
@ -30,8 +30,6 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "cartesian2DMeshGenerator.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 3.2
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
\\ / F ield | cfMesh: A library for mesh generation
|
||||
\\ / O peration |
|
||||
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
|
||||
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
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.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
cfMesh is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
Generates cartesian mesh
|
||||
|
@ -30,8 +30,6 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "cartesianMeshGenerator.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 3.2
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
\\ / F ield | cfMesh: A library for mesh generation
|
||||
\\ / O peration |
|
||||
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
|
||||
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
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.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
cfMesh is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Finds feature edges and corners of a triangulated surface
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 3.2
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
\\ / F ield | cfMesh: A library for mesh generation
|
||||
\\ / O peration |
|
||||
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
|
||||
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
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.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
cfMesh is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Reads the surface mesh, remove the selected facets
|
||||
|
@ -28,8 +28,6 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "triSurf.H"
|
||||
#include "triSurfaceExtrude2DEdges.H"
|
||||
#include "demandDrivenData.H"
|
||||
|
|
|
@ -28,8 +28,6 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "polyMeshGenModifier.H"
|
||||
#include "meshOptimizer.H"
|
||||
#include "boundaryLayers.H"
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 3.2
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
\\ / F ield | cfMesh: A library for mesh generation
|
||||
\\ / O peration |
|
||||
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
|
||||
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
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.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
cfMesh is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Finds feature edges and corners of a triangulated surface
|
||||
|
|
|
@ -28,8 +28,6 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "polyMeshGenModifier.H"
|
||||
#include "meshOptimizer.H"
|
||||
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 3.2
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
\\ / F ield | cfMesh: A library for mesh generation
|
||||
\\ / O peration |
|
||||
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
|
||||
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
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.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
cfMesh is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Ensures that all mesh points belonging to a symmetryPlane are
|
||||
|
@ -28,8 +28,6 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "polyMeshGenModifier.H"
|
||||
#include "symmetryPlaneOptimisation.H"
|
||||
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 3.2
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
\\ / F ield | cfMesh: A library for mesh generation
|
||||
\\ / O peration |
|
||||
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
|
||||
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
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.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
cfMesh is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
cfMesh utility to merge the supplied list of patches onto a single
|
||||
|
@ -31,8 +31,6 @@ Author
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "autoPtr.H"
|
||||
#include "triSurf.H"
|
||||
#include "triSurfModifier.H"
|
||||
|
@ -211,7 +209,7 @@ autoPtr<triSurf> mergeSurfacePatches
|
|||
label faceI = 0;
|
||||
forAll(patchAddr, patchI)
|
||||
{
|
||||
const unallocLabelList& addr = patchAddr[patchI];
|
||||
const UList<label>& addr = patchAddr[patchI];
|
||||
|
||||
if(addr.size())
|
||||
{
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 3.2
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
\\ / F ield | cfMesh: A library for mesh generation
|
||||
\\ / O peration |
|
||||
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
|
||||
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
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.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
cfMesh is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Writes the mesh in fpma format readable by AVL's CfdWM
|
||||
|
@ -27,8 +27,6 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "polyMeshGenModifier.H"
|
||||
#include "writeMeshFPMA.H"
|
||||
|
||||
|
|
|
@ -30,8 +30,6 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "voronoiMeshGenerator.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 3.2
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
\\ / F ield | cfMesh: A library for mesh generation
|
||||
\\ / O peration |
|
||||
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
|
||||
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
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.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
cfMesh is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Converts specified patches into subsets
|
||||
|
@ -27,8 +27,6 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "triSurf.H"
|
||||
#include "triFaceList.H"
|
||||
#include "labelLongList.H"
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 3.2
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
\\ / F ield | cfMesh: A library for mesh generation
|
||||
\\ / O peration |
|
||||
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
|
||||
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
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.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
cfMesh is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
Prepares the case for a parallel mesh generation run
|
||||
|
@ -30,8 +30,7 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "polyMeshGen.H"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
|
@ -83,16 +82,13 @@ int main(int argc, char *argv[])
|
|||
file += ss.str();
|
||||
Info << "Creating " << file << endl;
|
||||
|
||||
// create a directory for processor data
|
||||
//- create a directory for processor data
|
||||
mkDir(runTime.path()/file);
|
||||
|
||||
// generate constant directories
|
||||
mkDir(runTime.path()/"constant");
|
||||
|
||||
// copy the contents of the const directory into processor*
|
||||
//- copy the contents of the const directory into processor*
|
||||
cp(runTime.path()/"constant", runTime.path()/file);
|
||||
|
||||
// generate 0 directories
|
||||
//- generate 0 directories for
|
||||
mkDir(runTime.path()/file/"0");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 3.2
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
\\ / F ield | cfMesh: A library for mesh generation
|
||||
\\ / O peration |
|
||||
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
|
||||
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
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.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
cfMesh is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Reads the surface mesh, remove the selected facets
|
||||
|
@ -28,8 +28,6 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "triSurf.H"
|
||||
#include "triSurfaceRemoveFacets.H"
|
||||
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 3.2
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
\\ / F ield | cfMesh: A library for mesh generation
|
||||
\\ / O peration |
|
||||
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
|
||||
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
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.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
cfMesh is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Creates surface patches from surface subsets
|
||||
|
@ -27,8 +27,6 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "triSurf.H"
|
||||
#include "demandDrivenData.H"
|
||||
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 3.2
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
\\ / F ield | cfMesh: A library for mesh generation
|
||||
\\ / O peration |
|
||||
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
|
||||
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
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.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
cfMesh is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Finds feature edges and corners of a triangulated surface
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 3.2
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
\\ / F ield | cfMesh: A library for mesh generation
|
||||
\\ / O peration |
|
||||
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
|
||||
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
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.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
cfMesh is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Finds feature edges and corners of a triangulated surface
|
||||
|
@ -29,14 +29,14 @@ Description
|
|||
#include "argList.H"
|
||||
#include "IFstream.H"
|
||||
#include "fileName.H"
|
||||
#include "triSurf.H"
|
||||
#include "triSurfModifier.H"
|
||||
#include "boundBox.H"
|
||||
#include "OFstream.H"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <sstream>
|
||||
|
||||
#include "triSurfaceDetectFeatureEdges.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Main program:
|
||||
using namespace Foam;
|
||||
|
@ -121,12 +121,12 @@ int main(int argc, char *argv[])
|
|||
//- generate bounding bound triangles
|
||||
const label nTriangles = origSurface.size();
|
||||
LongList<labelledTri>& newTriangles = sMod.facetsAccess();
|
||||
newTriangles.setSize(nTriangles + 12);
|
||||
newTriangles.setSize(nTriangles+12);
|
||||
|
||||
//- create patches
|
||||
geometricSurfacePatchList& newPatches = sMod.patchesAccess();
|
||||
const label nPatches = origSurface.patches().size();
|
||||
newPatches.setSize(nPatches + 6);
|
||||
newPatches.setSize(nPatches+6);
|
||||
|
||||
newPatches[nPatches].name() = "xMin";
|
||||
newPatches[nPatches+1].name() = "xMax";
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 3.2
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
\\ / F ield | cfMesh: A library for mesh generation
|
||||
\\ / O peration |
|
||||
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
|
||||
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
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.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
cfMesh is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Reads the specified surface and writes it in the fms format.
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration | Version: 3.2
|
||||
\\ / A nd | Web: http://www.foam-extend.org
|
||||
\\/ M anipulation | For copyright notice see file Copyright
|
||||
\\ / F ield | cfMesh: A library for mesh generation
|
||||
\\ / O peration |
|
||||
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
|
||||
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
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.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
cfMesh is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
Generates tetrahedral mesh
|
||||
|
@ -30,8 +30,6 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "tetMeshGenerator.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
|
Binary file not shown.
|
@ -32,7 +32,6 @@ Description
|
|||
#include "triSurfacePatchManipulator.H"
|
||||
#include "triSurfaceCleanupDuplicateTriangles.H"
|
||||
#include "demandDrivenData.H"
|
||||
#include "foamTime.H"
|
||||
#include "meshOctreeCreator.H"
|
||||
#include "cartesianMeshExtractor.H"
|
||||
#include "meshSurfaceEngine.H"
|
||||
|
@ -188,7 +187,7 @@ void cartesian2DMeshGenerator::refBoundaryLayers()
|
|||
|
||||
void cartesian2DMeshGenerator::replaceBoundaries()
|
||||
{
|
||||
renameBoundaryPatches rbp(mesh_, meshDict_);
|
||||
renameBoundaryPatches rbp(mesh_, meshDict_, true);
|
||||
}
|
||||
|
||||
void cartesian2DMeshGenerator::renumberMesh()
|
||||
|
@ -198,8 +197,6 @@ void cartesian2DMeshGenerator::renumberMesh()
|
|||
|
||||
void cartesian2DMeshGenerator::generateMesh()
|
||||
{
|
||||
try
|
||||
{
|
||||
if( controller_.runCurrentStep("templateGeneration") )
|
||||
{
|
||||
createCartesianMesh();
|
||||
|
@ -247,18 +244,6 @@ void cartesian2DMeshGenerator::generateMesh()
|
|||
replaceBoundaries();
|
||||
|
||||
controller_.workflowCompleted();
|
||||
}
|
||||
catch(const std::string& message)
|
||||
{
|
||||
Info << message << endl;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"void cartesian2DMeshGenerator::generateMesh()"
|
||||
) << "Meshing process terminated!" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
@ -283,6 +268,8 @@ cartesian2DMeshGenerator::cartesian2DMeshGenerator(const Time& time)
|
|||
mesh_(time),
|
||||
controller_(mesh_)
|
||||
{
|
||||
try
|
||||
{
|
||||
if( true )
|
||||
{
|
||||
checkMeshDict cmd(meshDict_);
|
||||
|
@ -317,7 +304,10 @@ cartesian2DMeshGenerator::cartesian2DMeshGenerator(const Time& time)
|
|||
if( surfacePtr_->featureEdges().size() != 0 )
|
||||
{
|
||||
//- get rid of duplicate triangles as they cause strange problems
|
||||
triSurfaceCleanupDuplicateTriangles(const_cast<triSurf&>(*surfacePtr_));
|
||||
triSurfaceCleanupDuplicateTriangles
|
||||
(
|
||||
const_cast<triSurf&>(*surfacePtr_)
|
||||
);
|
||||
|
||||
//- create surface patches based on the feature edges
|
||||
//- and update the meshDict based on the given data
|
||||
|
@ -347,6 +337,18 @@ cartesian2DMeshGenerator::cartesian2DMeshGenerator(const Time& time)
|
|||
meshOctreeCreator(*octreePtr_, meshDict_).createOctreeBoxes();
|
||||
|
||||
generateMesh();
|
||||
}
|
||||
catch(const std::string& message)
|
||||
{
|
||||
Info << message << endl;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"cartesian2DMeshGenerator::cartesian2DMeshGenerator(const Time&)"
|
||||
) << "Meshing process terminated!" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
|
|
@ -418,8 +418,8 @@ void cartesianMeshExtractor::createPolyMesh()
|
|||
newFacePatch
|
||||
);
|
||||
|
||||
meshModifier.boundariesAccess()[1].patchType() = "patch";
|
||||
meshModifier.boundariesAccess()[2].patchType() = "patch";
|
||||
meshModifier.boundariesAccess()[1].patchType() = "empty";
|
||||
meshModifier.boundariesAccess()[2].patchType() = "empty";
|
||||
}
|
||||
|
||||
Info << "Finished creating polyMesh" << endl;
|
||||
|
|
|
@ -29,7 +29,6 @@ Description
|
|||
#include "triSurf.H"
|
||||
#include "triSurfacePatchManipulator.H"
|
||||
#include "demandDrivenData.H"
|
||||
#include "foamTime.H"
|
||||
#include "meshOctreeCreator.H"
|
||||
#include "cartesianMeshExtractor.H"
|
||||
#include "meshSurfaceEngine.H"
|
||||
|
@ -247,8 +246,6 @@ void cartesianMeshGenerator::renumberMesh()
|
|||
|
||||
void cartesianMeshGenerator::generateMesh()
|
||||
{
|
||||
try
|
||||
{
|
||||
if( controller_.runCurrentStep("templateGeneration") )
|
||||
{
|
||||
createCartesianMesh();
|
||||
|
@ -298,18 +295,6 @@ void cartesianMeshGenerator::generateMesh()
|
|||
replaceBoundaries();
|
||||
|
||||
controller_.workflowCompleted();
|
||||
}
|
||||
catch(const std::string& message)
|
||||
{
|
||||
Info << message << endl;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"void cartesianMeshGenerator::generateMesh()"
|
||||
) << "Meshing process terminated!" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
@ -334,6 +319,8 @@ cartesianMeshGenerator::cartesianMeshGenerator(const Time& time)
|
|||
mesh_(time),
|
||||
controller_(mesh_)
|
||||
{
|
||||
try
|
||||
{
|
||||
if( true )
|
||||
{
|
||||
checkMeshDict cmd(meshDict_);
|
||||
|
@ -385,6 +372,19 @@ cartesianMeshGenerator::cartesianMeshGenerator(const Time& time)
|
|||
meshOctreeCreator(*octreePtr_, meshDict_).createOctreeBoxes();
|
||||
|
||||
generateMesh();
|
||||
}
|
||||
catch(const std::string& message)
|
||||
{
|
||||
Info << "Here" << endl;
|
||||
Info << message << endl;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"cartesianMeshGenerator::cartesianMeshGenerator(const Time&)"
|
||||
) << "Meshing process terminated!" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
|
|
@ -28,7 +28,6 @@ Description
|
|||
#include "tetMeshGenerator.H"
|
||||
#include "triSurf.H"
|
||||
#include "demandDrivenData.H"
|
||||
#include "foamTime.H"
|
||||
#include "meshOctreeCreator.H"
|
||||
#include "tetMeshExtractorOctree.H"
|
||||
#include "meshSurfaceEngine.H"
|
||||
|
@ -235,8 +234,6 @@ void tetMeshGenerator::renumberMesh()
|
|||
|
||||
void tetMeshGenerator::generateMesh()
|
||||
{
|
||||
try
|
||||
{
|
||||
if( controller_.runCurrentStep("templateGeneration") )
|
||||
{
|
||||
createTetMesh();
|
||||
|
@ -286,18 +283,6 @@ void tetMeshGenerator::generateMesh()
|
|||
replaceBoundaries();
|
||||
|
||||
controller_.workflowCompleted();
|
||||
}
|
||||
catch(const std::string& message)
|
||||
{
|
||||
Info << message << endl;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"void tetMeshGenerator::generateMesh()"
|
||||
) << "Meshing process terminated!" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
@ -323,6 +308,8 @@ tetMeshGenerator::tetMeshGenerator(const Time& time)
|
|||
mesh_(time),
|
||||
controller_(mesh_)
|
||||
{
|
||||
try
|
||||
{
|
||||
if( true )
|
||||
{
|
||||
checkMeshDict cmd(meshDict_);
|
||||
|
@ -372,6 +359,18 @@ tetMeshGenerator::tetMeshGenerator(const Time& time)
|
|||
meshOctreeCreator(*octreePtr_, meshDict_).createOctreeBoxes();
|
||||
|
||||
generateMesh();
|
||||
}
|
||||
catch(const std::string& message)
|
||||
{
|
||||
Info << message << endl;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"tetMeshGenerator::tetMeshGenerator(const Time&)"
|
||||
) << "Meshing process terminated!" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ coordinateModification::coordinateModification()
|
|||
coordinateModification::coordinateModification
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& dict
|
||||
const dictionary& /*dict*/
|
||||
)
|
||||
:
|
||||
name_(name)
|
||||
|
|
|
@ -36,8 +36,6 @@ SourceFiles
|
|||
#ifndef coordinateModifier_H
|
||||
#define coordinateModifier_H
|
||||
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "word.H"
|
||||
#include "point.H"
|
||||
#include "coordinateModificationList.H"
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -35,8 +35,6 @@ SourceFiles
|
|||
#ifndef boundaryLayers_H
|
||||
#define boundaryLayers_H
|
||||
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "polyMeshGenModifier.H"
|
||||
#include "meshSurfaceEngine.H"
|
||||
#include "meshSurfacePartitioner.H"
|
||||
|
|
|
@ -686,7 +686,7 @@ void boundaryLayers::createNewPartitionVerticesParallel
|
|||
(
|
||||
const labelLongList& procPoints,
|
||||
const List<direction>& pVertices,
|
||||
const boolList& treatPatches
|
||||
const boolList& /*treatPatches*/
|
||||
)
|
||||
{
|
||||
if( !Pstream::parRun() )
|
||||
|
|
|
@ -374,7 +374,7 @@ void extrudeLayer::createNewVertices()
|
|||
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo(),
|
||||
globalLabels.byteSize()
|
||||
);
|
||||
|
@ -390,7 +390,7 @@ void extrudeLayer::createNewVertices()
|
|||
labelList receivedData;
|
||||
IPstream fromOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo()
|
||||
);
|
||||
|
||||
|
@ -498,7 +498,7 @@ void extrudeLayer::createNewVertices()
|
|||
|
||||
DynList<label> edgeGroup;
|
||||
edgeGroup.setSize(dEdges.size());
|
||||
edgeGroup = -1;
|
||||
edgeGroup = label(-1);
|
||||
|
||||
//- check edge connections and store all edges which can be reached
|
||||
//- over other edges into the same group
|
||||
|
@ -538,7 +538,7 @@ void extrudeLayer::createNewVertices()
|
|||
//- find face groups from the groups assigned to dual edges
|
||||
DynList<label> faceGroups;
|
||||
faceGroups.setSize(pointFaces.sizeOfRow(pointI));
|
||||
faceGroups = -1;
|
||||
faceGroups = label(-1);
|
||||
|
||||
forAllRow(pointFaces, pointI, pfI)
|
||||
{
|
||||
|
@ -618,7 +618,7 @@ void extrudeLayer::createNewVertices()
|
|||
//- assign groups to faces and cells
|
||||
DynList<label> faceGroup;
|
||||
faceGroup.setSize(pointFaces.sizeOfRow(pointI));
|
||||
faceGroup = -1;
|
||||
faceGroup = label(-1);
|
||||
|
||||
label group(0);
|
||||
|
||||
|
@ -1114,7 +1114,7 @@ void extrudeLayer::createLayerCells()
|
|||
//- find labels of points
|
||||
DynList<label> origFacePoints;
|
||||
origFacePoints.setSize(pointFaces.sizeOfRow(pointI));
|
||||
origFacePoints = -1;
|
||||
origFacePoints = label(-1);
|
||||
|
||||
forAllRow(pointFaces, pointI, pfI)
|
||||
{
|
||||
|
|
|
@ -36,8 +36,6 @@ SourceFiles
|
|||
#ifndef extrudeLayer_H
|
||||
#define extrudeLayer_H
|
||||
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "polyMeshGenModifier.H"
|
||||
#include "VRWGraphList.H"
|
||||
#include "labelPair.H"
|
||||
|
|
|
@ -36,8 +36,6 @@ SourceFiles
|
|||
#ifndef refineBoundaryLayers_H
|
||||
#define refineBoundaryLayers_H
|
||||
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "polyMeshGenModifier.H"
|
||||
#include "meshSurfaceEngine.H"
|
||||
#include "DynList.H"
|
||||
|
|
|
@ -885,7 +885,7 @@ void refineBoundaryLayers::refineCornerHexCell::generateNewPoints()
|
|||
forAll(cellPoints_[i], j)
|
||||
{
|
||||
cellPoints_[i][j].setSize(nLayersK_+1);
|
||||
cellPoints_[i][j] = -1;
|
||||
cellPoints_[i][j] = label(-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ void refineBoundaryLayers::refineFace
|
|||
forAll(facePoints, i)
|
||||
{
|
||||
facePoints[i].setSize(nLayersDir1+1);
|
||||
facePoints[i] = -1;
|
||||
facePoints[i] = label(-1);
|
||||
}
|
||||
|
||||
//- add points in the matrix
|
||||
|
@ -1049,7 +1049,7 @@ void refineBoundaryLayers::generateNewFaces()
|
|||
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo(),
|
||||
sendData.byteSize()
|
||||
);
|
||||
|
@ -1065,7 +1065,7 @@ void refineBoundaryLayers::generateNewFaces()
|
|||
|
||||
IPstream fromOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo()
|
||||
);
|
||||
|
||||
|
|
|
@ -269,7 +269,7 @@ bool refineBoundaryLayers::analyseLayers()
|
|||
{
|
||||
if( allZMin[patchI] ^ allZMax[patchI] )
|
||||
{
|
||||
nLayersAtPatch[patchI] = -1;
|
||||
nLayersAtPatch[patchI] = label(-1);
|
||||
layerAtPatch_[patchI].clear();
|
||||
}
|
||||
}
|
||||
|
@ -599,7 +599,7 @@ void refineBoundaryLayers::generateNewVertices()
|
|||
//- on edges of the mesh
|
||||
DynList<label> numPointsAtThread;
|
||||
numPointsAtThread.setSize(nThreads);
|
||||
numPointsAtThread = 0;
|
||||
numPointsAtThread = label(0);
|
||||
|
||||
# ifdef USE_OMP
|
||||
# pragma omp parallel for num_threads(nThreads) schedule(static, 1)
|
||||
|
|
|
@ -36,8 +36,6 @@ SourceFiles
|
|||
#ifndef triangulateNonPlanarBaseFaces_H
|
||||
#define triangulateNonPlanarBaseFaces_H
|
||||
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "polyMeshGenModifier.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
|
|
@ -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
|
||||
{
|
||||
checkBasicSettings();
|
||||
|
@ -785,6 +833,8 @@ void checkMeshDict::checkEntries() const
|
|||
checkBoundaryLayers();
|
||||
|
||||
checkRenameBoundary();
|
||||
|
||||
checkQualitySettings();
|
||||
}
|
||||
|
||||
void checkMeshDict::updatePatchCellSize
|
||||
|
@ -860,7 +910,7 @@ void checkMeshDict::updatePatchCellSize
|
|||
|
||||
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
|
||||
(
|
||||
const std::map<word, wordList>& patchesFromPatch
|
||||
const std::map<word, wordList>& /*patchesFromPatch*/
|
||||
)
|
||||
{
|
||||
|
||||
|
|
|
@ -35,8 +35,6 @@ SourceFiles
|
|||
#ifndef checkMeshDict_H
|
||||
#define checkMeshDict_H
|
||||
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "IOdictionary.H"
|
||||
|
||||
#include <map>
|
||||
|
@ -92,6 +90,9 @@ class checkMeshDict
|
|||
//- check renameBoundary entry
|
||||
void checkRenameBoundary() const;
|
||||
|
||||
//- check entry for mesh quality
|
||||
void checkQualitySettings() const;
|
||||
|
||||
//- perform all checks
|
||||
void checkEntries() const;
|
||||
|
||||
|
|
|
@ -29,9 +29,11 @@ License
|
|||
|
||||
// Construct from Istream
|
||||
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)
|
||||
{
|
||||
FatalErrorIn
|
||||
|
@ -39,11 +41,6 @@ Foam::DynList<T, staticSize>::DynList(Istream& is)
|
|||
"template<class T, Foam::label staticSize>"
|
||||
"\nFoam::DynList<T, staticSize>::DynList(Istream& is)"
|
||||
) << "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
|
||||
)
|
||||
{
|
||||
UList<T> helper(const_cast<T*>(DL.begin()), DL.nextFree_);
|
||||
UList<T> helper(DL.dataPtr_, DL.nextFree_);
|
||||
os << helper;
|
||||
|
||||
return os;
|
||||
|
@ -75,8 +72,10 @@ Foam::Istream& Foam::operator>>
|
|||
"(Foam::Istream& is, Foam::DynList<T, staticSize>& DL)"
|
||||
) << "Not implemented" << exit(FatalError);
|
||||
|
||||
is >> static_cast<List<T>&>(DL);
|
||||
DL.nextFree_ = DL.List<T>::size();
|
||||
UList<T> helper(DL.dataPtr_, DL.nextFree_);
|
||||
//is >> static_cast<List<T>&>(DL);
|
||||
is >> helper;
|
||||
DL.nextFree_ = helper.size();
|
||||
|
||||
return is;
|
||||
}
|
||||
|
|
|
@ -73,10 +73,14 @@ Istream& operator>>
|
|||
|
||||
template<class T, label staticSize = 16>
|
||||
class DynList
|
||||
:
|
||||
public UList<T>
|
||||
{
|
||||
// Private data
|
||||
//- pointer to the data
|
||||
T* dataPtr_;
|
||||
|
||||
//- size of the allocated data
|
||||
label nAllocated_;
|
||||
|
||||
//- statically allocated data (used for short lists)
|
||||
T staticData_[staticSize];
|
||||
|
||||
|
@ -84,12 +88,21 @@ class DynList
|
|||
label nextFree_;
|
||||
|
||||
// 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
|
||||
inline void allocateSize(const label);
|
||||
|
||||
//- check if index is inside the scope (used for debugging only)
|
||||
inline void checkIndex(const label) const;
|
||||
|
||||
//- check if nAllocated_ is greater or equal to nextFree_
|
||||
inline void checkAllocation() const;
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
@ -100,6 +113,11 @@ public:
|
|||
//- Construct given size
|
||||
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
|
||||
explicit inline DynList(const label, const T&);
|
||||
|
||||
|
@ -205,6 +223,10 @@ public:
|
|||
template<class 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
|
||||
|
||||
|
|
|
@ -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>
|
||||
inline void Foam::DynList<T, staticSize>::allocateSize(const label s)
|
||||
{
|
||||
if( s > UList<T>::size() )
|
||||
checkAllocation();
|
||||
|
||||
if( s > staticSize )
|
||||
{
|
||||
if( s > nAllocated_ )
|
||||
{
|
||||
//- allocates enough space for the elements
|
||||
T* newData = new T[s];
|
||||
|
||||
for(label i=0;i<nextFree_;++i)
|
||||
newData[i] = this->operator[](i);
|
||||
|
||||
T* data = UList<T>::begin();
|
||||
if( data && (data != staticData_) )
|
||||
delete [] data;
|
||||
if( nAllocated_ > staticSize )
|
||||
delete [] dataPtr_;
|
||||
|
||||
//UList<T>::reset(newData, s);
|
||||
this->UList<T>::operator=(UList<T>(newData, s));
|
||||
dataPtr_ = newData;
|
||||
nAllocated_ = s;
|
||||
}
|
||||
else if( (s > staticSize) && (s < UList<T>::size()) )
|
||||
else if( s < nAllocated_ )
|
||||
{
|
||||
//- shrinks the list
|
||||
T* newData = new T[s];
|
||||
|
||||
for(label i=0;i<s;++i)
|
||||
newData[i] = this->operator[](i);
|
||||
|
||||
T* data = UList<T>::begin();
|
||||
delete [] data;
|
||||
delete [] dataPtr_;
|
||||
|
||||
//UList<T>::reset(newData, s);
|
||||
this->UList<T>::operator=(UList<T>(newData, s));
|
||||
dataPtr_ = newData;
|
||||
nAllocated_ = s;
|
||||
}
|
||||
else if( (s <= staticSize) && (UList<T>::size() > staticSize) )
|
||||
}
|
||||
else
|
||||
{
|
||||
if( nAllocated_ > staticSize )
|
||||
{
|
||||
//- delete dynamically allocated data
|
||||
for(label i=0;i<s;++i)
|
||||
staticData_[i] = UList<T>::operator[](i);
|
||||
staticData_[i] = dataPtr_[i];
|
||||
|
||||
T* data = UList<T>::begin();
|
||||
if( data && (data != staticData_) )
|
||||
delete [] data;
|
||||
delete [] dataPtr_;
|
||||
}
|
||||
|
||||
//UList<T>::reset(staticData_, staticSize);
|
||||
this->UList<T>::operator=(UList<T>(staticData_, staticSize));
|
||||
dataPtr_ = staticData_;
|
||||
nAllocated_ = 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 * * * * * * * * * * * * * * //
|
||||
|
||||
//- Construct null
|
||||
template<class T, Foam::label staticSize>
|
||||
inline Foam::DynList<T, staticSize>::DynList()
|
||||
:
|
||||
UList<T>(staticData_, staticSize),
|
||||
dataPtr_(nullptr),
|
||||
nAllocated_(0),
|
||||
staticData_(),
|
||||
nextFree_(0)
|
||||
{}
|
||||
{
|
||||
setSize(0);
|
||||
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
}
|
||||
|
||||
|
||||
template<class T, Foam::label staticSize>
|
||||
inline Foam::DynList<T, staticSize>::DynList(const label s)
|
||||
:
|
||||
UList<T>(staticData_, staticSize),
|
||||
dataPtr_(nullptr),
|
||||
nAllocated_(0),
|
||||
staticData_(),
|
||||
nextFree_(0)
|
||||
{
|
||||
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>
|
||||
inline Foam::DynList<T, staticSize>::DynList(const label s, const T& val)
|
||||
:
|
||||
UList<T>(staticData_, staticSize),
|
||||
dataPtr_(nullptr),
|
||||
nAllocated_(0),
|
||||
staticData_(),
|
||||
nextFree_(0)
|
||||
{
|
||||
setSize(s);
|
||||
|
||||
for(label i=0;i<s;++i)
|
||||
this->operator[](i) = val;
|
||||
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
}
|
||||
|
||||
template<class T, Foam::label staticSize>
|
||||
inline Foam::DynList<T, staticSize>::DynList(const UList<T>& ul)
|
||||
:
|
||||
UList<T>(staticData_, staticSize),
|
||||
dataPtr_(nullptr),
|
||||
nAllocated_(0),
|
||||
staticData_(),
|
||||
nextFree_(0)
|
||||
{
|
||||
setSize(ul.size());
|
||||
|
||||
forAll(ul, i)
|
||||
this->operator[](i) = ul[i];
|
||||
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
}
|
||||
|
||||
template<class T, Foam::label staticSize>
|
||||
template<class ListType>
|
||||
inline Foam::DynList<T, staticSize>::DynList(const ListType& l)
|
||||
:
|
||||
UList<T>(staticData_, staticSize),
|
||||
dataPtr_(nullptr),
|
||||
nAllocated_(0),
|
||||
staticData_(),
|
||||
nextFree_(0)
|
||||
{
|
||||
setSize(l.size());
|
||||
for(label i=0;i<nextFree_;++i)
|
||||
this->operator[](i) = l[i];
|
||||
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
}
|
||||
|
||||
//- Copy construct
|
||||
|
@ -145,19 +227,24 @@ inline Foam::DynList<T, staticSize>::DynList
|
|||
const DynList<T, staticSize>& dl
|
||||
)
|
||||
:
|
||||
UList<T>(staticData_, staticSize),
|
||||
dataPtr_(nullptr),
|
||||
nAllocated_(0),
|
||||
staticData_(),
|
||||
nextFree_(0)
|
||||
{
|
||||
setSize(dl.size());
|
||||
for(label i=0;i<nextFree_;++i)
|
||||
this->operator[](i) = dl[i];
|
||||
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
}
|
||||
|
||||
template<class T, Foam::label staticSize>
|
||||
inline Foam::DynList<T, staticSize>::~DynList()
|
||||
{
|
||||
allocateSize(0);
|
||||
//UList<T>::reset(nullptr, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -166,12 +253,20 @@ inline Foam::DynList<T, staticSize>::~DynList()
|
|||
template<class T, Foam::label staticSize>
|
||||
inline Foam::label Foam::DynList<T, staticSize>::size() const
|
||||
{
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
|
||||
return nextFree_;
|
||||
}
|
||||
|
||||
template<class T, Foam::label staticSize>
|
||||
inline Foam::label Foam::DynList<T, staticSize>::byteSize() const
|
||||
{
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
|
||||
if( !contiguous<T>() )
|
||||
{
|
||||
FatalErrorIn("DynList<T>::byteSize()")
|
||||
|
@ -181,20 +276,31 @@ inline Foam::label Foam::DynList<T, staticSize>::byteSize() const
|
|||
}
|
||||
|
||||
return nextFree_*sizeof(T);
|
||||
|
||||
}
|
||||
|
||||
template<class T, Foam::label staticSize>
|
||||
inline void Foam::DynList<T, staticSize>::setSize(const label s)
|
||||
{
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
|
||||
allocateSize(s);
|
||||
nextFree_ = s;
|
||||
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
}
|
||||
|
||||
|
||||
template<class T, Foam::label staticSize>
|
||||
inline void Foam::DynList<T, staticSize>::clear()
|
||||
{
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
|
||||
nextFree_ = 0;
|
||||
}
|
||||
|
||||
|
@ -202,34 +308,62 @@ inline void Foam::DynList<T, staticSize>::clear()
|
|||
template<class T, Foam::label staticSize>
|
||||
void Foam::DynList<T, staticSize>::shrink()
|
||||
{
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
|
||||
allocateSize(nextFree_);
|
||||
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
}
|
||||
|
||||
template<class T, Foam::label staticSize>
|
||||
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);
|
||||
}
|
||||
|
||||
UList<T>::operator[](nextFree_++) = e;
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
|
||||
this->operator[](nextFree_++) = e;
|
||||
}
|
||||
|
||||
template<class T, Foam::label staticSize>
|
||||
inline void Foam::DynList<T, staticSize>::appendIfNotIn(const T& e)
|
||||
{
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
|
||||
if( !contains(e) )
|
||||
append(e);
|
||||
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
}
|
||||
|
||||
template<class T, Foam::label staticSize>
|
||||
inline bool Foam::DynList<T, staticSize>::contains(const T& e) const
|
||||
{
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
|
||||
for(label i=0;i<nextFree_;++i)
|
||||
{
|
||||
if( UList<T>::operator[](i) == e )
|
||||
if( this->operator[](i) == e )
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -242,9 +376,13 @@ inline Foam::label Foam::DynList<T, staticSize>::containsAtPosition
|
|||
const T& e
|
||||
) const
|
||||
{
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
|
||||
for(label i=0;i<nextFree_;++i)
|
||||
{
|
||||
if( UList<T>::operator[](i) == e )
|
||||
if( this->operator[](i) == e )
|
||||
return i;
|
||||
}
|
||||
|
||||
|
@ -254,12 +392,20 @@ inline Foam::label Foam::DynList<T, staticSize>::containsAtPosition
|
|||
template<class T, Foam::label staticSize>
|
||||
inline const T& Foam::DynList<T, staticSize>::lastElement() const
|
||||
{
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
|
||||
return this->operator[](nextFree_-1);
|
||||
}
|
||||
|
||||
template<class T, Foam::label staticSize>
|
||||
inline T Foam::DynList<T, staticSize>::removeLastElement()
|
||||
{
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
|
||||
if( nextFree_ == 0 )
|
||||
{
|
||||
FatalErrorIn
|
||||
|
@ -268,13 +414,18 @@ inline T Foam::DynList<T, staticSize>::removeLastElement()
|
|||
) << "List is empty" << abort(FatalError);
|
||||
}
|
||||
|
||||
T el = UList<T>::operator[](--nextFree_);
|
||||
T el = this->operator[](nextFree_-1);
|
||||
--nextFree_;
|
||||
return el;
|
||||
}
|
||||
|
||||
template<class T, Foam::label staticSize>
|
||||
inline T Foam::DynList<T, staticSize>::removeElement(const label i)
|
||||
{
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
|
||||
if( nextFree_ == 0 )
|
||||
{
|
||||
FatalErrorIn
|
||||
|
@ -287,12 +438,20 @@ inline T Foam::DynList<T, staticSize>::removeElement(const label i)
|
|||
this->operator[](i) = this->operator[](nextFree_-1);
|
||||
--nextFree_;
|
||||
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
|
||||
return el;
|
||||
}
|
||||
|
||||
template<class T, Foam::label staticSize>
|
||||
inline T& Foam::DynList<T, staticSize>::newElmt(const label i)
|
||||
{
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
|
||||
return this->operator()(i);
|
||||
}
|
||||
|
||||
|
@ -301,13 +460,21 @@ inline T& Foam::DynList<T, staticSize>::newElmt(const label i)
|
|||
template<class T, Foam::label staticSize>
|
||||
inline T& Foam::DynList<T, staticSize>::operator()(const label i)
|
||||
{
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
|
||||
nextFree_ = Foam::max(nextFree_, i + 1);
|
||||
|
||||
if( nextFree_ >= UList<T>::size() )
|
||||
if( nextFree_ >= nAllocated_ )
|
||||
{
|
||||
allocateSize(2 * nextFree_+1);
|
||||
}
|
||||
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
|
||||
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
|
||||
{
|
||||
# ifdef FULLDEBUG
|
||||
checkAllocation();
|
||||
checkIndex(i);
|
||||
# endif
|
||||
|
||||
return UList<T>::operator[](i);
|
||||
return dataPtr_[i];
|
||||
}
|
||||
|
||||
template<class T, Foam::label staticSize>
|
||||
inline T& Foam::DynList<T, staticSize>::operator[](const label i)
|
||||
{
|
||||
# ifdef FULLDEBUG
|
||||
checkAllocation();
|
||||
checkIndex(i);
|
||||
# endif
|
||||
|
||||
return UList<T>::operator[](i);
|
||||
return dataPtr_[i];
|
||||
}
|
||||
|
||||
template<class T, Foam::label staticSize>
|
||||
|
@ -374,7 +543,12 @@ inline const T& Foam::DynList<T, staticSize>::rcElement
|
|||
template<class T, Foam::label staticSize>
|
||||
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>
|
||||
|
@ -383,9 +557,17 @@ inline void Foam::DynList<T, staticSize>::operator=
|
|||
const DynList<T, staticSize>& dl
|
||||
)
|
||||
{
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
|
||||
allocateSize(dl.size());
|
||||
nextFree_ = dl.size();
|
||||
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
|
||||
for(label i=0;i<nextFree_;++i)
|
||||
this->operator[](i) = dl[i];
|
||||
}
|
||||
|
@ -394,12 +576,45 @@ template<class T, Foam::label staticSize>
|
|||
template<class ListType>
|
||||
inline void Foam::DynList<T, staticSize>::operator=(const ListType& l)
|
||||
{
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
|
||||
allocateSize(l.size());
|
||||
nextFree_ = l.size();
|
||||
|
||||
# ifdef DEBUG
|
||||
checkAllocation();
|
||||
# endif
|
||||
|
||||
for(label i=0;i<nextFree_;++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);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -34,15 +34,34 @@ Foam::Ostream& Foam::operator<<
|
|||
const Foam::FRWGraph<T, width>& DL
|
||||
)
|
||||
{
|
||||
os << DL.size() << "(" << endl;
|
||||
for(register label i=0;i<DL.size();++i)
|
||||
os << DL.size() << "(" << nl;
|
||||
|
||||
for(label i=0;i<DL.size();++i)
|
||||
{
|
||||
os << width << "(";
|
||||
|
||||
for(label j=0;j<width;++j)
|
||||
os << DL(i, j) << " " << endl;
|
||||
os << ")" << endl;
|
||||
{
|
||||
if( j )
|
||||
{
|
||||
os << " ";
|
||||
}
|
||||
|
||||
os << DL(i, j);
|
||||
}
|
||||
|
||||
os << ")" << nl;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ inline Foam::label Foam::FRWGraph<T,width>::size() const
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -155,7 +155,8 @@ inline bool Foam::FRWGraph<T,width>::contains
|
|||
) const
|
||||
{
|
||||
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 )
|
||||
return true;
|
||||
|
||||
|
@ -170,7 +171,8 @@ inline Foam::label Foam::FRWGraph<T,width>::containsAtPosition
|
|||
) const
|
||||
{
|
||||
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 )
|
||||
return i;
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@ IODynList<T, IndexType>::IODynList(const IOobject& io)
|
|||
(
|
||||
io.readOpt() == IOobject::MUST_READ
|
||||
|| (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||
|| (io.readOpt() == IOobject::READ_IF_PRESENT_IF_MODIFIED && headerOk())
|
||||
)
|
||||
{
|
||||
readStream(typeName) >> *this;
|
||||
|
@ -77,11 +76,7 @@ IODynList<T, IndexType>::IODynList
|
|||
regIOobject(io),
|
||||
DynList<T, IndexType>()
|
||||
{
|
||||
if
|
||||
(
|
||||
(io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||
|| (io.readOpt() == IOobject::READ_IF_PRESENT_IF_MODIFIED && headerOk())
|
||||
)
|
||||
if (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||
{
|
||||
readStream(typeName) >> *this;
|
||||
close();
|
||||
|
|
|
@ -46,7 +46,6 @@ IOLongList<T, Offset>::IOLongList(const IOobject& io)
|
|||
(
|
||||
io.readOpt() == IOobject::MUST_READ
|
||||
|| (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||
|| (io.readOpt() == IOobject::READ_IF_PRESENT_IF_MODIFIED && headerOk())
|
||||
)
|
||||
{
|
||||
readStream(typeName) >> *this;
|
||||
|
@ -77,11 +76,7 @@ IOLongList<T, Offset>::IOLongList
|
|||
regIOobject(io),
|
||||
LongList<T, Offset>()
|
||||
{
|
||||
if
|
||||
(
|
||||
(io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||
|| (io.readOpt() == IOobject::READ_IF_PRESENT_IF_MODIFIED && headerOk())
|
||||
)
|
||||
if (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||
{
|
||||
readStream(typeName) >> *this;
|
||||
close();
|
||||
|
|
|
@ -202,7 +202,7 @@ Foam::Istream& Foam::operator>>
|
|||
|
||||
if( listDelimiter == token::BEGIN_LIST )
|
||||
{
|
||||
for(register label i=0;i<size;++i)
|
||||
for(label i=0;i<size;++i)
|
||||
{
|
||||
is >> DL[i];
|
||||
|
||||
|
@ -223,7 +223,7 @@ Foam::Istream& Foam::operator>>
|
|||
"reading the single entry"
|
||||
);
|
||||
|
||||
for(register label i=0;i<size;++i)
|
||||
for(label i=0;i<size;++i)
|
||||
{
|
||||
DL[i] = element;
|
||||
}
|
||||
|
@ -306,7 +306,7 @@ void Foam::LongList<T, Offset>::appendFromStream(Istream& is)
|
|||
|
||||
if( listDelimiter == token::BEGIN_LIST )
|
||||
{
|
||||
for(register label i=0;i<size;++i)
|
||||
for(label i=0;i<size;++i)
|
||||
{
|
||||
is >> this->operator[](origSize);
|
||||
++origSize;
|
||||
|
@ -328,7 +328,7 @@ void Foam::LongList<T, Offset>::appendFromStream(Istream& is)
|
|||
"reading the single entry"
|
||||
);
|
||||
|
||||
for(register label i=0;i<size;++i)
|
||||
for(label i=0;i<size;++i)
|
||||
{
|
||||
this->operator[](origSize) = element;
|
||||
++origSize;
|
||||
|
@ -346,31 +346,6 @@ void Foam::LongList<T, Offset>::appendFromStream(Istream& is)
|
|||
forAll(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
|
||||
(
|
||||
"appendFromStream(Istream& is)"
|
||||
|
|
|
@ -78,7 +78,7 @@ inline void Foam::LongList<T, Offset>::allocateSize(const label s)
|
|||
|
||||
if( numblock1 < numBlocks_ )
|
||||
{
|
||||
for(register label i=numblock1;i<numBlocks_;++i)
|
||||
for(label i=numblock1;i<numBlocks_;++i)
|
||||
delete [] dataPtr_[i];
|
||||
}
|
||||
else if( numblock1 > numBlocks_ )
|
||||
|
@ -91,7 +91,8 @@ inline void Foam::LongList<T, Offset>::allocateSize(const label s)
|
|||
} while( numblock1 > 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];
|
||||
|
||||
if( dataPtr_ )
|
||||
|
@ -99,7 +100,7 @@ inline void Foam::LongList<T, Offset>::allocateSize(const label s)
|
|||
dataPtr_ = dataptr1;
|
||||
}
|
||||
|
||||
for(register label i=numBlocks_;i<numblock1;++i)
|
||||
for(label i=numBlocks_;i<numblock1;++i)
|
||||
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>
|
||||
void Foam::LongList<T, Offset>::clearOut()
|
||||
{
|
||||
for(register label i=0;i<numBlocks_;++i)
|
||||
for(label i=0;i<numBlocks_;++i)
|
||||
delete [] dataPtr_[i];
|
||||
|
||||
if( dataPtr_ )
|
||||
|
@ -281,7 +282,7 @@ inline void Foam::LongList<T, Offset>::appendIfNotIn(const T& e)
|
|||
template<class T, Foam::label Offset>
|
||||
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 )
|
||||
return true;
|
||||
|
||||
|
@ -294,7 +295,7 @@ inline Foam::label Foam::LongList<T, Offset>::containsAtPosition
|
|||
const T& e
|
||||
) const
|
||||
{
|
||||
for(register label i=0;i<nextFree_;++i)
|
||||
for(label i=0;i<nextFree_;++i)
|
||||
if( (*this)[i] == e )
|
||||
return i;
|
||||
|
||||
|
@ -376,7 +377,7 @@ inline T& Foam::LongList<T, Offset>::newElmt(const label i)
|
|||
template<class T, Foam::label Offset>
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -384,7 +385,8 @@ template<class T, Foam::label Offset>
|
|||
inline void Foam::LongList<T, Offset>::operator=(const LongList<T, Offset>& l)
|
||||
{
|
||||
setSize(l.size());
|
||||
for(register label i=0;i<l.nextFree_;++i)
|
||||
|
||||
for(label i=0;i<l.nextFree_;++i)
|
||||
operator[](i) = l[i];
|
||||
}
|
||||
|
||||
|
|
|
@ -35,22 +35,29 @@ Foam::Ostream& Foam::operator<<
|
|||
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)
|
||||
{
|
||||
if( j > 0 ) os << token::SPACE;
|
||||
if( j ) os << token::SPACE;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ SourceFiles
|
|||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
class VRWGraphModifier;
|
||||
|
||||
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
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
|
|
@ -518,7 +518,7 @@ inline bool Foam::VRWGraph::contains
|
|||
return false;
|
||||
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 )
|
||||
return true;
|
||||
|
||||
|
@ -536,7 +536,8 @@ inline Foam::label Foam::VRWGraph::containsAtPosition
|
|||
return -1;
|
||||
|
||||
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 )
|
||||
return i;
|
||||
|
||||
|
|
|
@ -37,12 +37,20 @@ Foam::Ostream& Foam::operator<<
|
|||
{
|
||||
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 << token::END_LIST;
|
||||
|
||||
// Check state of IOstream
|
||||
os.check
|
||||
(
|
||||
"Foam::Ostream& Foam::operator<<"
|
||||
"(Foam::Ostream&, const Foam::VRWGraphList&)"
|
||||
);
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,6 +45,12 @@ SourceFiles
|
|||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
|
||||
class VRWGraphList;
|
||||
|
||||
Ostream& operator<<(Ostream&, const VRWGraphList&);
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class VRWGraphList Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
|
|
@ -26,8 +26,6 @@ Description
|
|||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "polyMeshGen.H"
|
||||
#include "meshSurfaceEngine.H"
|
||||
#include "OFstream.H"
|
||||
|
|
|
@ -117,7 +117,7 @@ void decomposeCells::checkFaceConnections(const boolList& decomposeCell)
|
|||
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo(),
|
||||
decFace.byteSize()
|
||||
);
|
||||
|
@ -132,7 +132,7 @@ void decomposeCells::checkFaceConnections(const boolList& decomposeCell)
|
|||
|
||||
IPstream fromOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
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_);
|
||||
const faceList::subList& bFaces = mse.boundaryFaces();
|
||||
|
|
|
@ -23,7 +23,7 @@ License
|
|||
|
||||
Description
|
||||
|
||||
\*----------------------p-----------------------------------------------------*/
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "decomposeCells.H"
|
||||
#include "helperFunctions.H"
|
||||
|
@ -55,8 +55,10 @@ void decomposeCells::findAddressingForCell
|
|||
const faceListPMG& faces = mesh_.faces();
|
||||
forAll(faceEdges, feI)
|
||||
{
|
||||
faceEdges[feI].setSize(faces[c[feI]].size());
|
||||
faceEdges[feI] = -1;
|
||||
DynList<label, 8>& fEdges = faceEdges[feI];
|
||||
|
||||
fEdges.setSize(faces[c[feI]].size());
|
||||
fEdges = label(-1);
|
||||
}
|
||||
|
||||
forAll(c, fI)
|
||||
|
@ -127,9 +129,9 @@ void decomposeCells::findAddressingForCell
|
|||
label decomposeCells::findTopVertex
|
||||
(
|
||||
const label cellI,
|
||||
const DynList<label, 32>& vrt,
|
||||
const DynList<edge, 64>& edges,
|
||||
const DynList<DynList<label, 2>, 64>& edgeFaces
|
||||
const DynList<label, 32>& /*vrt*/,
|
||||
const DynList<edge, 64>& /*edges*/,
|
||||
const DynList<DynList<label, 2>, 64>& /*edgeFaces*/
|
||||
)
|
||||
{
|
||||
const cell& c = mesh_.cells()[cellI];
|
||||
|
|
|
@ -370,7 +370,7 @@ void decomposeFaces::decomposeConcaveInternalFaces
|
|||
# endif
|
||||
|
||||
//- decompose internal faces
|
||||
for(register label faceI=0;faceI<nIntFaces;++faceI)
|
||||
for(label faceI=0;faceI<nIntFaces;++faceI)
|
||||
{
|
||||
const face& f = faces[faceI];
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "quadricFitting.H"
|
||||
#include "helperFunctions.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -48,11 +49,15 @@ void quadricFitting::calculateNormalVector()
|
|||
mat /= otherPoints_.size();
|
||||
|
||||
//- find the eigenvalues of the tensor
|
||||
const vector ev = eigenValues(mat);
|
||||
const vector ev = help::eigenValues(mat);
|
||||
|
||||
//- estimate the normal as the eigenvector associated
|
||||
//- 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()
|
||||
|
|
|
@ -87,7 +87,7 @@ public:
|
|||
return pts_[i];
|
||||
}
|
||||
|
||||
inline bool operator !=(const parPartTet& ptf) const
|
||||
inline bool operator !=(const parPartTet& /*ptf*/) const
|
||||
{
|
||||
Serr << "Not implemented" << endl;
|
||||
::exit(1);
|
||||
|
|
|
@ -99,12 +99,10 @@ class parTriFace
|
|||
|
||||
// Member operators
|
||||
|
||||
inline bool operator !=(const parTriFace& ptf) const
|
||||
inline bool operator !=(const parTriFace& /*ptf*/) const
|
||||
{
|
||||
Serr << "parTriFace::operator!= Not implemented" << endl;
|
||||
::exit(1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Friend operators
|
||||
|
|
|
@ -50,7 +50,7 @@ void sortEdgesIntoChains::createNodeLabels()
|
|||
newNodeLabel_.insert(e.end(), nPoints++);
|
||||
}
|
||||
|
||||
edgesAtPoint_.setSize(nPoints, DynList<label>());
|
||||
edgesAtPoint_.setSize(nPoints);
|
||||
forAll(bEdges_, eI)
|
||||
{
|
||||
const edge& e = bEdges_[eI];
|
||||
|
@ -69,7 +69,7 @@ void sortEdgesIntoChains::createNodeLabels()
|
|||
bool sortEdgesIntoChains::findPointsBelongingToTheChain
|
||||
(
|
||||
const label currPos,
|
||||
boolList& chainEdges
|
||||
DynList<bool>& chainEdges
|
||||
) const
|
||||
{
|
||||
# ifdef DEBUGSort
|
||||
|
@ -150,7 +150,7 @@ bool sortEdgesIntoChains::findPointsBelongingToTheChain
|
|||
return true;
|
||||
}
|
||||
|
||||
void sortEdgesIntoChains::shrinkEdges(const boolList& chainEdges)
|
||||
void sortEdgesIntoChains::shrinkEdges(const DynList<bool>& chainEdges)
|
||||
{
|
||||
forAll(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)
|
||||
if( chainEdges[eI] )
|
||||
++i;
|
||||
|
||||
labelList chainPoints(i);
|
||||
DynList<label> chainPoints(i);
|
||||
i = 0;
|
||||
|
||||
forAll(chainEdges, eI)
|
||||
|
@ -232,7 +232,7 @@ void sortEdgesIntoChains::sortEdges()
|
|||
|
||||
if( !openEdges_ )
|
||||
{
|
||||
boolList chainEdges(bEdges_.size());
|
||||
DynList<bool> chainEdges(bEdges_.size());
|
||||
forAll(edgesAtPoint_, pI)
|
||||
if( findPointsBelongingToTheChain(pI, chainEdges) )
|
||||
{
|
||||
|
@ -257,12 +257,11 @@ sortEdgesIntoChains::sortEdgesIntoChains(const DynList<edge>& bEdges)
|
|||
}
|
||||
|
||||
sortEdgesIntoChains::~sortEdgesIntoChains()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
|
||||
// Member functions
|
||||
const DynList<labelList>& sortEdgesIntoChains::sortedChains() const
|
||||
const DynList<DynList<label> >& sortEdgesIntoChains::sortedChains() const
|
||||
{
|
||||
return createdChains_;
|
||||
}
|
||||
|
|
|
@ -39,7 +39,6 @@ SourceFiles
|
|||
#include "labelList.H"
|
||||
#include "edge.H"
|
||||
#include "Map.H"
|
||||
#include "boolList.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
@ -57,9 +56,9 @@ class sortEdgesIntoChains
|
|||
|
||||
Map<label> newNodeLabel_;
|
||||
|
||||
List<DynList<label> > edgesAtPoint_;
|
||||
DynList<DynList<label> > edgesAtPoint_;
|
||||
|
||||
DynList<labelList> createdChains_;
|
||||
DynList<DynList<label> > createdChains_;
|
||||
|
||||
// Private member functions
|
||||
void createNodeLabels();
|
||||
|
@ -67,12 +66,12 @@ class sortEdgesIntoChains
|
|||
bool findPointsBelongingToTheChain
|
||||
(
|
||||
const label currPos,
|
||||
boolList& chainEdges
|
||||
DynList<bool>& chainEdges
|
||||
) 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();
|
||||
|
||||
|
@ -88,7 +87,7 @@ class sortEdgesIntoChains
|
|||
// Member functions
|
||||
|
||||
//- a list of points which have not yet been resolved
|
||||
const DynList<labelList>& sortedChains() const;
|
||||
const DynList<DynList<label> >& sortedChains() const;
|
||||
};
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
|
|
@ -316,7 +316,7 @@ label groupMarking
|
|||
//- ones into a new group
|
||||
DynList<label> globalGroupLabel;
|
||||
globalGroupLabel.setSize(nGroups);
|
||||
globalGroupLabel = -1;
|
||||
globalGroupLabel = label(-1);
|
||||
|
||||
//- reduce the information about the groups
|
||||
label counter(0);
|
||||
|
|
|
@ -65,6 +65,12 @@ namespace help
|
|||
template<class 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
|
||||
template<class Face1, class Face2>
|
||||
inline bool isSharedEdgeConvex
|
||||
|
@ -289,6 +295,9 @@ namespace help
|
|||
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
|
||||
inline bool isVertexVisible(const point& p, const plane& pl);
|
||||
|
||||
|
|
|
@ -69,6 +69,168 @@ bool isinf(const ListType& l)
|
|||
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>
|
||||
inline bool isSharedEdgeConvex
|
||||
(
|
||||
|
@ -1056,7 +1218,7 @@ inline bool doTrianglesOverlap
|
|||
x /= (mag(x) + VSMALL);
|
||||
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[1] = point2D((tri0.b() - origin) & x, (tri0.b() - origin) & y);
|
||||
poly2D[2] = point2D((tri0.c() - origin) & x, (tri0.c() - origin) & y);
|
||||
|
@ -1612,6 +1774,17 @@ inline bool isFaceConvexAndOk
|
|||
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
|
||||
(
|
||||
const point& edgePoint0,
|
||||
|
|
|
@ -79,7 +79,7 @@ void whisperReduce(const ListType& neis, const scatterOp& sop, gatherOp& gop)
|
|||
{
|
||||
//- receive the data
|
||||
List<T> receivedData;
|
||||
IPstream fromOtherProc(Pstream::blocking, above[aboveI]);
|
||||
IPstream fromOtherProc(Pstream::commsTypes::blocking, above[aboveI]);
|
||||
fromOtherProc >> receivedData;
|
||||
|
||||
gop(receivedData);
|
||||
|
@ -94,7 +94,13 @@ void whisperReduce(const ListType& neis, const scatterOp& sop, gatherOp& gop)
|
|||
sop(dts);
|
||||
|
||||
//- send the data
|
||||
OPstream toOtherProc(Pstream::blocking, neiProc, dts.byteSize());
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::commsTypes::blocking,
|
||||
neiProc,
|
||||
dts.byteSize()
|
||||
);
|
||||
|
||||
toOtherProc << dts;
|
||||
}
|
||||
|
||||
|
@ -104,7 +110,7 @@ void whisperReduce(const ListType& neis, const scatterOp& sop, gatherOp& gop)
|
|||
{
|
||||
//- receive the data
|
||||
List<T> receivedData;
|
||||
IPstream fromOtherProc(Pstream::blocking, below[belowI]);
|
||||
IPstream fromOtherProc(Pstream::commsTypes::blocking, below[belowI]);
|
||||
fromOtherProc >> receivedData;
|
||||
|
||||
gop(receivedData);
|
||||
|
@ -119,7 +125,13 @@ void whisperReduce(const ListType& neis, const scatterOp& sop, gatherOp& gop)
|
|||
sop(dts);
|
||||
|
||||
//- send the data
|
||||
OPstream toOtherProc(Pstream::blocking, neiProc, dts.byteSize());
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::commsTypes::blocking,
|
||||
neiProc,
|
||||
dts.byteSize()
|
||||
);
|
||||
|
||||
toOtherProc << dts;
|
||||
}
|
||||
}
|
||||
|
@ -143,14 +155,24 @@ void exchangeMap
|
|||
labelHashSet receiveData;
|
||||
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();
|
||||
}
|
||||
|
||||
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;
|
||||
fromOtherProc >> s;
|
||||
|
@ -159,7 +181,7 @@ void exchangeMap
|
|||
receiveData.insert(iter->first);
|
||||
}
|
||||
|
||||
if( commsType == Pstream::blocking )
|
||||
if( commsType == Pstream::commsTypes::blocking )
|
||||
{
|
||||
//- start with blocking type of send and received operation
|
||||
|
||||
|
@ -173,7 +195,7 @@ void exchangeMap
|
|||
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
iter->first,
|
||||
dts.byteSize()
|
||||
);
|
||||
|
@ -186,11 +208,16 @@ void exchangeMap
|
|||
if( !receiveData.found(iter->first) )
|
||||
continue;
|
||||
|
||||
IPstream fromOtherProc(Pstream::blocking, iter->first);
|
||||
IPstream fromOtherProc
|
||||
(
|
||||
Pstream::commsTypes::blocking,
|
||||
iter->first
|
||||
);
|
||||
|
||||
data.appendFromStream(fromOtherProc);
|
||||
}
|
||||
}
|
||||
else if( commsType == Pstream::scheduled )
|
||||
else if( commsType == Pstream::commsTypes::scheduled )
|
||||
{
|
||||
//- start with scheduled data transfer
|
||||
//- this type of transfer is intended for long messages because
|
||||
|
@ -204,13 +231,13 @@ void exchangeMap
|
|||
if( !receiveData.found(iter->first) )
|
||||
continue;
|
||||
|
||||
//List<T> receive;
|
||||
IPstream fromOtherProc(Pstream::scheduled, iter->first);
|
||||
//fromOtherProc >> receive;
|
||||
data.appendFromStream(fromOtherProc);
|
||||
IPstream fromOtherProc
|
||||
(
|
||||
Pstream::commsTypes::scheduled,
|
||||
iter->first
|
||||
);
|
||||
|
||||
//forAll(receive, i)
|
||||
// data.append(receive[i]);
|
||||
data.appendFromStream(fromOtherProc);
|
||||
}
|
||||
|
||||
//- send data to processors with greater ids
|
||||
|
@ -226,7 +253,7 @@ void exchangeMap
|
|||
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::scheduled,
|
||||
Pstream::commsTypes::scheduled,
|
||||
iter->first,
|
||||
dts.byteSize()
|
||||
);
|
||||
|
@ -243,13 +270,13 @@ void exchangeMap
|
|||
if( !receiveData.found(riter->first) )
|
||||
continue;
|
||||
|
||||
IPstream fromOtherProc(Pstream::scheduled, riter->first);
|
||||
//List<T> receive;
|
||||
//fromOtherProc >> receive;
|
||||
data.appendFromStream(fromOtherProc);
|
||||
IPstream fromOtherProc
|
||||
(
|
||||
Pstream::commsTypes::scheduled,
|
||||
riter->first
|
||||
);
|
||||
|
||||
//forAll(receive, i)
|
||||
// data.append(receive[i]);
|
||||
data.appendFromStream(fromOtherProc);
|
||||
}
|
||||
|
||||
//- send data to processors with lower ids
|
||||
|
@ -265,7 +292,7 @@ void exchangeMap
|
|||
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::scheduled,
|
||||
Pstream::commsTypes::scheduled,
|
||||
riter->first,
|
||||
dts.byteSize()
|
||||
);
|
||||
|
@ -317,7 +344,7 @@ void exchangeMap
|
|||
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
iter->first,
|
||||
dataToSend.byteSize()
|
||||
);
|
||||
|
@ -330,7 +357,12 @@ void exchangeMap
|
|||
mOut.insert(std::make_pair(iter->first, List<T>()));
|
||||
List<T>& dataToReceive = mOut[iter->first];
|
||||
|
||||
IPstream fromOtherProc(Pstream::blocking, iter->first);
|
||||
IPstream fromOtherProc
|
||||
(
|
||||
Pstream::commsTypes::blocking,
|
||||
iter->first
|
||||
);
|
||||
|
||||
fromOtherProc >> dataToReceive;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ void exchangeMap
|
|||
(
|
||||
const std::map<label, ListType>&,
|
||||
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
|
||||
|
|
|
@ -488,7 +488,7 @@ inline void zipOpenChain(DynList<edge>& bEdges)
|
|||
}
|
||||
|
||||
bool closed(true);
|
||||
DynList<label> openVertices(2);
|
||||
DynList<label> openVertices(label(2));
|
||||
forAll(chainVertices, pI)
|
||||
if( nAppearances[pI] == 1 )
|
||||
{
|
||||
|
|
|
@ -591,7 +591,7 @@ void partTetMesh::updateOrigMesh(boolList* changedFacePtr)
|
|||
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
pBnd[patchI].neiProcNo(),
|
||||
sendData.byteSize()
|
||||
);
|
||||
|
@ -605,7 +605,7 @@ void partTetMesh::updateOrigMesh(boolList* changedFacePtr)
|
|||
|
||||
IPstream fromOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
pBnd[patchI].neiProcNo()
|
||||
);
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ void partTetMesh::createPointsAndTets
|
|||
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo(),
|
||||
dataToSend.byteSize()
|
||||
);
|
||||
|
@ -103,7 +103,7 @@ void partTetMesh::createPointsAndTets
|
|||
|
||||
IPstream fromOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo()
|
||||
);
|
||||
|
||||
|
|
|
@ -46,8 +46,8 @@ namespace Foam
|
|||
void partTetMesh::createParallelAddressing
|
||||
(
|
||||
const labelLongList& nodeLabelForPoint,
|
||||
const labelLongList& nodeLabelForFace,
|
||||
const labelLongList& nodeLabelForCell
|
||||
const labelLongList& /*nodeLabelForFace*/,
|
||||
const labelLongList& /*nodeLabelForCell*/
|
||||
)
|
||||
{
|
||||
//- vertices marked as SMOOTH and BOUNDARY are used by the smoother
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace Foam
|
|||
void partTriMesh::createParallelAddressing
|
||||
(
|
||||
const labelList& nodeLabelForPoint,
|
||||
const labelList& nodeLabelForFace
|
||||
const labelList& /*nodeLabelForFace*/
|
||||
)
|
||||
{
|
||||
const meshSurfaceEngine& mse = mPart_.surfaceEngine();
|
||||
|
@ -351,7 +351,7 @@ void partTriMesh::createBufferLayers()
|
|||
{
|
||||
const parTriFace& tri = receivedTrias[i];
|
||||
|
||||
DynList<label, 3> triPointLabels(3);
|
||||
DynList<label, 3> triPointLabels(label(3));
|
||||
for(label j=0;j<3;++j)
|
||||
{
|
||||
const label gpI = tri.globalLabelOfPoint(j);
|
||||
|
|
|
@ -90,7 +90,7 @@ void processorBoundaryPatch::write(Ostream& os) const
|
|||
this->operator<<(os);
|
||||
}
|
||||
|
||||
void processorBoundaryPatch::writeDict(Ostream& os) const
|
||||
void processorBoundaryPatch::writeDict(Ostream& /*os*/) const
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ SourceFiles
|
|||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "polyMeshGenCells.H"
|
||||
#include "dictionary.H"
|
||||
#include "IOdictionary.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
|
|
@ -37,7 +37,6 @@ SourceFiles
|
|||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "objectRegistry.H"
|
||||
#include "foamTime.H"
|
||||
#include "meshSubset.H"
|
||||
#include "pointFieldPMG.H"
|
||||
|
|
|
@ -131,7 +131,7 @@ void polyMeshGenAddressing::calcGlobalPointLabels() const
|
|||
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo(),
|
||||
dataToSend.byteSize()
|
||||
);
|
||||
|
@ -142,7 +142,7 @@ void polyMeshGenAddressing::calcGlobalPointLabels() const
|
|||
{
|
||||
IPstream fromOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo()
|
||||
);
|
||||
labelList receivedData;
|
||||
|
@ -236,7 +236,7 @@ void polyMeshGenAddressing::calcGlobalPointLabels() const
|
|||
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo(),
|
||||
dataToSend.byteSize()
|
||||
);
|
||||
|
@ -247,7 +247,7 @@ void polyMeshGenAddressing::calcGlobalPointLabels() const
|
|||
{
|
||||
IPstream fromOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo()
|
||||
);
|
||||
labelList receivedData;
|
||||
|
@ -344,7 +344,7 @@ void polyMeshGenAddressing::calcGlobalFaceLabels() const
|
|||
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo(),
|
||||
dataToSend.byteSize()
|
||||
);
|
||||
|
@ -358,7 +358,7 @@ void polyMeshGenAddressing::calcGlobalFaceLabels() const
|
|||
{
|
||||
IPstream fromOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo()
|
||||
);
|
||||
|
||||
|
@ -529,7 +529,7 @@ void polyMeshGenAddressing::calcGlobalEdgeLabels() const
|
|||
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo(),
|
||||
dataToSend.byteSize()
|
||||
);
|
||||
|
@ -540,7 +540,7 @@ void polyMeshGenAddressing::calcGlobalEdgeLabels() const
|
|||
{
|
||||
IPstream fromOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo()
|
||||
);
|
||||
labelList receivedData;
|
||||
|
@ -642,7 +642,7 @@ void polyMeshGenAddressing::calcGlobalEdgeLabels() const
|
|||
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo(),
|
||||
dataToSend.byteSize()
|
||||
);
|
||||
|
@ -653,7 +653,7 @@ void polyMeshGenAddressing::calcGlobalEdgeLabels() const
|
|||
{
|
||||
IPstream fromOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo()
|
||||
);
|
||||
labelList receivedData;
|
||||
|
|
|
@ -82,6 +82,66 @@ bool checkFaceAreas
|
|||
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
|
||||
//- Cells are decomposed into tetrahedra formed by
|
||||
//- 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.
|
||||
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 negative pyramids and zero area faces
|
||||
label findBadFacesRelaxed
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -87,7 +87,7 @@ void polyMeshGenModifier::addBufferCells()
|
|||
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo()
|
||||
);
|
||||
|
||||
|
@ -100,7 +100,7 @@ void polyMeshGenModifier::addBufferCells()
|
|||
List<labelledPoint> receivedPoints;
|
||||
IPstream fromOtherProc
|
||||
(
|
||||
IPstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo()
|
||||
);
|
||||
|
||||
|
@ -154,7 +154,7 @@ void polyMeshGenModifier::addBufferCells()
|
|||
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo()
|
||||
);
|
||||
|
||||
|
@ -171,7 +171,7 @@ void polyMeshGenModifier::addBufferCells()
|
|||
|
||||
IPstream fromOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo()
|
||||
);
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ void polyMeshGenModifier::removeFaces(const boolList& removeFace)
|
|||
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo(),
|
||||
removeProcFace.byteSize()
|
||||
);
|
||||
|
@ -142,7 +142,7 @@ void polyMeshGenModifier::removeFaces(const boolList& removeFace)
|
|||
boolList removeOtherProcFace;
|
||||
IPstream fromOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procBoundaries[patchI].neiProcNo()
|
||||
);
|
||||
fromOtherProc >> removeOtherProcFace;
|
||||
|
@ -187,7 +187,7 @@ void polyMeshGenModifier::removeFaces(const boolList& removeFace)
|
|||
neiProcNo[npI] = procBoundaries[patchI].neiProcNo();
|
||||
nFacesInPatch[npI] = 0;
|
||||
|
||||
for(register label faceI=0;faceI<oldNumFacesInPatch;++faceI)
|
||||
for(label faceI=0;faceI<oldNumFacesInPatch;++faceI)
|
||||
{
|
||||
if(
|
||||
!removeFace[oldStart+faceI] &&
|
||||
|
|
|
@ -170,7 +170,7 @@ inline bool meshSubset::operator==(const meshSubset& ms) const
|
|||
{
|
||||
if( ms.name_ != name_ )
|
||||
return false;
|
||||
if( ms.type_ != ms.type_ )
|
||||
if( ms.type_ != type_ )
|
||||
return false;
|
||||
|
||||
forAllConstIter(std::set<label>, data_, it)
|
||||
|
|
|
@ -81,28 +81,22 @@ void triSurfAddressing::calculateEdges() const
|
|||
const label triI = pFacets(pI, pfI);
|
||||
const labelledTri& tri = facets_[triI];
|
||||
|
||||
label pos(-1);
|
||||
forAll(tri, i)
|
||||
{
|
||||
if( tri[i] == pI )
|
||||
{
|
||||
pos = i;
|
||||
|
||||
|
||||
if( tri[(pos+1)%3] >= pI )
|
||||
if( tri[(i+1)%3] >= pI )
|
||||
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
|
||||
(
|
||||
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;
|
||||
|
@ -119,7 +113,6 @@ void triSurfAddressing::calculateEdges() const
|
|||
# endif
|
||||
nEdgesForThread[threadI] = edgesHelper.size();
|
||||
|
||||
|
||||
# ifdef USE_OMP
|
||||
# pragma omp critical
|
||||
# endif
|
||||
|
|
|
@ -133,7 +133,7 @@ void meshOctree::setOctantVectorsAndPositions()
|
|||
//- set vrtLeavesPos_
|
||||
for(label vrtI=0;vrtI<8;++vrtI)
|
||||
{
|
||||
FixedList<label, 3> vc(0);
|
||||
FixedList<label, 3> vc(label(0));
|
||||
|
||||
if( vrtI & 1 )
|
||||
vc[0] += 1;
|
||||
|
|
|
@ -171,7 +171,7 @@ void meshOctreeAddressing::calcGlobalPointLabels() const
|
|||
{
|
||||
//- receive the data
|
||||
labelList receivedLabels;
|
||||
IPstream fromOtherProc(Pstream::blocking, above[aboveI]);
|
||||
IPstream fromOtherProc(Pstream::commsTypes::blocking, above[aboveI]);
|
||||
fromOtherProc >> receivedLabels;
|
||||
|
||||
label counter(0);
|
||||
|
@ -245,7 +245,7 @@ void meshOctreeAddressing::calcGlobalPointLabels() const
|
|||
}
|
||||
|
||||
//- send the data
|
||||
OPstream toOtherProc(Pstream::blocking, neiProc, dts.byteSize());
|
||||
OPstream toOtherProc(Pstream::commsTypes::blocking, neiProc, dts.byteSize());
|
||||
toOtherProc << dts;
|
||||
}
|
||||
|
||||
|
@ -255,7 +255,7 @@ void meshOctreeAddressing::calcGlobalPointLabels() const
|
|||
{
|
||||
//- receive the data
|
||||
labelList receivedLabels;
|
||||
IPstream fromOtherProc(Pstream::blocking, below[belowI]);
|
||||
IPstream fromOtherProc(Pstream::commsTypes::blocking, below[belowI]);
|
||||
fromOtherProc >> receivedLabels;
|
||||
|
||||
label counter(0);
|
||||
|
@ -329,7 +329,7 @@ void meshOctreeAddressing::calcGlobalPointLabels() const
|
|||
}
|
||||
|
||||
//- send the data
|
||||
OPstream toOtherProc(Pstream::blocking, neiProc, dts.byteSize());
|
||||
OPstream toOtherProc(Pstream::commsTypes::blocking, neiProc, dts.byteSize());
|
||||
toOtherProc << dts;
|
||||
}
|
||||
}
|
||||
|
@ -437,7 +437,7 @@ void meshOctreeAddressing::calcGlobalLeafLabels() const
|
|||
|
||||
//- exchange the data with other processors
|
||||
LongList<meshOctreeCubeBasic> rLeaves;
|
||||
help::exchangeMap(exchangeData, rLeaves, Pstream::scheduled);
|
||||
help::exchangeMap(exchangeData, rLeaves, Pstream::commsTypes::scheduled);
|
||||
|
||||
//- update the local data
|
||||
forAll(rLeaves, i)
|
||||
|
@ -479,9 +479,9 @@ void meshOctreeAddressing::calcGlobalLeafLabels() const
|
|||
|
||||
//- exchange the data
|
||||
rLeaves.clear();
|
||||
help::exchangeMap(exchangeData, rLeaves, Pstream::scheduled);
|
||||
help::exchangeMap(exchangeData, rLeaves, Pstream::commsTypes::scheduled);
|
||||
labelLongList rLabels;
|
||||
help::exchangeMap(exchangeLabels, rLabels, Pstream::scheduled);
|
||||
help::exchangeMap(exchangeLabels, rLabels, Pstream::commsTypes::scheduled);
|
||||
|
||||
if( rLeaves.size() != rLabels.size() )
|
||||
FatalErrorIn("void meshOctreeAddressing::calcGlobalLeafLabels() const")
|
||||
|
@ -526,7 +526,7 @@ void meshOctreeAddressing::calcGlobalLeafLabels() const
|
|||
|
||||
//- exchange the data
|
||||
rLabels.clear();
|
||||
help::exchangeMap(exchangeLabels, rLabels, Pstream::scheduled);
|
||||
help::exchangeMap(exchangeLabels, rLabels, Pstream::commsTypes::scheduled);
|
||||
|
||||
//- update the local data
|
||||
label counter(0);
|
||||
|
|
|
@ -135,7 +135,7 @@ void meshOctreeAutomaticRefinement::setMaxRefLevel()
|
|||
{
|
||||
finished = false;
|
||||
|
||||
const scalar lSize = size / pow(2, label(maxRefLevel_));
|
||||
const scalar lSize = size / pow(2.0, label(maxRefLevel_));
|
||||
|
||||
if( lSize < cs )
|
||||
{
|
||||
|
|
|
@ -770,7 +770,7 @@ void meshOctreeCreator::refineBoxesIntersectingEdgeMeshes()
|
|||
const point& sp = points[e.start()];
|
||||
const point& ep = points[e.end()];
|
||||
|
||||
boundBox edgeBB(sp, ep);
|
||||
boundBox edgeBB(min(sp, ep), max(sp, ep));
|
||||
|
||||
edgeBB.min() -= tol;
|
||||
edgeBB.max() += tol;
|
||||
|
|
|
@ -84,12 +84,12 @@ void meshOctreeCreator::setRootCubeSizeAndRefParameters()
|
|||
{
|
||||
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)) )
|
||||
{
|
||||
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.min() = c - point(bbSize, bbSize, bbSize);
|
||||
finished = true;
|
||||
|
@ -133,7 +133,7 @@ void meshOctreeCreator::setRootCubeSizeAndRefParameters()
|
|||
{
|
||||
finished = false;
|
||||
|
||||
const scalar lSize = maxSize / Foam::pow(2, addLevel);
|
||||
const scalar lSize = maxSize / Foam::pow(label(2), addLevel);
|
||||
|
||||
if( lSize <= cs )
|
||||
{
|
||||
|
@ -230,7 +230,7 @@ void meshOctreeCreator::setRootCubeSizeAndRefParameters()
|
|||
{
|
||||
finished = false;
|
||||
|
||||
const scalar lSize = maxSize / Foam::pow(2, addLevel);
|
||||
const scalar lSize = maxSize / Foam::pow(label(2), addLevel);
|
||||
|
||||
if( lSize <= cs )
|
||||
{
|
||||
|
@ -308,7 +308,7 @@ void meshOctreeCreator::setRootCubeSizeAndRefParameters()
|
|||
{
|
||||
finished = false;
|
||||
|
||||
const scalar lSize = maxSize / Foam::pow(2, addLevel);
|
||||
const scalar lSize = maxSize / Foam::pow(label(2), addLevel);
|
||||
|
||||
if( lSize <= cs )
|
||||
{
|
||||
|
@ -380,7 +380,7 @@ void meshOctreeCreator::setRootCubeSizeAndRefParameters()
|
|||
{
|
||||
finished = false;
|
||||
|
||||
const scalar lSize = maxSize / Foam::pow(2, nLevel);
|
||||
const scalar lSize = maxSize / Foam::pow(label(2), nLevel);
|
||||
|
||||
if( lSize <= cs )
|
||||
{
|
||||
|
|
|
@ -97,7 +97,7 @@ inline meshOctreeCubeCoordinates meshOctreeCubeCoordinates::refineForPosition
|
|||
) const
|
||||
{
|
||||
//- create new boxes in z-order fashion
|
||||
FixedList<label, 3> addPos(0);
|
||||
FixedList<label, 3> addPos(label(0));
|
||||
if( i & 1 )
|
||||
addPos[0] = 1;
|
||||
if( i & 2 )
|
||||
|
@ -523,16 +523,23 @@ inline Istream& operator>>
|
|||
meshOctreeCubeCoordinates& cc
|
||||
)
|
||||
{
|
||||
// Read beginning of meshOctreeCubeCoordinates
|
||||
//- Read beginning of meshOctreeCubeCoordinates
|
||||
is.readBegin("meshOctreeCubeCoordinates");
|
||||
|
||||
//- read the level in the octree structure
|
||||
label l;
|
||||
is >> l;
|
||||
cc.level_ = l;
|
||||
|
||||
//- read x, y and z coordinates
|
||||
is.readBegin("meshOctreeCubeCoordinates");
|
||||
|
||||
is >> cc.posX_;
|
||||
is >> cc.posY_;
|
||||
is >> cc.posZ_;
|
||||
|
||||
is.readEnd("meshOctreeCubeCoordinates");
|
||||
|
||||
// Read end of meshOctreeCubeCoordinates
|
||||
is.readEnd("meshOctreeCubeCoordinates");
|
||||
|
||||
|
@ -551,10 +558,15 @@ inline Ostream& operator<<
|
|||
os << token::BEGIN_LIST;
|
||||
|
||||
os << label(cc.level_) << token::SPACE;
|
||||
|
||||
os << token::BEGIN_LIST;
|
||||
|
||||
os << cc.posX_ << token::SPACE;
|
||||
os << cc.posY_ << token::SPACE;
|
||||
os << cc.posZ_ << token::END_LIST;
|
||||
|
||||
os << token::END_LIST;
|
||||
|
||||
// Check state of Ostream
|
||||
os.check("operator<<(Ostream&, const meshOctreeCubeCoordinates");
|
||||
|
||||
|
|
|
@ -136,6 +136,16 @@ void meshOctree::findNearestSurfacePointInRegion
|
|||
const point& p
|
||||
) 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);
|
||||
vector sizeVec;
|
||||
if( cLabel < 0 )
|
||||
|
|
|
@ -214,7 +214,7 @@ void meshOctreeModifier::loadDistribution(const direction usedType)
|
|||
|
||||
List<meshOctreeCubeBasic> mc;
|
||||
|
||||
IPstream fromOtherProc(Pstream::blocking, iter.key());
|
||||
IPstream fromOtherProc(Pstream::commsTypes::blocking, iter.key());
|
||||
|
||||
fromOtherProc >> mc;
|
||||
|
||||
|
@ -254,7 +254,7 @@ void meshOctreeModifier::loadDistribution(const direction usedType)
|
|||
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procI,
|
||||
sendCoordinates.byteSize()
|
||||
);
|
||||
|
@ -270,7 +270,7 @@ void meshOctreeModifier::loadDistribution(const direction usedType)
|
|||
|
||||
List<meshOctreeCubeBasic> mc;
|
||||
|
||||
IPstream fromOtherProc(Pstream::blocking, iter.key());
|
||||
IPstream fromOtherProc(Pstream::commsTypes::blocking, iter.key());
|
||||
|
||||
fromOtherProc >> mc;
|
||||
|
||||
|
@ -309,7 +309,7 @@ void meshOctreeModifier::loadDistribution(const direction usedType)
|
|||
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
procI,
|
||||
sendCoordinates.byteSize()
|
||||
);
|
||||
|
|
|
@ -26,7 +26,7 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "meshOctreeModifier.H"
|
||||
#include "helperFunctionsPar.H"
|
||||
#include "helperFunctions.H"
|
||||
#include "triSurf.H"
|
||||
|
||||
#include <map>
|
||||
|
@ -119,8 +119,8 @@ void meshOctreeModifier::refineTreeForCoordinates
|
|||
void meshOctreeModifier::refineTreeForCoordinates
|
||||
(
|
||||
const meshOctreeCubeCoordinates& cc,
|
||||
const labelList& containedTriangles,
|
||||
const labelList& containedEdges,
|
||||
const labelList& /*containedTriangles*/,
|
||||
const labelList& /*containedEdges*/,
|
||||
const short procNo,
|
||||
const direction cubeType
|
||||
)
|
||||
|
@ -203,8 +203,6 @@ void meshOctreeModifier::addLayerFromNeighbouringProcessors()
|
|||
return;
|
||||
|
||||
const LongList<meshOctreeCube*>& leaves = octree_.leaves_;
|
||||
const labelList& neiProcs = octree_.neiProcs_;
|
||||
const List<Pair<meshOctreeCubeCoordinates> >& neiRange = octree_.neiRange_;
|
||||
|
||||
forAll(leaves, leafI)
|
||||
if( leaves[leafI]->procNo() != Pstream::myProcNo() )
|
||||
|
@ -212,6 +210,9 @@ void meshOctreeModifier::addLayerFromNeighbouringProcessors()
|
|||
|
||||
Info << "Adding an additional layer of cells" << endl;
|
||||
|
||||
const labelList& neiProcs = octree_.neiProcs_;
|
||||
const List<Pair<meshOctreeCubeCoordinates> >& neiRange = octree_.neiRange_;
|
||||
|
||||
meshOctreeCubeCoordinates minCoord, maxCoord;
|
||||
std::map<label, LongList<meshOctreeCubeBasic> > toProcs;
|
||||
forAll(neiProcs, i)
|
||||
|
@ -227,19 +228,25 @@ void meshOctreeModifier::addLayerFromNeighbouringProcessors()
|
|||
|
||||
forAll(neiProcs, procI)
|
||||
{
|
||||
if(
|
||||
if
|
||||
(
|
||||
(maxCoord >= neiRange[procI].first()) &&
|
||||
(minCoord <= neiRange[procI].second())
|
||||
)
|
||||
{
|
||||
toProcs[neiProcs[procI]].append(*leaves[leafI]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# ifdef OCTREE_DEBUG
|
||||
for(label i=0;i<Pstream::nProcs();++i)
|
||||
{
|
||||
if( i == Pstream::myProcNo() )
|
||||
{
|
||||
Pout << "Neighbour processors " << neiProcs << endl;
|
||||
Pout << "Neighbour range " << neiRange << endl;
|
||||
|
||||
std::map<label, LongList<meshOctreeCubeBasic> >::iterator it;
|
||||
for(it=toProcs.begin();it!=toProcs.end();++it)
|
||||
{
|
||||
|
@ -254,7 +261,7 @@ void meshOctreeModifier::addLayerFromNeighbouringProcessors()
|
|||
|
||||
//- exchange data with other processors
|
||||
LongList<meshOctreeCubeBasic> receivedCoordinates;
|
||||
help::exchangeMap(toProcs, receivedCoordinates, Pstream::blocking);
|
||||
help::exchangeMap(toProcs, receivedCoordinates, Pstream::commsTypes::blocking);
|
||||
|
||||
# ifdef OCTREE_DEBUG
|
||||
Pout << "Received " << receivedCoordinates.size()
|
||||
|
|
|
@ -489,8 +489,12 @@ void meshOctreeModifier::refineSelectedBoxes
|
|||
}
|
||||
}
|
||||
|
||||
//- update the list of leaves
|
||||
createListOfLeaves();
|
||||
|
||||
//- update the communication pattern
|
||||
updateCommunicationPattern();
|
||||
|
||||
# ifdef OCTREETiming
|
||||
Info << "Time for actual refinement " << (omp_get_wtime()-regTime) << endl;
|
||||
# endif
|
||||
|
|
|
@ -116,7 +116,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
|
|||
{
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
neiProcs_[neiProcI],
|
||||
sizeof(label)
|
||||
);
|
||||
|
@ -129,7 +129,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
|
|||
{
|
||||
IPstream fromOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
neiProcs_[neiProcI],
|
||||
sizeof(label)
|
||||
);
|
||||
|
@ -147,7 +147,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
|
|||
continue;
|
||||
|
||||
//- receive data from other processor
|
||||
IPstream fromOtherProc(Pstream::scheduled, neiProcs_[neiProcI]);
|
||||
IPstream fromOtherProc(Pstream::commsTypes::scheduled, neiProcs_[neiProcI]);
|
||||
dataToReceive.appendFromStream(fromOtherProc);
|
||||
}
|
||||
|
||||
|
@ -159,7 +159,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
|
|||
continue;
|
||||
|
||||
//- send data to other processor
|
||||
OPstream toOtherProc(Pstream::scheduled, neiProcs_[neiProcI]);
|
||||
OPstream toOtherProc(Pstream::commsTypes::scheduled, neiProcs_[neiProcI]);
|
||||
toOtherProc << toProcs[neiProcI];
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
|
|||
continue;
|
||||
|
||||
//- receive data from other processor
|
||||
IPstream fromOtherProc(Pstream::scheduled, neiProcs_[neiProcI]);
|
||||
IPstream fromOtherProc(Pstream::commsTypes::scheduled, neiProcs_[neiProcI]);
|
||||
dataToReceive.appendFromStream(fromOtherProc);
|
||||
}
|
||||
|
||||
|
@ -184,7 +184,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
|
|||
continue;
|
||||
|
||||
//- send data to other processor
|
||||
OPstream toOtherProc(Pstream::scheduled, neiProcs_[neiProcI]);
|
||||
OPstream toOtherProc(Pstream::commsTypes::scheduled, neiProcs_[neiProcI]);
|
||||
toOtherProc << toProcs[neiProcI];
|
||||
}
|
||||
}
|
||||
|
@ -268,7 +268,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
|
|||
{
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
neiProcs_[neiProcI],
|
||||
sizeof(label)
|
||||
);
|
||||
|
@ -281,7 +281,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
|
|||
{
|
||||
IPstream fromOtherProc
|
||||
(
|
||||
Pstream::blocking,
|
||||
Pstream::commsTypes::blocking,
|
||||
neiProcs_[neiProcI],
|
||||
sizeof(label)
|
||||
);
|
||||
|
@ -299,7 +299,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
|
|||
continue;
|
||||
|
||||
//- receive data from other processor
|
||||
IPstream fromOtherProc(Pstream::scheduled, neiProcs_[neiProcI]);
|
||||
IPstream fromOtherProc(Pstream::commsTypes::scheduled, neiProcs_[neiProcI]);
|
||||
|
||||
dataToReceive.appendFromStream(fromOtherProc);
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
|
|||
continue;
|
||||
|
||||
//- send data to other processor
|
||||
OPstream toOtherProc(Pstream::scheduled, neiProcs_[neiProcI]);
|
||||
OPstream toOtherProc(Pstream::commsTypes::scheduled, neiProcs_[neiProcI]);
|
||||
toOtherProc << toProcs[neiProcI];
|
||||
}
|
||||
|
||||
|
@ -325,7 +325,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
|
|||
continue;
|
||||
|
||||
//- receive data from other processor
|
||||
IPstream fromOtherProc(Pstream::scheduled, neiProcs_[neiProcI]);
|
||||
IPstream fromOtherProc(Pstream::commsTypes::scheduled, neiProcs_[neiProcI]);
|
||||
|
||||
dataToReceive.appendFromStream(fromOtherProc);
|
||||
}
|
||||
|
@ -338,7 +338,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
|
|||
continue;
|
||||
|
||||
//- send data to other processor
|
||||
OPstream toOtherProc(Pstream::scheduled, neiProcs_[neiProcI]);
|
||||
OPstream toOtherProc(Pstream::commsTypes::scheduled, neiProcs_[neiProcI]);
|
||||
toOtherProc << toProcs[neiProcI];
|
||||
}
|
||||
|
||||
|
@ -353,7 +353,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
|
|||
continue;
|
||||
|
||||
//- receive data from other processor
|
||||
IPstream fromOtherProc(Pstream::scheduled, neiProcs_[neiProcI]);
|
||||
IPstream fromOtherProc(Pstream::commsTypes::scheduled, neiProcs_[neiProcI]);
|
||||
|
||||
receivedRanges.appendFromStream(fromOtherProc);
|
||||
}
|
||||
|
@ -368,7 +368,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
|
|||
//- send data to other processor
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::scheduled,
|
||||
Pstream::commsTypes::scheduled,
|
||||
neiProcs_[neiProcI],
|
||||
attributesToProcs[neiProcI].byteSize()
|
||||
);
|
||||
|
@ -385,7 +385,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
|
|||
continue;
|
||||
|
||||
//- receive data from other processor
|
||||
IPstream fromOtherProc(Pstream::scheduled, neiProcs_[neiProcI]);
|
||||
IPstream fromOtherProc(Pstream::commsTypes::scheduled, neiProcs_[neiProcI]);
|
||||
|
||||
receivedRanges.appendFromStream(fromOtherProc);
|
||||
}
|
||||
|
@ -400,7 +400,7 @@ void meshOctree::exchangeRequestsWithNeighbourProcessors
|
|||
//- send data to other processor
|
||||
OPstream toOtherProc
|
||||
(
|
||||
Pstream::scheduled,
|
||||
Pstream::commsTypes::scheduled,
|
||||
neiProcs_[neiProcI],
|
||||
attributesToProcs[neiProcI].byteSize()
|
||||
);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue