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
1b408106
Commit
1b408106
authored
17 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
revert to previous
parent
0b93d65e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Geo/GFace.cpp
+1
-3
1 addition, 3 deletions
Geo/GFace.cpp
Mesh/meshGFace.cpp
+9
-44
9 additions, 44 deletions
Mesh/meshGFace.cpp
with
10 additions
and
47 deletions
Geo/GFace.cpp
+
1
−
3
View file @
1b408106
// $Id: GFace.cpp,v 1.3
3
2007-05-05 0
1:04:40 anand
Exp $
// $Id: GFace.cpp,v 1.3
4
2007-05-05 0
8:12:08 geuzaine
Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -508,8 +508,6 @@ SPoint2 GFace::parFromPoint(const SPoint3 &p) const
{
double
U
,
V
;
Msg
(
INFO
,
"Instead, I died here"
);
XYZtoUV
(
p
.
x
(),
p
.
y
(),
p
.
z
(),
U
,
V
,
1.0
);
return
SPoint2
(
U
,
V
);
...
...
This diff is collapsed.
Click to expand it.
Mesh/meshGFace.cpp
+
9
−
44
View file @
1b408106
// $Id: meshGFace.cpp,v 1.7
5
2007-05-05 0
1:04:40 anand
Exp $
// $Id: meshGFace.cpp,v 1.7
6
2007-05-05 0
8:11:08 geuzaine
Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -44,22 +44,13 @@ void computeEdgeLoops(const GFace *gf,
std
::
vector
<
int
>
&
indices
)
{
std
::
list
<
GEdge
*>
edges
=
gf
->
edges
();
Msg
(
INFO
,
"Number of Edges = %d"
,
edges
.
size
());
std
::
list
<
int
>
ori
=
gf
->
orientations
();
Msg
(
INFO
,
"Number of Orientations = %d"
,
ori
.
size
());
std
::
list
<
GEdge
*>::
iterator
it
=
edges
.
begin
();
std
::
list
<
int
>::
iterator
ito
=
ori
.
begin
();
indices
.
push_back
(
0
);
GVertex
*
start
=
((
*
ito
)
==
1
)
?
(
*
it
)
->
getBeginVertex
()
:
(
*
it
)
->
getEndVertex
();
GVertex
*
v_end
=
((
*
ito
)
!=
1
)
?
(
*
it
)
->
getBeginVertex
()
:
(
*
it
)
->
getEndVertex
();
Msg
(
INFO
,
"(%g,%g,%g) --- (%g,%g,%g)"
,
start
->
x
(),
start
->
y
(),
start
->
z
(),
v_end
->
x
(),
v_end
->
y
(),
v_end
->
z
());
Msg
(
INFO
,
"Mesh Size = (%d,%d)"
,
start
->
mesh_vertices
.
size
(),
v_end
->
mesh_vertices
.
size
());
Msg
(
INFO
,
"Edge Mesh Size = %d"
,(
*
it
)
->
mesh_vertices
.
size
());
all_mvertices
.
push_back
(
start
->
mesh_vertices
[
0
]);
if
(
*
ito
==
1
)
for
(
unsigned
int
i
=
0
;
i
<
(
*
it
)
->
mesh_vertices
.
size
();
i
++
)
...
...
@@ -72,7 +63,6 @@ void computeEdgeLoops(const GFace *gf,
while
(
1
){
++
it
;
++
ito
;
if
(
v_end
==
start
){
indices
.
push_back
(
all_mvertices
.
size
());
if
(
it
==
edges
.
end
())
break
;
...
...
@@ -80,11 +70,9 @@ void computeEdgeLoops(const GFace *gf,
v_end
=
((
*
ito
)
!=
1
)
?
(
*
it
)
->
getBeginVertex
()
:
(
*
it
)
->
getEndVertex
();
v_start
=
start
;
}
else
{
else
{
if
(
it
==
edges
.
end
())
throw
;
v_start
=
((
*
ito
)
==
1
)
?
(
*
it
)
->
getBeginVertex
()
:
(
*
it
)
->
getEndVertex
();
Msg
(
INFO
,
"(%g,%g,%g) --- (%g,%g,%g)"
,
v_start
->
x
(),
v_start
->
y
(),
v_start
->
z
(),
v_end
->
x
(),
v_end
->
y
(),
v_end
->
z
());
if
(
v_start
!=
v_end
)
throw
;
v_end
=
((
*
ito
)
!=
1
)
?
(
*
it
)
->
getBeginVertex
()
:
(
*
it
)
->
getEndVertex
();
}
...
...
@@ -659,8 +647,6 @@ bool gmsh2DMeshGenerator ( GFace *gf , bool debug = true)
v_container
::
iterator
itv
=
all_vertices
.
begin
();
Msg
(
INFO
,
"all_vertices size = %d"
,
all_vertices
.
size
());
// FILE *fdeb = fopen("debug.dat","w");
// fprintf(fdeb,"surface %d\n" ,gf->tag());
int
count
=
0
;
...
...
@@ -670,18 +656,15 @@ bool gmsh2DMeshGenerator ( GFace *gf , bool debug = true)
SPoint2
param
;
if
(
here
->
onWhat
()
->
dim
()
==
0
){
GVertex
*
gv
=
(
GVertex
*
)
here
->
onWhat
();
Msg
(
INFO
,
"gvEdgeSize = %d"
,
gv
->
edges
().
size
());
if
(
gv
->
edges
().
size
()
==
1
)
{
GEdge
*
ge
=
*
(
gv
->
edges
().
begin
());
Range
<
double
>
bb
=
ge
->
parBounds
(
0
);
param
=
ge
->
reparamOnFace
(
gf
,
bb
.
low
(),
1
);
}
else
{
Msg
(
INFO
,
"Before dyng here"
);
else
param
=
gv
->
reparamOnFace
(
gf
,
1
);
Msg
(
INFO
,
"param = (%g,%g)"
,
param
.
x
(),
param
.
y
());
}
}
else
if
(
here
->
onWhat
()
->
dim
()
==
1
){
GEdge
*
ge
=
(
GEdge
*
)
here
->
onWhat
();
...
...
@@ -742,9 +725,8 @@ bool gmsh2DMeshGenerator ( GFace *gf , bool debug = true)
}
/// Increase the size of the bounding box
bbox
*=
2.5
;
/// Increase the size of the bounding box by 20 %
bbox
*=
1.5
;
/// add 4 points than encloses the domain
/// Use negative number to distinguish thos fake vertices
MVertex
*
bb
[
4
];
...
...
@@ -774,15 +756,11 @@ bool gmsh2DMeshGenerator ( GFace *gf , bool debug = true)
m
->
scalingU
=
1
;
m
->
scalingV
=
1
;
Msg
(
INFO
,
"doc = %d"
,
doc
.
numPoints
);
for
(
int
i
=
0
;
i
<
doc
.
numPoints
;
i
++
)
{
MVertex
*
here
=
(
MVertex
*
)
doc
.
points
[
i
].
data
;
int
num
=
here
->
getNum
();
Msg
(
INFO
,
"num = %d"
,
num
);
double
U
,
V
;
// This test was missing in 2.0.0 and led to the seemingly
// random Windows/Mac slowdowns (we were passing random numbers
...
...
@@ -798,7 +776,7 @@ bool gmsh2DMeshGenerator ( GFace *gf , bool debug = true)
}
BDS_Point
*
pp
=
m
->
add_point
(
num
,
U
,
V
,
gf
);
//printf("here->onWhat = %p dim = %d\n",here->onWhat(),here->onWhat()->dim());
//
printf("here->onWhat = %p dim = %d\n",here->onWhat(),here->onWhat()->dim());
if
(
here
->
onWhat
()
->
dim
()
==
1
)
{
...
...
@@ -832,8 +810,6 @@ bool gmsh2DMeshGenerator ( GFace *gf , bool debug = true)
// and compute characteristic lenghts using mesh edge spacing
BDS_GeomEntity
CLASS_F
(
1
,
2
);
Msg
(
INFO
,
"came out 0"
);
it
=
edges
.
begin
();
while
(
it
!=
edges
.
end
())
...
...
@@ -874,7 +850,7 @@ bool gmsh2DMeshGenerator ( GFace *gf , bool debug = true)
++
ite
;
}
}
Msg
(
INFO
,
"came out 1"
);
it
=
emb_edges
.
begin
();
while
(
it
!=
emb_edges
.
end
())
...
...
@@ -920,8 +896,6 @@ bool gmsh2DMeshGenerator ( GFace *gf , bool debug = true)
m
->
del_point
(
m
->
find_point
(
-
3
));
m
->
del_point
(
m
->
find_point
(
-
4
));
Msg
(
INFO
,
"came out 2"
);
// start mesh generation
// if (CTX.mesh.algo2d == ALGO_2D_MESHADAPT)
{
...
...
@@ -941,8 +915,6 @@ bool gmsh2DMeshGenerator ( GFace *gf , bool debug = true)
// outputScalarField(m->triangles, name,0);
// fill the small gmsh structures
Msg
(
INFO
,
"came out 2.5"
);
{
std
::
set
<
BDS_Point
*
,
PointLessThan
>::
iterator
itp
=
m
->
points
.
begin
();
while
(
itp
!=
m
->
points
.
end
())
...
...
@@ -958,8 +930,6 @@ bool gmsh2DMeshGenerator ( GFace *gf , bool debug = true)
}
}
Msg
(
INFO
,
"came out 3"
);
{
std
::
list
<
BDS_Face
*>::
iterator
itt
=
m
->
triangles
.
begin
();
while
(
itt
!=
m
->
triangles
.
end
())
...
...
@@ -1007,8 +977,6 @@ bool gmsh2DMeshGenerator ( GFace *gf , bool debug = true)
delete
[]
U_
;
delete
[]
V_
;
Msg
(
INFO
,
"came out"
);
return
true
;
}
...
...
@@ -1556,8 +1524,7 @@ void deMeshGFace::operator() (GFace *gf)
}
void
meshGFace
::
operator
()
(
GFace
*
gf
)
{
Msg
(
INFO
,
"Meshing surface %d (%s)"
,
gf
->
tag
(),
gf
->
getTypeString
().
c_str
());
{
if
(
gf
->
geomType
()
==
GEntity
::
DiscreteSurface
)
return
;
if
(
gf
->
geomType
()
==
GEntity
::
BoundaryLayerSurface
)
return
;
if
(
gf
->
geomType
()
==
GEntity
::
ProjectionSurface
)
return
;
...
...
@@ -1580,8 +1547,6 @@ void meshGFace::operator() (GFace *gf)
// temp fix until we create MEdgeLoops in gmshFace
Msg
(
DEBUG1
,
"Generating the mesh"
);
Msg
(
INFO
,
"ISEMPT : %d %d"
,
gf
->
edgeLoops
.
empty
(),
gf
->
getNativeType
()
==
GEntity
::
GmshModel
);
if
(
gf
->
getNativeType
()
==
GEntity
::
GmshModel
||
gf
->
edgeLoops
.
empty
()){
gmsh2DMeshGenerator
(
gf
,
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