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
Package registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Romin Tomasetti
gmsh
Commits
d0623d18
Commit
d0623d18
authored
Oct 11, 2011
by
Emilie Marchandise
Browse files
Options
Downloads
Patches
Plain Diff
iwork on levelset with python
parent
2c5dc2e8
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Geo/Geo.h
+0
-2
0 additions, 2 deletions
Geo/Geo.h
contrib/DiscreteIntegration/DILevelset.cpp
+19
-19
19 additions, 19 deletions
contrib/DiscreteIntegration/DILevelset.cpp
contrib/DiscreteIntegration/DILevelset.h
+1
-1
1 addition, 1 deletion
contrib/DiscreteIntegration/DILevelset.h
with
20 additions
and
22 deletions
Geo/Geo.h
+
0
−
2
View file @
d0623d18
...
...
@@ -14,7 +14,6 @@
#include
"TreeUtils.h"
#include
"SPoint2.h"
#include
"ExtrudeParams.h"
#include
"gmshLevelset.h"
#define MSH_POINT 100
#define MSH_POINT_BND_LAYER 101
...
...
@@ -228,7 +227,6 @@ class Shape{
};
class
gLevelset
;
class
LevelSet
{
public:
int
Num
;
...
...
This diff is collapsed.
Click to expand it.
contrib/DiscreteIntegration/DILevelset.cpp
+
19
−
19
View file @
d0623d18
...
...
@@ -546,11 +546,11 @@ gLevelsetBox::gLevelsetBox(const double *pt, const double *dir1, const double *d
double
pt2
[
3
]
=
{
pt
[
0
]
+
a
*
n1
[
0
]
+
b
*
n2
[
0
]
+
c
*
n3
[
0
],
pt
[
1
]
+
a
*
n1
[
1
]
+
b
*
n2
[
1
]
+
c
*
n3
[
1
],
pt
[
2
]
+
a
*
n1
[
2
]
+
b
*
n2
[
2
]
+
c
*
n3
[
2
]};
std
::
vector
<
const
gLevelset
*>
p
;
p
.
push_back
(
new
gLevelsetPlane
(
pt2
,
dir3
,
tag
));
p
.
push_back
(
new
gLevelsetPlane
(
pt
,
dir3m
,
tag
));
p
.
push_back
(
new
gLevelsetPlane
(
pt
,
dir2m
,
tag
));
p
.
push_back
(
new
gLevelsetPlane
(
pt2
,
dir2
,
tag
));
p
.
push_back
(
new
gLevelsetPlane
(
pt2
,
dir1
,
tag
));
p
.
push_back
(
new
gLevelsetPlane
(
pt2
,
dir3
,
tag
++
));
p
.
push_back
(
new
gLevelsetPlane
(
pt
,
dir3m
,
tag
++
));
p
.
push_back
(
new
gLevelsetPlane
(
pt
,
dir2m
,
tag
++
));
p
.
push_back
(
new
gLevelsetPlane
(
pt2
,
dir2
,
tag
++
));
p
.
push_back
(
new
gLevelsetPlane
(
pt2
,
dir1
,
tag
++
));
p
.
push_back
(
new
gLevelsetPlane
(
pt
,
dir1m
,
tag
));
Ls
=
new
gLevelsetIntersection
(
p
);
}
...
...
@@ -563,11 +563,11 @@ gLevelsetBox::gLevelsetBox(const double *pt1, const double *pt2, const double *p
isPlanar
(
pt1
,
pt2
,
pt3
,
pt4
),
isPlanar
(
pt5
,
pt6
,
pt7
,
pt8
),
isPlanar
(
pt1
,
pt2
,
pt5
,
pt6
),
isPlanar
(
pt3
,
pt4
,
pt7
,
pt8
),
isPlanar
(
pt1
,
pt4
,
pt5
,
pt8
),
isPlanar
(
pt2
,
pt3
,
pt6
,
pt7
));
std
::
vector
<
const
gLevelset
*>
p
;
p
.
push_back
(
new
gLevelsetPlane
(
pt5
,
pt6
,
pt8
,
tag
));
p
.
push_back
(
new
gLevelsetPlane
(
pt1
,
pt4
,
pt2
,
tag
));
p
.
push_back
(
new
gLevelsetPlane
(
pt1
,
pt2
,
pt5
,
tag
));
p
.
push_back
(
new
gLevelsetPlane
(
pt3
,
pt4
,
pt7
,
tag
));
p
.
push_back
(
new
gLevelsetPlane
(
pt2
,
pt3
,
pt6
,
tag
));
p
.
push_back
(
new
gLevelsetPlane
(
pt5
,
pt6
,
pt8
,
tag
++
));
p
.
push_back
(
new
gLevelsetPlane
(
pt1
,
pt4
,
pt2
,
tag
++
));
p
.
push_back
(
new
gLevelsetPlane
(
pt1
,
pt2
,
pt5
,
tag
++
));
p
.
push_back
(
new
gLevelsetPlane
(
pt3
,
pt4
,
pt7
,
tag
++
));
p
.
push_back
(
new
gLevelsetPlane
(
pt2
,
pt3
,
pt6
,
tag
++
));
p
.
push_back
(
new
gLevelsetPlane
(
pt1
,
pt5
,
pt4
,
tag
));
Ls
=
new
gLevelsetIntersection
(
p
);
}
...
...
@@ -579,8 +579,8 @@ gLevelsetCylinder::gLevelsetCylinder(const double *pt, const double *dir, const
double
n
[
3
];
norm
(
dir
,
n
);
double
pt2
[
3
]
=
{
pt
[
0
]
+
H
*
n
[
0
],
pt
[
1
]
+
H
*
n
[
1
],
pt
[
2
]
+
H
*
n
[
2
]};
std
::
vector
<
const
gLevelset
*>
p
;
p
.
push_back
(
new
gLevelsetGenCylinder
(
pt
,
dir
,
R
,
tag
));
p
.
push_back
(
new
gLevelsetPlane
(
pt
,
dir2
,
tag
));
p
.
push_back
(
new
gLevelsetGenCylinder
(
pt
,
dir
,
R
,
tag
++
));
p
.
push_back
(
new
gLevelsetPlane
(
pt
,
dir2
,
tag
++
));
p
.
push_back
(
new
gLevelsetPlane
(
pt2
,
dir
,
tag
));
Ls
=
new
gLevelsetIntersection
(
p
);
}
...
...
@@ -590,9 +590,9 @@ gLevelsetCylinder::gLevelsetCylinder(const double * pt, const double *dir, const
double
n
[
3
];
norm
(
dir
,
n
);
double
pt2
[
3
]
=
{
pt
[
0
]
+
H
*
n
[
0
],
pt
[
1
]
+
H
*
n
[
1
],
pt
[
2
]
+
H
*
n
[
2
]};
std
::
vector
<
const
gLevelset
*>
p1
;
p1
.
push_back
(
new
gLevelsetGenCylinder
(
pt
,
dir
,
R
,
tag
));
p1
.
push_back
(
new
gLevelsetPlane
(
pt
,
dir2
,
tag
));
p1
.
push_back
(
new
gLevelsetPlane
(
pt2
,
dir
,
tag
));
p1
.
push_back
(
new
gLevelsetGenCylinder
(
pt
,
dir
,
R
,
tag
++
));
p1
.
push_back
(
new
gLevelsetPlane
(
pt
,
dir2
,
tag
++
));
p1
.
push_back
(
new
gLevelsetPlane
(
pt2
,
dir
,
tag
++
));
std
::
vector
<
const
gLevelset
*>
p2
;
p2
.
push_back
(
new
gLevelsetIntersection
(
p1
));
p2
.
push_back
(
new
gLevelsetGenCylinder
(
pt
,
dir
,
r
,
tag
));
...
...
@@ -624,12 +624,12 @@ gLevelsetConrod::gLevelsetConrod(const double *pt, const double *dir1, const dou
double
pt38
[
3
]
=
{
pt37
[
0
]
+
n3
[
0
]
*
L2
,
pt37
[
1
]
+
n3
[
1
]
*
L2
,
pt37
[
2
]
+
n3
[
2
]
*
L2
};
std
::
vector
<
const
gLevelset
*>
p1
;
p1
.
push_back
(
new
gLevelsetBox
(
pt31
,
pt32
,
pt33
,
pt34
,
pt35
,
pt36
,
pt37
,
pt38
,
tag
));
p1
.
push_back
(
new
gLevelsetCylinder
(
pt1
,
dir2
,
R1
,
H1
,
tag
));
p1
.
push_back
(
new
gLevelsetCylinder
(
pt2
,
dir2
,
R2
,
H2
,
tag
));
p1
.
push_back
(
new
gLevelsetCylinder
(
pt1
,
dir2
,
R1
,
H1
,
tag
+
6
));
p1
.
push_back
(
new
gLevelsetCylinder
(
pt2
,
dir2
,
R2
,
H2
,
tag
+
9
));
std
::
vector
<
const
gLevelset
*>
p2
;
p2
.
push_back
(
new
gLevelsetUnion
(
p1
));
p2
.
push_back
(
new
gLevelsetGenCylinder
(
pt1
,
dir2
,
r1
,
tag
));
p2
.
push_back
(
new
gLevelsetGenCylinder
(
pt2
,
dir2
,
r2
,
tag
));
p2
.
push_back
(
new
gLevelsetGenCylinder
(
pt1
,
dir2
,
r1
,
tag
+
12
));
p2
.
push_back
(
new
gLevelsetGenCylinder
(
pt2
,
dir2
,
r2
,
tag
+
13
));
Ls
=
new
gLevelsetCut
(
p2
);
}
...
...
This diff is collapsed.
Click to expand it.
contrib/DiscreteIntegration/DILevelset.h
+
1
−
1
View file @
d0623d18
...
...
@@ -90,7 +90,7 @@ public:
printf
(
"Tag of the levelset (%d) must be greater than 0.
\n
"
,
tag
);
tag
=
abs
(
tag
);
}
tag_
=
tag
++
;
tag_
=
tag
;
}
virtual
double
operator
()
(
const
double
&
x
,
const
double
&
y
,
const
double
&
z
)
const
=
0
;
std
::
vector
<
const
gLevelset
*>
getChildren
()
const
{
std
::
vector
<
const
gLevelset
*>
p
;
return
p
;
}
...
...
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