Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
integration-cfmesh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Community
integration-cfmesh
Commits
1bbecd19
Commit
1bbecd19
authored
Sep 30, 2014
by
Franjo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Surface to fms conversion
Initial commit
parent
9bb60eda
Changes
26
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
5414 additions
and
5311 deletions
+5414
-5311
meshLibrary/cartesian2DMesh/cartesian2DMeshGenerator/cartesian2DMeshGenerator.C
...DMesh/cartesian2DMeshGenerator/cartesian2DMeshGenerator.C
+0
-2
meshLibrary/tetMesh/tetMeshExtractorOctree/tetMeshExtractorOctree.C
...y/tetMesh/tetMeshExtractorOctree/tetMeshExtractorOctree.C
+43
-15
meshLibrary/tetMesh/tetMeshGenerator/tetMeshGenerator.C
meshLibrary/tetMesh/tetMeshGenerator/tetMeshGenerator.C
+0
-2
meshLibrary/utilities/boundaryLayers/boundaryLayersI.H
meshLibrary/utilities/boundaryLayers/boundaryLayersI.H
+0
-1
meshLibrary/utilities/boundaryLayers/refineBoundaryLayersCells.C
...rary/utilities/boundaryLayers/refineBoundaryLayersCells.C
+1904
-1904
meshLibrary/utilities/boundaryLayers/refineBoundaryLayersFaces.C
...rary/utilities/boundaryLayers/refineBoundaryLayersFaces.C
+1233
-1234
meshLibrary/utilities/meshes/partTriMesh/partTriMeshParallelAddressing.C
...lities/meshes/partTriMesh/partTriMeshParallelAddressing.C
+0
-4
meshLibrary/utilities/meshes/polyMeshGen/boundaryPatch/boundaryPatch.C
...tilities/meshes/polyMeshGen/boundaryPatch/boundaryPatch.C
+0
-1
meshLibrary/utilities/octrees/meshOctree/meshOctreeCreator/meshOctreeCreatorCreateOctreeBoxes.C
...ee/meshOctreeCreator/meshOctreeCreatorCreateOctreeBoxes.C
+1
-2
meshLibrary/utilities/octrees/meshOctree/meshOctreeModifier/meshOctreeModifier.H
...ctrees/meshOctree/meshOctreeModifier/meshOctreeModifier.H
+3
-0
meshLibrary/utilities/smoothers/geometry/meshOptimizer/meshOptimizer.H
...tilities/smoothers/geometry/meshOptimizer/meshOptimizer.H
+0
-1
meshLibrary/utilities/smoothers/geometry/meshSurfaceOptimizer/meshSurfaceOptimizerOptimizeSurface.C
...eshSurfaceOptimizer/meshSurfaceOptimizerOptimizeSurface.C
+0
-3
meshLibrary/utilities/surfaceTools/edgeExtraction/edgeExtractor/edgeExtractor.C
...surfaceTools/edgeExtraction/edgeExtractor/edgeExtractor.C
+0
-1
meshLibrary/utilities/surfaceTools/edgeExtraction/edgeExtractor/edgeExtractorCorners.C
...Tools/edgeExtraction/edgeExtractor/edgeExtractorCorners.C
+1808
-1809
meshLibrary/utilities/surfaceTools/meshSurfaceMapper2D/meshSurfaceMapper2DMapVertices.C
...ools/meshSurfaceMapper2D/meshSurfaceMapper2DMapVertices.C
+8
-0
meshLibrary/utilities/tetrahedra/tetCreatorOctree/tetCreatorOctreePointsAndAddressing.C
...ra/tetCreatorOctree/tetCreatorOctreePointsAndAddressing.C
+0
-1
meshLibrary/utilities/triSurfaceTools/triSurfacePatchManipulator/triSurfacePatchManipulatorFunctions.C
...acePatchManipulator/triSurfacePatchManipulatorFunctions.C
+2
-0
tutorials/cartesianMesh/sawOctree/Allrun
tutorials/cartesianMesh/sawOctree/Allrun
+4
-0
tutorials/cartesianMesh/sawOctree/sawOctree.foam
tutorials/cartesianMesh/sawOctree/sawOctree.foam
+0
-0
utilities/FLMAToSurface/FLMAToSurface.C
utilities/FLMAToSurface/FLMAToSurface.C
+146
-146
utilities/FLMAToSurface/Make/options
utilities/FLMAToSurface/Make/options
+2
-1
utilities/patchesToSubsets/patchesToSubsets.C
utilities/patchesToSubsets/patchesToSubsets.C
+84
-84
utilities/preparePar/preparePar.C
utilities/preparePar/preparePar.C
+100
-100
utilities/surfaceToFMS/Make/files
utilities/surfaceToFMS/Make/files
+3
-0
utilities/surfaceToFMS/Make/options
utilities/surfaceToFMS/Make/options
+10
-0
utilities/surfaceToFMS/surfaceToFMS.C
utilities/surfaceToFMS/surfaceToFMS.C
+63
-0
No files found.
meshLibrary/cartesian2DMesh/cartesian2DMeshGenerator/cartesian2DMeshGenerator.C
View file @
1bbecd19
...
...
@@ -312,8 +312,6 @@ cartesian2DMeshGenerator::cartesian2DMeshGenerator(const Time& time)
//- delete the old surface and assign the new one
deleteDemandDrivenData
(
surfacePtr_
);
surfacePtr_
=
surfaceWithPatches
;
surfacePtr_
->
writeSurface
(
"surfWithPatches.fms"
);
}
octreePtr_
=
new
meshOctree
(
*
surfacePtr_
,
true
);
...
...
meshLibrary/tetMesh/tetMeshExtractorOctree/tetMeshExtractorOctree.C
View file @
1bbecd19
...
...
@@ -29,8 +29,6 @@ Description
#include "meshOctree.H"
#include "triSurface.H"
#include "polyMeshGenModifierAddCellByCell.H"
#include "tessellationElement.H"
#include "tessellationDimSpace.H"
#include "demandDrivenData.H"
# ifdef USE_OMP
...
...
@@ -104,23 +102,53 @@ void tetMeshExtractorOctree::createPolyMesh()
const
partTet
&
elmt
=
tets
[
elmtI
];
tessellationElement
telmt
(
elmt
[
0
],
elmt
[
1
],
elmt
[
2
],
elmt
[
3
]);
label
faceI
=
4
*
elmtI
;
for
(
label
i
=
0
;
i
<
4
;
++
i
)
{
cells
[
elmtI
][
i
]
=
faceI
;
face
&
f
=
faces
[
faceI
];
f
.
setSize
(
3
)
;
//- first face
cells
[
elmtI
][
0
]
=
faceI
;
const
triFace
tf
=
telmt
.
face
(
i
);
f
[
0
]
=
tf
[
0
];
f
[
1
]
=
tf
[
2
];
f
[
2
]
=
tf
[
1
];
face
&
f0
=
faces
[
faceI
];
f0
.
setSize
(
3
);
++
faceI
;
}
f0
[
0
]
=
elmt
.
a
();
f0
[
1
]
=
elmt
.
c
();
f0
[
2
]
=
elmt
.
b
();
++
faceI
;
//- second face
cells
[
elmtI
][
1
]
=
faceI
;
face
&
f1
=
faces
[
faceI
];
f1
.
setSize
(
3
);
f1
[
0
]
=
elmt
.
a
();
f1
[
1
]
=
elmt
.
b
();
f1
[
2
]
=
elmt
.
d
();
++
faceI
;
//- third face
cells
[
elmtI
][
2
]
=
faceI
;
face
&
f2
=
faces
[
faceI
];
f2
.
setSize
(
3
);
f2
[
0
]
=
elmt
.
b
();
f2
[
1
]
=
elmt
.
c
();
f2
[
2
]
=
elmt
.
d
();
++
faceI
;
//- fourth face
cells
[
elmtI
][
3
]
=
faceI
;
face
&
f3
=
faces
[
faceI
];
f3
.
setSize
(
3
);
f3
[
0
]
=
elmt
.
c
();
f3
[
1
]
=
elmt
.
a
();
f3
[
2
]
=
elmt
.
d
();
}
# ifdef USE_OMP
...
...
meshLibrary/tetMesh/tetMeshGenerator/tetMeshGenerator.C
View file @
1bbecd19
...
...
@@ -32,8 +32,6 @@ Description
#include "meshOctreeCreator.H"
#include "meshOctreeAutomaticRefinement.H"
#include "tetMeshExtractorOctree.H"
#include "delaunayTessellation.H"
#include "subdivisionTessellation.H"
#include "meshSurfaceEngine.H"
#include "meshSurfaceMapper.H"
#include "meshSurfaceEdgeExtractorNonTopo.H"
...
...
meshLibrary/utilities/boundaryLayers/boundaryLayersI.H
View file @
1bbecd19
...
...
@@ -47,7 +47,6 @@ label boundaryLayers::findNewNodeLabel
if
(
it
!=
otherVrts_
.
end
()
)
{
const
std
::
map
<
std
::
pair
<
label
,
label
>
,
label
>&
m
=
it
->
second
;
std
::
map
<
std
::
pair
<
label
,
label
>
,
label
>::
const_iterator
mit
;
...
...
meshLibrary/utilities/boundaryLayers/refineBoundaryLayersCells.C
View file @
1bbecd19
This diff is collapsed.
Click to expand it.
meshLibrary/utilities/boundaryLayers/refineBoundaryLayersFaces.C
View file @
1bbecd19
This diff is collapsed.
Click to expand it.
meshLibrary/utilities/meshes/partTriMesh/partTriMeshParallelAddressing.C
View file @
1bbecd19
...
...
@@ -440,8 +440,6 @@ void partTriMesh::createBufferLayers()
void
partTriMesh
::
updateBufferLayers
()
{
returnReduce
(
1
,
sumOp
<
label
>
());
const
pointField
&
points
=
surf_
.
points
();
const
labelLongList
&
bufferLayerPoints
=
this
->
bufferLayerPoints
();
const
VRWGraph
&
pProcs
=
this
->
pointAtProcs
();
...
...
@@ -489,8 +487,6 @@ void partTriMesh::updateBufferLayers()
lp
.
coordinates
()
);
}
returnReduce
(
1
,
sumOp
<
label
>
());
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
meshLibrary/utilities/meshes/polyMeshGen/boundaryPatch/boundaryPatch.C
View file @
1bbecd19
...
...
@@ -96,7 +96,6 @@ Ostream& boundaryPatch::operator<<(Ostream& os) const
Istream
&
boundaryPatch
::
operator
>>
(
Istream
&
is
)
{
Info
<<
"Here"
<<
endl
;
token
t
;
is
>>
name_
>>
t
;
is
>>
t
>>
type_
>>
t
;
...
...
meshLibrary/utilities/octrees/meshOctree/meshOctreeCreator/meshOctreeCreatorCreateOctreeBoxes.C
View file @
1bbecd19
...
...
@@ -475,8 +475,7 @@ void meshOctreeCreator::createOctreeBoxes()
//- make sure that INSIDE and UNKNOWN neighbours of DATA boxes
//- have the same or higher refinement level
//if( !refineBoxesRefinementDistance() )
refineBoxesNearDataBoxes
(
1
);
refineBoxesNearDataBoxes
(
1
);
//- distribute octree such that each processor has the same number
//- of leaf boxes which will be used as mesh cells
...
...
meshLibrary/utilities/octrees/meshOctree/meshOctreeModifier/meshOctreeModifier.H
View file @
1bbecd19
...
...
@@ -130,6 +130,7 @@ public:
const
direction
nLayers
=
1
)
const
;
<<<<<<<
HEAD
//- mark additional layers around the leaves selected for refinement
//- given on a box-by-box basis
//- returns the number of boxes selected for refinement
...
...
@@ -140,6 +141,8 @@ public:
List
<
direction
>&
targetRefLevel
)
const
;
=======
>>>>>>>
e0f8dbd
...
Initial
commit
//- refine leaves marked for refinement
//- hexRefinement is activated when it is required to refine all
//- sons of the same father, if a single son gets marked for refinement
...
...
meshLibrary/utilities/smoothers/geometry/meshOptimizer/meshOptimizer.H
View file @
1bbecd19
...
...
@@ -101,7 +101,6 @@ class meshOptimizer
//- new position is the average of the neighbouring vertices
void
laplacian
(
const
labelLongList
&
,
const
label
);
void
laplacianSurface
(
const
labelLongList
&
,
const
label
);
void
laplacianParallel
(
const
labelLongList
&
procPoints
,
...
...
meshLibrary/utilities/smoothers/geometry/meshSurfaceOptimizer/meshSurfaceOptimizerOptimizeSurface.C
View file @
1bbecd19
...
...
@@ -538,8 +538,6 @@ bool meshSurfaceOptimizer::untangleSurface
bool
meshSurfaceOptimizer
::
untangleSurface
(
const
label
nAdditionalLayers
)
{
returnReduce
(
1
,
sumOp
<
label
>
());
labelLongList
selectedPts
(
surfaceEngine_
.
boundaryPoints
().
size
());
forAll
(
selectedPts
,
i
)
selectedPts
[
i
]
=
i
;
...
...
@@ -739,7 +737,6 @@ void meshSurfaceOptimizer::optimizeSurface2D(const label nIterations)
{
Info
<<
"."
<<
flush
;
//smoothLaplacianFC(movedPoints, procBndPoints, false);
smoothSurfaceOptimizer
(
movedPoints
);
//- move the points which are not at minimum z coordinate
...
...
meshLibrary/utilities/surfaceTools/edgeExtraction/edgeExtractor/edgeExtractor.C
View file @
1bbecd19
...
...
@@ -1806,7 +1806,6 @@ bool edgeExtractor::checkFacePatchesTopology()
facePatch_
.
transfer
(
newBoundaryPatches
);
}
}
while
(
nCorrected
!=
0
&&
(
nIter
++
<
3
)
);
return
changed
;
...
...
meshLibrary/utilities/surfaceTools/edgeExtraction/edgeExtractor/edgeExtractorCorners.C
View file @
1bbecd19
This diff is collapsed.
Click to expand it.
meshLibrary/utilities/surfaceTools/meshSurfaceMapper2D/meshSurfaceMapper2DMapVertices.C
View file @
1bbecd19
...
...
@@ -80,7 +80,11 @@ void meshSurfaceMapper2D::findMappingDistance
}
//- safety factor
<<<<<<<
HEAD
mIter
->
second
*=
16
.
0
;
=======
mIter
->
second
*=
4
.
0
;
>>>>>>>
e0f8dbd
...
Initial
commit
}
if
(
Pstream
::
parRun
()
)
...
...
@@ -420,7 +424,11 @@ void meshSurfaceMapper2D::mapCorners(const labelLongList& edgesToMap)
scalar
distSqApprox
;
label
iter
(
0
);
<<<<<<<
HEAD
while
(
iter
++
<
40
)
=======
while
(
iter
++
<
20
)
>>>>>>>
e0f8dbd
...
Initial
commit
{
point
newP
(
vector
::
zero
);
forAll
(
ePatches
,
epI
)
...
...
meshLibrary/utilities/tetrahedra/tetCreatorOctree/tetCreatorOctreePointsAndAddressing.C
View file @
1bbecd19
...
...
@@ -26,7 +26,6 @@ Description
\*---------------------------------------------------------------------------*/
#include "tetCreatorOctree.H"
#include "tetTessellation.H"
#include "meshOctree.H"
#include "triSurface.H"
...
...
meshLibrary/utilities/triSurfaceTools/triSurfacePatchManipulator/triSurfacePatchManipulatorFunctions.C
View file @
1bbecd19
...
...
@@ -30,7 +30,9 @@ Description
#include "triSurfaceDetectPlanarRegions.H"
#include "demandDrivenData.H"
# ifdef USE_OMP
#include <omp.h>
# endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
tutorials/cartesianMesh/sawOctree/Allrun
View file @
1bbecd19
...
...
@@ -5,9 +5,13 @@
runApplication preparePar
runParallel cartesianMesh 4
runParallel checkMesh 4
<<<<<<
< HEAD
if
[
"
$WM_PROJECT
"
=
"OpenFOAM"
]
then
runApplication reconstructParMesh
-constant
-fullMatch
else
runApplication reconstructParMesh
-zeroTime
fi
=======
runApplication reconstructParMesh
-zeroTime
>>>>>>>
e0f8dbd... Initial commit
tutorials/cartesianMesh/sawOctree/sawOctree.foam
0 → 100644
View file @
1bbecd19
utilities/FLMAToSurface/FLMAToSurface.C
View file @
1bbecd19
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 cfMesh.
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
option) any later version.
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 cfMesh. If not, see <http://www.gnu.org/licenses/>.
Description
Reads the AVL's surface mesh
\*---------------------------------------------------------------------------*/
#include "argList.H"
#include "Time.H"
#include "triSurf.H"
#include "triSurfModifier.H"
#include "triFaceList.H"
#include "labelLongList.H"
#include "IFstream.H"
using
namespace
Foam
;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int
main
(
int
argc
,
char
*
argv
[])
{
argList
::
noParallel
();
argList
::
validArgs
.
clear
();
argList
::
validArgs
.
append
(
"input surface file"
);
argList
::
validArgs
.
append
(
"output surface file"
);
argList
args
(
argc
,
argv
);
fileName
inFileName
(
args
.
args
()[
1
]);
fileName
outFileName
(
args
.
args
()[
2
]);
if
(
inFileName
.
ext
()
!=
"flma"
)
{
Info
<<
"Cannot convert this mesh"
<<
endl
;
return
0
;
}
//- create the surface mesh
triSurf
ts
;
triSurfModifier
tsm
(
ts
);
label
counter
;
IFstream
inFile
(
inFileName
);
inFile
>>
counter
;
//- read vertices
pointField
&
points
=
tsm
.
pointsAccess
();
points
.
setSize
(
counter
);
forAll
(
points
,
pointI
)
{
point
&
p
=
points
[
pointI
];
inFile
>>
p
.
x
();
inFile
>>
p
.
y
();
inFile
>>
p
.
z
();
}
//- read facets
inFile
>>
counter
;
geometricSurfacePatchList
patches
(
1
);
patches
[
0
].
name
()
=
"patch"
;
LongList
<
labelledTri
>&
triangles
=
tsm
.
facetsAccess
();
triangles
.
setSize
(
counter
);
forAll
(
triangles
,
triI
)
{
inFile
>>
counter
;
if
(
counter
!=
3
)
{
Info
<<
"Facet "
<<
triI
<<
" is not a triangle!!"
<<
endl
;
Warning
<<
"Cannot convert this surface!"
<<
endl
;
return
0
;
}
for
(
label
j
=
0
;
j
<
3
;
++
j
)
inFile
>>
triangles
[
triI
][
2
-
j
];
triangles
[
triI
].
region
()
=
0
;
}
//- read cell types
inFile
>>
counter
;
forAll
(
triangles
,
triI
)
inFile
>>
counter
;
//- start reading selections
inFile
>>
counter
;
for
(
label
selI
=
0
;
selI
<
counter
;
++
selI
)
{
//- read selection name
word
selName
;
inFile
>>
selName
;
//- read selection type
label
selType
;
inFile
>>
selType
;
//- read selection entries
label
size
;
inFile
>>
size
;
labelLongList
entries
(
size
);
for
(
label
i
=
0
;
i
<
size
;
++
i
)
inFile
>>
entries
[
i
];
//- store cell selections
if
(
selType
==
2
)
{
Info
<<
"Adding subset "
<<
selName
<<
endl
;
const
label
setID
=
ts
.
addFacetSubset
(
selName
);
forAll
(
entries
,
i
)
ts
.
addFacetToSubset
(
setID
,
entries
[
i
]);
}
}
//- write the surface
ts
.
writeSurface
(
outFileName
);
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 cfMesh.
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
option) any later version.
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 cfMesh. If not, see <http://www.gnu.org/licenses/>.
Description
Reads the AVL's surface mesh
\*---------------------------------------------------------------------------*/
#include "argList.H"
#include "Time.H"
#include "triSurf.H"
#include "triSurfModifier.H"
#include "triFaceList.H"
#include "labelLongList.H"
#include "IFstream.H"
using
namespace
Foam
;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int
main
(
int
argc
,
char
*
argv
[])
{
argList
::
noParallel
();
argList
::
validArgs
.
clear
();
argList
::
validArgs
.
append
(
"input surface file"
);
argList
::
validArgs
.
append
(
"output surface file"
);
argList
args
(
argc
,
argv
);
fileName
inFileName
(
args
.
args
()[
1
]);
fileName
outFileName
(
args
.
args
()[
2
]);
if
(
inFileName
.
ext
()
!=
"flma"
)
{
Info
<<
"Cannot convert this mesh"
<<
endl
;
return
0
;
}
//- create the surface mesh
triSurf
ts
;
triSurfModifier
tsm
(
ts
);
label
counter
;
IFstream
inFile
(
inFileName
);
inFile
>>
counter
;
//- read vertices
pointField
&
points
=
tsm
.
pointsAccess
();
points
.
setSize
(
counter
);
forAll
(
points
,
pointI
)
{
point
&
p
=
points
[
pointI
];
inFile
>>
p
.
x
();
inFile
>>
p
.
y
();
inFile
>>
p
.
z
();
}
//- read facets
inFile
>>
counter
;
geometricSurfacePatchList
patches
(
1
);
patches
[
0
].
name
()
=
"patch"
;
LongList
<
labelledTri
>&
triangles
=
tsm
.
facetsAccess
();
triangles
.
setSize
(
counter
);
forAll
(
triangles
,
triI
)
{
inFile
>>
counter
;
if
(
counter
!=
3
)
{
Info
<<
"Facet "
<<
triI
<<
" is not a triangle!!"
<<
endl
;
Warning
<<
"Cannot convert this surface!"
<<
endl
;
return
0
;
}
for
(
label
j
=
0
;
j
<
3
;
++
j
)
inFile
>>
triangles
[
triI
][
2
-
j
];
triangles
[
triI
].
region
()
=
0
;
}
//- read cell types
inFile
>>
counter
;
forAll
(
triangles
,
triI
)
inFile
>>
counter
;
//- start reading selections
inFile
>>
counter
;
for
(
label
selI
=
0
;
selI
<
counter
;
++
selI
)
{
//- read selection name
word
selName
;
inFile
>>
selName
;
//- read selection type
label
selType
;
inFile
>>
selType
;
//- read selection entries
label
size
;
inFile
>>
size
;
labelLongList
entries
(
size
);
for
(
label
i
=
0
;
i
<
size
;
++
i
)
inFile
>>
entries
[
i
];
//- store cell selections
if
(
selType
==
2
)
{
Info
<<
"Adding subset "
<<
selName
<<
endl
;
const
label
setID
=
ts
.
addFacetSubset
(
selName
);
forAll
(
entries
,
i
)
ts
.
addFacetToSubset
(
setID
,
entries
[
i
]);
}
}
//- write the surface
ts
.
writeSurface
(
outFileName
);
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
// ************************************************************************* //
utilities/FLMAToSurface/Make/options
View file @
1bbecd19
EXE_INC = \
-I../../meshLibrary/lnInclude \
-I$(FOAM_SRC)/triSurface/lnInclude
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/meshTools/lnIncludet
EXE_LIBS = \
-ltriSurface \
...
...
utilities/patchesToSubsets/patchesToSubsets.C
View file @
1bbecd19
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 cfMesh.
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
option) any later version.
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 cfMesh. If not, see <http://www.gnu.org/licenses/>.
Description
Reads the AVL's surface mesh
\*---------------------------------------------------------------------------*/