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
60471dd4
Commit
60471dd4
authored
20 years ago
by
Jean-François Remacle
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
d713a7c1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Mesh/2D_Mesh.cpp
+7
-7
7 additions, 7 deletions
Mesh/2D_Mesh.cpp
Mesh/BDS.cpp
+26
-19
26 additions, 19 deletions
Mesh/BDS.cpp
with
33 additions
and
26 deletions
Mesh/2D_Mesh.cpp
+
7
−
7
View file @
60471dd4
// $Id: 2D_Mesh.cpp,v 1.7
4
2005-04-1
5 14:32
:4
0
remacle Exp $
// $Id: 2D_Mesh.cpp,v 1.7
5
2005-04-1
9 07:23
:4
2
remacle Exp $
//
//
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -914,7 +914,7 @@ void Maillage_Surface(void *data, void *dum)
...
@@ -914,7 +914,7 @@ void Maillage_Surface(void *data, void *dum)
delete_NXE
(
tnxe
);
delete_NXE
(
tnxe
);
}
}
if
(
s
->
Recombine
&&
CTX
.
mesh
.
algo_recombine
==
1
){
if
(
s
->
Recombine
){
//
&& CTX.mesh.algo_recombine ==1 ){
Msg
(
STATUS3
,
"Recombining surface %d"
,
s
->
Num
);
Msg
(
STATUS3
,
"Recombining surface %d"
,
s
->
Num
);
Recombine
(
s
->
Vertices
,
s
->
Simplexes
,
s
->
Quadrangles
,
s
->
RecombineAngle
);
Recombine
(
s
->
Vertices
,
s
->
Simplexes
,
s
->
Quadrangles
,
s
->
RecombineAngle
);
}
}
...
@@ -948,10 +948,10 @@ void Maillage_Surface(void *data, void *dum)
...
@@ -948,10 +948,10 @@ void Maillage_Surface(void *data, void *dum)
ReOrientSurfaceMesh
(
s
);
ReOrientSurfaceMesh
(
s
);
}
}
if
(
CTX
.
mesh
.
algo_recombine
==
2
)
//
if(CTX.mesh.algo_recombine ==2 )
{
//
{
printf
(
"coucou
\n
"
);
//
printf("coucou\n");
Recombine_All
(
THEM
);
//
Recombine_All (THEM);
}
//
}
}
}
This diff is collapsed.
Click to expand it.
Mesh/BDS.cpp
+
26
−
19
View file @
60471dd4
...
@@ -88,7 +88,8 @@ void BDS_Point::getTriangles (std::list<BDS_Triangle *> &t)
...
@@ -88,7 +88,8 @@ void BDS_Point::getTriangles (std::list<BDS_Triangle *> &t)
std
::
list
<
BDS_Edge
*>::
iterator
ite
=
edges
.
end
();
std
::
list
<
BDS_Edge
*>::
iterator
ite
=
edges
.
end
();
while
(
it
!=
ite
)
while
(
it
!=
ite
)
{
{
for
(
int
i
=
0
;
i
<
2
;
++
i
)
int
NF
=
(
*
it
)
->
numfaces
();
for
(
int
i
=
0
;
i
<
NF
;
++
i
)
{
{
BDS_Triangle
*
tt
=
(
*
it
)
->
faces
[
i
];
BDS_Triangle
*
tt
=
(
*
it
)
->
faces
[
i
];
if
(
tt
)
if
(
tt
)
...
@@ -481,7 +482,7 @@ bool BDS_Mesh ::split_edge ( BDS_Edge *e, double coord, const BDS_Projector &)
...
@@ -481,7 +482,7 @@ bool BDS_Mesh ::split_edge ( BDS_Edge *e, double coord, const BDS_Projector &)
int
nbFaces
=
e
->
numfaces
();
int
nbFaces
=
e
->
numfaces
();
if
(
nbFaces
=
=
1
)
return
false
;
if
(
nbFaces
!
=
2
)
return
false
;
BDS_Point
*
op
[
2
];
BDS_Point
*
op
[
2
];
BDS_Point
*
p1
=
e
->
p1
;
BDS_Point
*
p1
=
e
->
p1
;
...
@@ -569,14 +570,13 @@ bool BDS_Mesh ::swap_edge ( BDS_Edge *e)
...
@@ -569,14 +570,13 @@ bool BDS_Mesh ::swap_edge ( BDS_Edge *e)
int
nbFaces
=
e
->
numfaces
();
int
nbFaces
=
e
->
numfaces
();
if
(
nbFaces
!=
2
)
return
false
;
BDS_Point
*
pts1
[
3
];
BDS_Point
*
pts1
[
3
];
e
->
faces
[
0
]
->
getNodes
(
pts1
);
e
->
faces
[
0
]
->
getNodes
(
pts1
);
BDS_Point
*
pts2
[
3
];
BDS_Point
*
pts2
[
3
];
e
->
faces
[
1
]
->
getNodes
(
pts2
);
e
->
faces
[
1
]
->
getNodes
(
pts2
);
if
(
nbFaces
!=
2
)
return
false
;
if
(
e
->
g
&&
e
->
g
->
classif_degree
!=
2
)
return
false
;
if
(
e
->
g
&&
e
->
g
->
classif_degree
!=
2
)
return
false
;
BDS_Point
*
op
[
2
];
BDS_Point
*
op
[
2
];
...
@@ -703,37 +703,44 @@ bool BDS_Mesh ::smooth_point ( BDS_Point *p, const BDS_Projector &)
...
@@ -703,37 +703,44 @@ bool BDS_Mesh ::smooth_point ( BDS_Point *p, const BDS_Projector &)
void
BDS_Mesh
::
adapt_mesh
(
double
l
,
const
BDS_Projector
&
proj
)
void
BDS_Mesh
::
adapt_mesh
(
double
l
,
const
BDS_Projector
&
proj
)
{
{
printf
(
"couco1
\n
"
);
std
::
set
<
BDS_Edge
*
,
EdgeLessThan
>
small_to_long
;
std
::
set
<
BDS_Edge
*
,
EdgeLessThan
>
small_to_long
;
{
{
std
::
set
<
BDS_Edge
*
,
EdgeLessThan
>::
iterator
it
=
edges
.
begin
();
std
::
set
<
BDS_Edge
*
,
EdgeLessThan
>::
iterator
it
=
edges
.
begin
();
std
::
set
<
BDS_Edge
*
,
EdgeLessThan
>::
iterator
ite
=
edges
.
end
();
std
::
set
<
BDS_Edge
*
,
EdgeLessThan
>::
iterator
ite
=
edges
.
end
();
while
(
it
!=
ite
)
while
(
it
!=
ite
)
{
{
if
((
*
it
)
->
numfaces
()
==
1
)
printf
(
"one face
\n
"
);
//
if ((*it)->numfaces()==1)printf("one face\n");
small_to_long
.
insert
(
*
it
);
small_to_long
.
insert
(
*
it
);
++
it
;
++
it
;
}
}
}
}
printf
(
"couco2
\n
"
);
{
{
std
::
set
<
BDS_Edge
*
,
EdgeLessThan
>::
iterator
it
=
small_to_long
.
begin
();
std
::
set
<
BDS_Edge
*
,
EdgeLessThan
>::
iterator
it
=
small_to_long
.
begin
();
std
::
set
<
BDS_Edge
*
,
EdgeLessThan
>::
iterator
ite
=
small_to_long
.
end
();
std
::
set
<
BDS_Edge
*
,
EdgeLessThan
>::
iterator
ite
=
small_to_long
.
end
();
int
nbspl
=
0
;
int
nbspl
=
0
;
while
(
it
!=
ite
)
while
(
it
!=
ite
)
{
{
BDS_Point
*
op
[
2
];
if
((
*
it
)
->
numfaces
()
==
2
)
(
*
it
)
->
oppositeof
(
op
);
{
double
ll
=
sqrt
((
op
[
0
]
->
X
-
op
[
1
]
->
X
)
*
(
op
[
0
]
->
X
-
op
[
1
]
->
X
)
+
BDS_Point
*
op
[
2
];
(
op
[
0
]
->
Y
-
op
[
1
]
->
Y
)
*
(
op
[
0
]
->
Y
-
op
[
1
]
->
Y
)
+
(
*
it
)
->
oppositeof
(
op
);
(
op
[
0
]
->
Z
-
op
[
1
]
->
Z
)
*
(
op
[
0
]
->
Z
-
op
[
1
]
->
Z
));
double
ll
=
sqrt
((
op
[
0
]
->
X
-
op
[
1
]
->
X
)
*
(
op
[
0
]
->
X
-
op
[
1
]
->
X
)
+
if
(
!
(
*
it
)
->
deleted
&&
(
*
it
)
->
length
()
>
l
&&
ll
>
0.5
*
l
){
(
op
[
0
]
->
Y
-
op
[
1
]
->
Y
)
*
(
op
[
0
]
->
Y
-
op
[
1
]
->
Y
)
+
(
op
[
0
]
->
Z
-
op
[
1
]
->
Z
)
*
(
op
[
0
]
->
Z
-
op
[
1
]
->
Z
));
if
(
!
(
*
it
)
->
deleted
&&
(
*
it
)
->
length
()
>
l
&&
ll
>
0.5
*
l
){
split_edge
(
*
it
,
0.5
,
proj
);
split_edge
(
*
it
,
0.5
,
proj
);
nbspl
++
;
nbspl
++
;
}
}
}
++
it
;
++
it
;
}
}
printf
(
"nbspl = %d
\n
"
,
nbspl
);
printf
(
"nbspl = %d
\n
"
,
nbspl
);
}
}
// return;
// return;
cleanup
();
cleanup
();
...
...
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