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
025222fa
Commit
025222fa
authored
Mar 18, 2015
by
Franjo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added surface smoothing
parent
fee9c3af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
2 deletions
+37
-2
utilities/improveMeshQuality/Make/options
utilities/improveMeshQuality/Make/options
+2
-0
utilities/improveMeshQuality/improveMeshQuality.C
utilities/improveMeshQuality/improveMeshQuality.C
+35
-2
No files found.
utilities/improveMeshQuality/Make/options
View file @
025222fa
EXE_INC = \
-I../../meshLibrary/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-lmeshTools \
-ltriSurface \
-L$(FOAM_USER_LIBBIN) \
-lmeshLibrary
utilities/improveMeshQuality/improveMeshQuality.C
View file @
025222fa
...
...
@@ -31,6 +31,8 @@ Description
#include "Time.H"
#include "polyMeshGenModifier.H"
#include "meshOptimizer.H"
#include "meshSurfaceOptimizer.H"
#include "meshSurfaceEngine.H"
using
namespace
Foam
;
...
...
@@ -102,18 +104,49 @@ int main(int argc, char *argv[])
}
else
{
Info
<<
"No constraints pplied on the smoothing procedure"
<<
endl
;
Info
<<
"No constraints
a
pplied on the smoothing procedure"
<<
endl
;
}
//- load the mesh from disk
polyMeshGen
pmg
(
runTime
);
pmg
.
read
();
//- construct the surface smoother
meshSurfaceEngine
mse
(
pmg
);
meshSurfaceOptimizer
surfOpt
(
mse
);
//- construct the smoother
meshOptimizer
mOpt
(
pmg
);
if
(
!
constrainedCellSet
.
empty
()
)
mOpt
.
lockCells
(
constrainedCellSet
);
{
//- lock cells in constrainedCellSet
mOpt
.
lockCellsInSubset
(
constrainedCellSet
);
//- find boundary faces which shall be locked
labelLongList
lockedBndFaces
,
selectedCells
;
const
label
sId
=
pmg
.
cellSubsetIndex
(
constrainedCellSet
);
pmg
.
cellsInSubset
(
sId
,
selectedCells
);
boolList
activeCell
(
pmg
.
cells
().
size
(),
false
);
forAll
(
selectedCells
,
i
)
activeCell
[
selectedCells
[
i
]]
=
true
;
const
labelList
&
faceOwner
=
mse
.
faceOwners
();
forAll
(
faceOwner
,
bfI
)
if
(
activeCell
[
faceOwner
[
bfI
]]
)
lockedBndFaces
.
append
(
bfI
);
//- lock boundary faces
surfOpt
.
lockBoundaryFaces
(
lockedBndFaces
);
}
//- optimise mesh surface
surfOpt
.
optimizeSurface
(
nSurfaceIterations
);
//- clear geometry information before volume smoothing
pmg
.
clearAddressingData
();
//- perform optimisation using the laplace smoother and
mOpt
.
optimizeMeshFV
...
...
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