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
3c3eec9f
Commit
3c3eec9f
authored
Mar 23, 2015
by
Franjo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'development' of
ssh://git.code.sf.net/p/cfmesh/code
into development
parents
8058b73b
9bc65534
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
0 additions
and
457 deletions
+0
-457
utilities/FPMAToMesh/FPMAToMesh.C
utilities/FPMAToMesh/FPMAToMesh.C
+0
-216
utilities/FPMAToMesh/Make/files
utilities/FPMAToMesh/Make/files
+0
-3
utilities/FPMAToMesh/Make/options
utilities/FPMAToMesh/Make/options
+0
-8
utilities/backScaleMesh/Make/files
utilities/backScaleMesh/Make/files
+0
-3
utilities/backScaleMesh/Make/options
utilities/backScaleMesh/Make/options
+0
-10
utilities/backScaleMesh/backScaleMesh.C
utilities/backScaleMesh/backScaleMesh.C
+0
-78
utilities/scaleSurfaceMesh/Make/files
utilities/scaleSurfaceMesh/Make/files
+0
-3
utilities/scaleSurfaceMesh/Make/options
utilities/scaleSurfaceMesh/Make/options
+0
-10
utilities/scaleSurfaceMesh/scaleSurfaceMesh.C
utilities/scaleSurfaceMesh/scaleSurfaceMesh.C
+0
-126
No files found.
utilities/FPMAToMesh/FPMAToMesh.C
deleted
100644 → 0
View file @
8058b73b
/*---------------------------------------------------------------------------*\
========= |
\\ / 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
Writes the mesh in fpma format readable by AVL's CfdWM
\*---------------------------------------------------------------------------*/
#include "argList.H"
#include "Time.H"
#include "polyMeshGenModifier.H"
#include "IFstream.H"
#include "Map.H"
using
namespace
Foam
;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int
main
(
int
argc
,
char
*
argv
[])
{
# include "setRootCase.H"
# include "createTime.H"
fileName
inFileName
;
Info
<<
"Reading mesh from file "
<<
endl
;
cin
>>
inFileName
;
IFstream
file
(
inFileName
);
polyMeshGen
pmg
(
runTime
);
polyMeshGenModifier
meshModifier
(
pmg
);
label
counter
;
//- read the number of vertices
pointFieldPMG
&
points
=
meshModifier
.
pointsAccess
();
file
>>
counter
;
//- read points from file
points
.
setSize
(
counter
);
forAll
(
points
,
pointI
)
{
point
p
;
file
>>
p
.
x
();
file
>>
p
.
y
();
file
>>
p
.
z
();
points
[
pointI
]
=
p
;
}
//- read the number of faces
file
>>
counter
;
faceListPMG
&
faces
=
meshModifier
.
facesAccess
();
//- read faces from file
faces
.
setSize
(
counter
);
forAll
(
faces
,
faceI
)
{
file
>>
counter
;
face
f
;
f
.
setSize
(
counter
);
forAll
(
f
,
pI
)
file
>>
f
[
pI
];
faces
[
faceI
]
=
f
.
reverseFace
();
}
//- read the number of cells
file
>>
counter
;
//- read cells from file
cellListPMG
&
cells
=
meshModifier
.
cellsAccess
();
cells
.
setSize
(
counter
);
forAll
(
cells
,
cellI
)
{
file
>>
counter
;
cell
&
c
=
cells
[
cellI
];
c
.
setSize
(
counter
);
forAll
(
c
,
fI
)
file
>>
c
[
fI
];
}
//- read selections
file
>>
counter
;
wordList
patchNames
;
Map
<
label
>
subsetToPatch
;
for
(
label
setI
=
0
;
setI
<
counter
;
++
setI
)
{
word
sName
;
file
>>
sName
;
label
type
;
file
>>
type
;
label
nEntries
;
file
>>
nEntries
;
switch
(
type
)
{
case
3
:
{
//- face selection
const
label
id
=
pmg
.
addFaceSubset
(
sName
);
patchNames
.
setSize
(
patchNames
.
size
()
+
1
);
patchNames
[
patchNames
.
size
()
-
1
]
=
sName
;
subsetToPatch
.
insert
(
id
,
patchNames
.
size
()
-
1
);
Info
<<
"Reading face selection "
<<
sName
<<
endl
;
for
(
label
i
=
0
;
i
<
nEntries
;
++
i
)
{
label
entryI
;
file
>>
entryI
;
pmg
.
addFaceToSubset
(
id
,
entryI
);
}
}
break
;
case
2
:
{
//- cell selection
const
label
id
=
pmg
.
addCellSubset
(
sName
);
for
(
label
i
=
0
;
i
<
nEntries
;
++
i
)
{
label
entryI
;
file
>>
entryI
;
pmg
.
addCellToSubset
(
id
,
entryI
);
}
}
break
;
case
1
:
{
//- node selection
const
label
id
=
pmg
.
addPointSubset
(
sName
);
for
(
label
i
=
0
;
i
<
nEntries
;
++
i
)
{
label
entryI
;
file
>>
entryI
;
pmg
.
addPointToSubset
(
id
,
entryI
);
}
}
break
;
};
}
//- create patches from face selections
VRWGraph
boundaryFaces
;
labelLongList
boundaryOwner
;
labelLongList
boundaryPatches
;
const
labelList
&
owner
=
pmg
.
owner
();
DynList
<
label
>
faceSubsets
;
pmg
.
faceSubsetIndices
(
faceSubsets
);
forAll
(
faceSubsets
,
setI
)
{
labelLongList
setFaces
;
pmg
.
facesInSubset
(
faceSubsets
[
setI
],
setFaces
);
forAll
(
setFaces
,
i
)
{
boundaryFaces
.
appendList
(
faces
[
setFaces
[
i
]]);
boundaryOwner
.
append
(
owner
[
setFaces
[
i
]]);
boundaryPatches
.
append
(
subsetToPatch
[
faceSubsets
[
setI
]]);
}
pmg
.
removeFaceSubset
(
faceSubsets
[
setI
]);
}
meshModifier
.
reorderBoundaryFaces
();
meshModifier
.
replaceBoundary
(
patchNames
,
boundaryFaces
,
boundaryOwner
,
boundaryPatches
);
pmg
.
write
();
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
// ************************************************************************* //
utilities/FPMAToMesh/Make/files
deleted
100644 → 0
View file @
8058b73b
FPMAToMesh.C
EXE = $(FOAM_USER_APPBIN)/FPMAToMesh
utilities/FPMAToMesh/Make/options
deleted
100644 → 0
View file @
8058b73b
EXE_INC = \
-I../../meshLibrary/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-L$(FOAM_USER_LIBBIN) \
-lmeshLibrary \
-lmeshTools
utilities/backScaleMesh/Make/files
deleted
100644 → 0
View file @
8058b73b
backScaleMesh.C
EXE = $(FOAM_USER_APPBIN)/backScaleMesh
utilities/backScaleMesh/Make/options
deleted
100644 → 0
View file @
8058b73b
EXE_INC = \
-I../../meshLibrary/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-ltriSurface \
-L$(FOAM_USER_LIBBIN) \
-lmeshLibrary \
-lmeshTools
utilities/backScaleMesh/backScaleMesh.C
deleted
100644 → 0
View file @
8058b73b
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 specified surface and writes it in the fms format.
\*---------------------------------------------------------------------------*/
#include "argList.H"
#include "polyMeshGen.H"
#include "coordinateModifier.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Main program:
using
namespace
Foam
;
int
main
(
int
argc
,
char
*
argv
[])
{
# include "setRootCase.H"
# include "createTime.H"
IOdictionary
meshDict
(
IOobject
(
"meshDict"
,
runTime
.
system
(),
runTime
,
IOobject
::
MUST_READ
,
IOobject
::
NO_WRITE
)
);
polyMeshGen
pmg
(
runTime
);
pmg
.
read
();
pointFieldPMG
&
pts
=
pmg
.
points
();
if
(
!
meshDict
.
found
(
"anisotropicSources"
)
)
FatalError
<<
"Cannot backward scale mesh. anisotropicSources"
<<
" does not exist in meshDict"
<<
exit
(
FatalError
);
coordinateModifier
cMod
(
meshDict
.
subDict
(
"anisotropicSources"
));
//- apply backward transformation
forAll
(
pts
,
i
)
pts
[
i
]
=
cMod
.
backwardModifiedPoint
(
pts
[
i
]);
Info
<<
"Writting mesh with backward transformed points"
<<
endl
;
pmg
.
write
();
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
// ************************************************************************* //
utilities/scaleSurfaceMesh/Make/files
deleted
100644 → 0
View file @
8058b73b
scaleSurfaceMesh.C
EXE = $(FOAM_USER_APPBIN)/scaleSurfaceMesh
utilities/scaleSurfaceMesh/Make/options
deleted
100644 → 0
View file @
8058b73b
EXE_INC = \
-I../../meshLibrary/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-ltriSurface \
-L$(FOAM_USER_LIBBIN) \
-lmeshLibrary \
-lmeshTools
utilities/scaleSurfaceMesh/scaleSurfaceMesh.C
deleted
100644 → 0
View file @
8058b73b
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 specified surface and writes it in the fms format.
\*---------------------------------------------------------------------------*/
#include "argList.H"
#include "IFstream.H"
#include "fileName.H"
#include "triSurf.H"
#include "triSurfModifier.H"
#include "helperFunctions.H"
#include "demandDrivenData.H"
#include "coordinateModifier.H"
#include "checkMeshDict.H"
#include "surfaceMeshGeometryModification.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Main program:
using
namespace
Foam
;
int
main
(
int
argc
,
char
*
argv
[])
{
# include "setRootCase.H"
# include "createTime.H"
IOdictionary
meshDict
(
IOobject
(
"meshDict"
,
runTime
.
system
(),
runTime
,
IOobject
::
MUST_READ
,
IOobject
::
NO_WRITE
)
);
checkMeshDict
cmd
(
meshDict
);
fileName
surfaceFile
=
meshDict
.
lookup
(
"surfaceFile"
);
if
(
Pstream
::
parRun
()
)
surfaceFile
=
".."
/
surfaceFile
;
triSurf
surface
(
runTime
.
path
()
/
surfaceFile
);
surfaceMeshGeometryModification
gMod
(
surface
,
meshDict
);
//- modify points
const
triSurf
*
modSurfPtr
=
gMod
.
modifyGeometry
();
Info
<<
"Writting modified surface"
<<
endl
;
modSurfPtr
->
writeSurface
(
"modifiedSurf.stl"
);
# ifdef DEBUGScaling
//- apply backward modification
Info
<<
"Here"
<<
endl
;
coordinateModifier
cMod
(
meshDict
.
subDict
(
"anisotropicSources"
));
Info
<<
"Starting modifications"
<<
endl
;
forAll
(
surface
.
points
(),
i
)
{
Info
<<
"
\n
Orig point "
<<
i
<<
" coordinates "
<<
surface
.
points
()[
i
]
<<
" modified point "
<<
modSurfPtr
->
points
()[
i
]
<<
endl
;
const
point
p
=
cMod
.
backwardModifiedPoint
(
modSurfPtr
->
points
()[
i
]);
if
(
mag
(
p
-
surface
.
points
()[
i
])
>
1e-14
)
{
Warning
<<
"Point "
<<
i
<<
" is different "
<<
p
<<
" from original "
<<
surface
.
points
()[
i
]
<<
" modified point "
<<
cMod
.
modifiedPoint
(
surface
.
points
()[
i
])
<<
endl
;
::
exit
(
0
);
}
}
Info
<<
"Backscaling Ok"
<<
endl
;
::
exit
(
0
);
# endif
surfaceMeshGeometryModification
bgMod
(
*
modSurfPtr
,
meshDict
);
const
triSurf
*
backModSurfPtr
=
bgMod
.
revertGeometryModification
();
Info
<<
"Writting backward transformed surface"
<<
endl
;
backModSurfPtr
->
writeSurface
(
"backwardModifiedSurf.stl"
);
# ifdef DEBUGScaling
forAll
(
backModSurfPtr
->
points
(),
pI
)
if
(
mag
(
backModSurfPtr
->
points
()[
pI
]
-
surface
.
points
()[
pI
])
>
1e-14
)
Warning
<<
"Point "
<<
pI
<<
" is different "
<<
backModSurfPtr
->
points
()[
pI
]
<<
" from original "
<<
surface
.
points
()[
pI
]
<<
endl
;
# endif
deleteDemandDrivenData
(
modSurfPtr
);
deleteDemandDrivenData
(
backModSurfPtr
);
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
// ************************************************************************* //
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment