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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
65e2f865
Commit
65e2f865
authored
13 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
fix wanrings
parent
c3e52e74
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
Common/Context.cpp
+2
-1
2 additions, 1 deletion
Common/Context.cpp
Mesh/meshGFaceBoundaryLayers.cpp
+1
-1
1 addition, 1 deletion
Mesh/meshGFaceBoundaryLayers.cpp
Numeric/DivideAndConquer.cpp
+26
-15
26 additions, 15 deletions
Numeric/DivideAndConquer.cpp
with
29 additions
and
17 deletions
Common/Context.cpp
+
2
−
1
View file @
65e2f865
...
@@ -78,7 +78,8 @@ CTX::CTX()
...
@@ -78,7 +78,8 @@ CTX::CTX()
mesh
.
volumesEdges
=
mesh
.
volumesFaces
=
mesh
.
surfacesEdges
=
mesh
.
surfacesFaces
=
0
;
mesh
.
volumesEdges
=
mesh
.
volumesFaces
=
mesh
.
surfacesEdges
=
mesh
.
surfacesFaces
=
0
;
mesh
.
volumesFaces
=
mesh
.
surfacesEdges
=
mesh
.
surfacesFaces
=
0
;
mesh
.
volumesFaces
=
mesh
.
surfacesEdges
=
mesh
.
surfacesFaces
=
0
;
mesh
.
smoothInternalEdges
=
mesh
.
smoothNormals
=
mesh
.
reverseAllNormals
=
0
;
mesh
.
smoothInternalEdges
=
mesh
.
smoothNormals
=
mesh
.
reverseAllNormals
=
0
;
mesh
.
explode
=
mesh
.
numSubEdges
=
mesh
.
angleSmoothNormals
=
0
;
mesh
.
explode
=
mesh
.
angleSmoothNormals
=
0.
;
mesh
.
numSubEdges
=
0
;
mesh
.
colorCarousel
=
0
;
mesh
.
colorCarousel
=
0
;
color
.
mesh
.
tangents
=
color
.
mesh
.
tetrahedron
=
color
.
mesh
.
triangle
=
0
;
color
.
mesh
.
tangents
=
color
.
mesh
.
tetrahedron
=
color
.
mesh
.
triangle
=
0
;
color
.
mesh
.
prism
=
color
.
mesh
.
pyramid
=
color
.
mesh
.
hexahedron
=
0
;
color
.
mesh
.
prism
=
color
.
mesh
.
pyramid
=
color
.
mesh
.
hexahedron
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Mesh/meshGFaceBoundaryLayers.cpp
+
1
−
1
View file @
65e2f865
...
@@ -187,7 +187,7 @@ BoundaryLayerColumns* buidAdditionalPoints2D (GFace *gf, double _treshold) {
...
@@ -187,7 +187,7 @@ BoundaryLayerColumns* buidAdditionalPoints2D (GFace *gf, double _treshold) {
_dirs
.
push_back
(
x
);
_dirs
.
push_back
(
x
);
}
}
else
if
(
angle
>=
_treshold
){
else
if
(
angle
>=
_treshold
){
int
fanSize
=
angle
/
_treshold
;
int
fanSize
=
(
int
)(
angle
/
_treshold
)
;
printf
(
"ONE FAN HAS BEEN CREATED : %d %d %d %d ANGLE = %g | %g %g %g %g
\n
"
,
e1
.
getVertex
(
0
)
->
getNum
(),
printf
(
"ONE FAN HAS BEEN CREATED : %d %d %d %d ANGLE = %g | %g %g %g %g
\n
"
,
e1
.
getVertex
(
0
)
->
getNum
(),
e1
.
getVertex
(
1
)
->
getNum
(),
e2
.
getVertex
(
0
)
->
getNum
(),
e2
.
getVertex
(
1
)
->
getNum
(),
e1
.
getVertex
(
1
)
->
getNum
(),
e2
.
getVertex
(
0
)
->
getNum
(),
e2
.
getVertex
(
1
)
->
getNum
(),
angle
/
M_PI
*
180
,
N1
[
0
].
x
(),
N1
[
0
].
y
(),
N2
[
0
].
x
(),
N2
[
0
].
y
());
angle
/
M_PI
*
180
,
N1
[
0
].
x
(),
N1
[
0
].
y
(),
N2
[
0
].
x
(),
N2
[
0
].
y
());
...
...
This diff is collapsed.
Click to expand it.
Numeric/DivideAndConquer.cpp
+
26
−
15
View file @
65e2f865
...
@@ -865,7 +865,8 @@ void DocRecord::setPoints(fullMatrix<double> *p)
...
@@ -865,7 +865,8 @@ void DocRecord::setPoints(fullMatrix<double> *p)
}
}
}
}
void
DocRecord
::
recur_tag_triangles
(
int
iTriangle
,
std
::
set
<
int
>&
taggedTriangles
,
std
::
map
<
std
::
pair
<
void
*
,
void
*>
,
std
::
pair
<
int
,
int
>
>&
edgesToTriangles
){
void
DocRecord
::
recur_tag_triangles
(
int
iTriangle
,
std
::
set
<
int
>&
taggedTriangles
,
std
::
map
<
std
::
pair
<
void
*
,
void
*>
,
std
::
pair
<
int
,
int
>
>&
edgesToTriangles
)
{
if
(
taggedTriangles
.
find
(
iTriangle
)
!=
taggedTriangles
.
end
())
return
;
if
(
taggedTriangles
.
find
(
iTriangle
)
!=
taggedTriangles
.
end
())
return
;
taggedTriangles
.
insert
(
iTriangle
);
taggedTriangles
.
insert
(
iTriangle
);
...
@@ -885,7 +886,8 @@ void DocRecord::recur_tag_triangles(int iTriangle,std::set<int>& taggedTriangles
...
@@ -885,7 +886,8 @@ void DocRecord::recur_tag_triangles(int iTriangle,std::set<int>& taggedTriangles
}
}
}
}
std
::
set
<
int
>
DocRecord
::
tagInterior
(
double
x
,
double
y
){
std
::
set
<
int
>
DocRecord
::
tagInterior
(
double
x
,
double
y
)
{
std
::
map
<
std
::
pair
<
void
*
,
void
*>
,
std
::
pair
<
int
,
int
>
>
edgesToTriangles
;
std
::
map
<
std
::
pair
<
void
*
,
void
*>
,
std
::
pair
<
int
,
int
>
>
edgesToTriangles
;
int
iFirst
=
1
;
int
iFirst
=
1
;
for
(
int
i
=
0
;
i
<
numTriangles
;
i
++
){
for
(
int
i
=
0
;
i
<
numTriangles
;
i
++
){
...
@@ -921,7 +923,8 @@ std::set<int> DocRecord::tagInterior(double x,double y){
...
@@ -921,7 +923,8 @@ std::set<int> DocRecord::tagInterior(double x,double y){
return
taggedTriangles
;
return
taggedTriangles
;
}
}
void
DocRecord
::
concave
(
double
x
,
double
y
,
GFace
*
gf
){
void
DocRecord
::
concave
(
double
x
,
double
y
,
GFace
*
gf
)
{
int
i
;
int
i
;
int
index1
;
int
index1
;
int
index2
;
int
index2
;
...
@@ -969,7 +972,8 @@ void DocRecord::concave(double x,double y,GFace* gf){
...
@@ -969,7 +972,8 @@ void DocRecord::concave(double x,double y,GFace* gf){
}
}
}
}
bool
DocRecord
::
contain
(
int
index1
,
int
index2
,
int
index3
){
bool
DocRecord
::
contain
(
int
index1
,
int
index2
,
int
index3
)
{
int
i
;
int
i
;
void
*
dataA
;
void
*
dataA
;
void
*
dataB
;
void
*
dataB
;
...
@@ -986,20 +990,23 @@ bool DocRecord::contain(int index1,int index2,int index3){
...
@@ -986,20 +990,23 @@ bool DocRecord::contain(int index1,int index2,int index3){
return
0
;
return
0
;
}
}
void
DocRecord
::
add
(
int
index1
,
int
index2
){
void
DocRecord
::
add
(
int
index1
,
int
index2
)
{
void
*
data
;
void
*
data
;
data
=
points
[
index2
].
data
;
data
=
points
[
index2
].
data
;
points
[
index1
].
vicinity
.
push_back
(
data
);
points
[
index1
].
vicinity
.
push_back
(
data
);
}
}
void
DocRecord
::
initialize
(){
void
DocRecord
::
initialize
()
{
int
i
;
int
i
;
for
(
i
=
0
;
i
<
numPoints
;
i
++
){
for
(
i
=
0
;
i
<
numPoints
;
i
++
){
points
[
i
].
flag
=
0
;
points
[
i
].
flag
=
0
;
}
}
}
}
bool
DocRecord
::
remove_point
(
int
index
){
bool
DocRecord
::
remove_point
(
int
index
)
{
if
(
points
[
index
].
flag
==
0
){
if
(
points
[
index
].
flag
==
0
){
points
[
index
].
flag
=
1
;
points
[
index
].
flag
=
1
;
return
1
;
return
1
;
...
@@ -1007,7 +1014,8 @@ bool DocRecord::remove_point(int index){
...
@@ -1007,7 +1014,8 @@ bool DocRecord::remove_point(int index){
else
return
0
;
else
return
0
;
}
}
void
DocRecord
::
remove_all
(){
void
DocRecord
::
remove_all
()
{
int
i
;
int
i
;
int
index
;
int
index
;
int
numPoints2
;
int
numPoints2
;
...
@@ -1035,7 +1043,8 @@ void DocRecord::remove_all(){
...
@@ -1035,7 +1043,8 @@ void DocRecord::remove_all(){
numPoints
=
numPoints2
;
numPoints
=
numPoints2
;
}
}
void
DocRecord
::
add_point
(
double
x
,
double
y
,
GFace
*
face
){
void
DocRecord
::
add_point
(
double
x
,
double
y
,
GFace
*
face
)
{
PointRecord
point
;
PointRecord
point
;
point
.
where
.
h
=
x
;
point
.
where
.
h
=
x
;
point
.
where
.
v
=
y
;
point
.
where
.
v
=
y
;
...
@@ -1044,7 +1053,8 @@ void DocRecord::add_point(double x,double y,GFace*face){
...
@@ -1044,7 +1053,8 @@ void DocRecord::add_point(double x,double y,GFace*face){
numPoints
=
numPoints
+
1
;
numPoints
=
numPoints
+
1
;
}
}
void
DocRecord
::
build_edges
(){
void
DocRecord
::
build_edges
()
{
int
i
;
int
i
;
int
j
;
int
j
;
int
num
;
int
num
;
...
@@ -1063,11 +1073,13 @@ void DocRecord::build_edges(){
...
@@ -1063,11 +1073,13 @@ void DocRecord::build_edges(){
}
}
}
}
void
DocRecord
::
clear_edges
(){
void
DocRecord
::
clear_edges
()
{
mesh_edges
.
clear
();
mesh_edges
.
clear
();
}
}
bool
DocRecord
::
delaunay_conformity
(
GFace
*
gf
){
bool
DocRecord
::
delaunay_conformity
(
GFace
*
gf
)
{
int
i
;
int
i
;
bool
flag
;
bool
flag
;
GEdge
*
edge
;
GEdge
*
edge
;
...
@@ -1086,9 +1098,8 @@ bool DocRecord::delaunay_conformity(GFace* gf){
...
@@ -1086,9 +1098,8 @@ bool DocRecord::delaunay_conformity(GFace* gf){
vertex1
=
element
->
getVertex
(
0
);
vertex1
=
element
->
getVertex
(
0
);
vertex2
=
element
->
getVertex
(
1
);
vertex2
=
element
->
getVertex
(
1
);
flag
=
find_edge
(
vertex1
,
vertex2
);
flag
=
find_edge
(
vertex1
,
vertex2
);
if
(
!
flag
)
return
0
;
if
(
!
flag
)
return
false
;
}
}
}
}
return
1
;
return
true
;
}
}
\ No newline at end of file
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