cartesianMeshExtractorPointsAndAddressing.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | cfMesh: A library for mesh generation
4  \\ / O peration |
5  \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6  \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
8 License
9  This file is part of cfMesh.
10 
11  cfMesh is free software; you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by the
13  Free Software Foundation; either version 3 of the License, or (at your
14  option) any later version.
15 
16  cfMesh is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
23 
24 Description
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "cartesianMeshExtractor.H"
29 #include "meshOctree.H"
30 
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 
36 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
37 // Private member functions
38 
40 {
41  Info << "Creating octree vertices" << endl;
42 
43  Info << "Octree nodes " << octreeCheck_.numberOfNodes() << endl;
44 
45  //- set the size of the point field
48 
49  //- store vertices into the pointField
50  const pointField& octreePoints = octreeCheck_.octreePoints();
51 
52  forAll(points, pointI)
53  points[pointI] = octreePoints[pointI];
54 
55  Info << "Finished creating octree vertices" << endl;
56 }
57 
58 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 
60 } // End namespace Foam
61 
62 // ************************************************************************* //
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:406
Foam::cartesianMeshExtractor::octreeCheck_
meshOctreeAddressing octreeCheck_
reference to the octree addressing
Definition: cartesianMeshExtractor.H:55
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::polyMeshGenPoints::points
const pointFieldPMG & points() const
access to points
Definition: polyMeshGenPointsI.H:44
cartesianMeshExtractor.H
meshOctree.H
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::Info
messageStream Info
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::cartesianMeshExtractor::createPointsAndAddressing
void createPointsAndAddressing()
create vertices and pointLeaves addressing
Definition: cartesianMeshExtractorPointsAndAddressing.C:39
points
const pointField & points
Definition: gmvOutputHeader.H:1
Foam::cartesianMeshExtractor::mesh_
polyMeshGen & mesh_
reference to the mesh
Definition: cartesianMeshExtractor.H:58
Foam::meshOctreeAddressing::octreePoints
const pointField & octreePoints() const
return coordinates of octree vertices
Definition: meshOctreeAddressingI.H:44
Foam::meshOctreeAddressing::numberOfNodes
label numberOfNodes() const
return number of octree nodes
Definition: meshOctreeAddressingI.H:36
Foam::pointFieldPMG
Definition: pointFieldPMG.H:50