Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
b00349f4
Commit
b00349f4
authored
13 years ago
by
Emilie Marchandise
Browse files
Options
Downloads
Patches
Plain Diff
No commit message
No commit message
parent
67d771be
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Geo/gmshLevelset.cpp
+36
-36
36 additions, 36 deletions
Geo/gmshLevelset.cpp
with
36 additions
and
36 deletions
Geo/gmshLevelset.cpp
+
36
−
36
View file @
b00349f4
...
...
@@ -752,44 +752,44 @@ gLevelsetDistGeom::gLevelsetDistGeom(std::string box, std::string geom, int tag)
if
(
NY
<
2
)
NY
=
2
;
if
(
NZ
<
2
)
NZ
=
2
;
//
Msg::Info(" bounding box min: %g %g %g -- max: %g %g %g",
//
bb.min().x(), bb.min().y(), bb.min().z(),
//
bb.max().x(), bb.max().y(), bb.max().z());
//
Msg::Info(" Nx=%d Ny=%d Nz=%d", NX, NY, NZ);
//
_box = new cartesianBox<double>(bb.min().x(), bb.min().y(), bb.min().z(),
//
SVector3(range.x(), 0, 0),
//
SVector3(0, range.y(), 0),
//
SVector3(0, 0, range.z()),
//
NX, NY, NZ, levels);
//
for (int i = 0; i < NX; i++)
//
for (int j = 0; j < NY; j++)
//
for (int k = 0; k < NZ; k++)
//
_box->insertActiveCell(_box->getCellIndex(i, j, k));
//
cartesianBox<double> *parent = _box, *child;
//
while((child = parent->getChildBox())){
//
//Msg::Info(" level %d ", child->getLevel());
//
for(unsigned int i = 0; i < refinePoints.size(); i++)
//
insertActiveCells(refinePoints[i].x(), refinePoints[i].y(), refinePoints[i].z(),
//
rtube / pow(2., (levels - child->getLevel())), *child);
//
parent = child;
//
}
//
//Msg::Info("Removing cells to match mesh topology constraints");
//
removeBadChildCells(_box);
//
removeParentCellsWithChildren(_box);
//
//Msg::Info("Initializing nodal values in the cartesian grid");
//
_box->createNodalValues();
//
//Msg::Info("Computing levelset on the cartesian grid");
//
computeLevelset(gm, *_box);
//
//Msg::Info("Renumbering mesh vertices across levels");
//
_box->renumberNodes();
//
_box->writeMSH("yeah.msh", false);
Msg
::
Info
(
" bounding box min: %g %g %g -- max: %g %g %g"
,
bb
.
min
().
x
(),
bb
.
min
().
y
(),
bb
.
min
().
z
(),
bb
.
max
().
x
(),
bb
.
max
().
y
(),
bb
.
max
().
z
());
Msg
::
Info
(
" Nx=%d Ny=%d Nz=%d"
,
NX
,
NY
,
NZ
);
_box
=
new
cartesianBox
<
double
>
(
bb
.
min
().
x
(),
bb
.
min
().
y
(),
bb
.
min
().
z
(),
SVector3
(
range
.
x
(),
0
,
0
),
SVector3
(
0
,
range
.
y
(),
0
),
SVector3
(
0
,
0
,
range
.
z
()),
NX
,
NY
,
NZ
,
levels
);
for
(
int
i
=
0
;
i
<
NX
;
i
++
)
for
(
int
j
=
0
;
j
<
NY
;
j
++
)
for
(
int
k
=
0
;
k
<
NZ
;
k
++
)
_box
->
insertActiveCell
(
_box
->
getCellIndex
(
i
,
j
,
k
));
cartesianBox
<
double
>
*
parent
=
_box
,
*
child
;
while
((
child
=
parent
->
getChildBox
())){
//Msg::Info(" level %d ", child->getLevel());
for
(
unsigned
int
i
=
0
;
i
<
refinePoints
.
size
();
i
++
)
insertActiveCells
(
refinePoints
[
i
].
x
(),
refinePoints
[
i
].
y
(),
refinePoints
[
i
].
z
(),
rtube
/
pow
(
2.
,
(
levels
-
child
->
getLevel
())),
*
child
);
parent
=
child
;
}
//Msg::Info("Removing cells to match mesh topology constraints");
removeBadChildCells
(
_box
);
removeParentCellsWithChildren
(
_box
);
//Msg::Info("Initializing nodal values in the cartesian grid");
_box
->
createNodalValues
();
//Msg::Info("Computing levelset on the cartesian grid");
computeLevelset
(
gm
,
*
_box
);
//Msg::Info("Renumbering mesh vertices across levels");
_box
->
renumberNodes
();
_box
->
writeMSH
(
"yeah.msh"
,
false
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment