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
e1fe26aa
Commit
e1fe26aa
authored
18 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
reduce POINT memory footprint (remove all unused stuff!)
parent
bb929483
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Mesh/DivideAndConquer.cpp
+5
-18
5 additions, 18 deletions
Mesh/DivideAndConquer.cpp
Mesh/DivideAndConquer.h
+0
-24
0 additions, 24 deletions
Mesh/DivideAndConquer.h
with
5 additions
and
42 deletions
Mesh/DivideAndConquer.cpp
+
5
−
18
View file @
e1fe26aa
// $Id: DivideAndConquer.cpp,v 1.
2
2006-11-25
16:52:44
geuzaine Exp $
// $Id: DivideAndConquer.cpp,v 1.
3
2006-11-25
21:33:25
geuzaine Exp $
//
//
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -55,16 +55,6 @@ static PointRecord *pPointArray;
...
@@ -55,16 +55,6 @@ static PointRecord *pPointArray;
int
Insert
(
PointNumero
a
,
PointNumero
b
);
int
Insert
(
PointNumero
a
,
PointNumero
b
);
int
Delete
(
PointNumero
a
,
PointNumero
b
);
int
Delete
(
PointNumero
a
,
PointNumero
b
);
void
PushgPointArray
(
PointRecord
*
ptr
)
{
pPointArray
=
ptr
;
}
PointRecord
*
PopgPointArray
(
void
)
{
return
pPointArray
;
}
PointNumero
Predecessor
(
PointNumero
a
,
PointNumero
b
)
PointNumero
Predecessor
(
PointNumero
a
,
PointNumero
b
)
{
{
DListPeek
p
=
pPointArray
[
a
].
adjacent
;
DListPeek
p
=
pPointArray
[
a
].
adjacent
;
...
@@ -119,13 +109,12 @@ PointNumero First(PointNumero x)
...
@@ -119,13 +109,12 @@ PointNumero First(PointNumero x)
return
(
pPointArray
[
x
].
adjacent
)
->
point_num
;
return
(
pPointArray
[
x
].
adjacent
)
->
point_num
;
}
}
// we use robust predicates here
int
Is_left_of
(
PointNumero
x
,
PointNumero
y
,
PointNumero
check
)
int
Is_left_of
(
PointNumero
x
,
PointNumero
y
,
PointNumero
check
)
{
{
double
pa
[
2
]
=
{(
double
)
pPointArray
[
x
].
where
.
h
,
(
double
)
pPointArray
[
x
].
where
.
v
};
double
pa
[
2
]
=
{(
double
)
pPointArray
[
x
].
where
.
h
,
(
double
)
pPointArray
[
x
].
where
.
v
};
double
pb
[
2
]
=
{(
double
)
pPointArray
[
y
].
where
.
h
,
(
double
)
pPointArray
[
y
].
where
.
v
};
double
pb
[
2
]
=
{(
double
)
pPointArray
[
y
].
where
.
h
,
(
double
)
pPointArray
[
y
].
where
.
v
};
double
pc
[
2
]
=
{(
double
)
pPointArray
[
check
].
where
.
h
,
(
double
)
pPointArray
[
check
].
where
.
v
};
double
pc
[
2
]
=
{(
double
)
pPointArray
[
check
].
where
.
h
,
(
double
)
pPointArray
[
check
].
where
.
v
};
// we use robust predicates here
double
result
=
gmsh
::
orient2d
(
pa
,
pb
,
pc
);
double
result
=
gmsh
::
orient2d
(
pa
,
pb
,
pc
);
return
result
>
0
;
return
result
>
0
;
}
}
...
@@ -207,6 +196,7 @@ int Qtest(PointNumero h, PointNumero i, PointNumero j, PointNumero k)
...
@@ -207,6 +196,7 @@ int Qtest(PointNumero h, PointNumero i, PointNumero j, PointNumero k)
double
pc
[
2
]
=
{(
double
)
pPointArray
[
j
].
where
.
h
,
(
double
)
pPointArray
[
j
].
where
.
v
};
double
pc
[
2
]
=
{(
double
)
pPointArray
[
j
].
where
.
h
,
(
double
)
pPointArray
[
j
].
where
.
v
};
double
pd
[
2
]
=
{(
double
)
pPointArray
[
k
].
where
.
h
,
(
double
)
pPointArray
[
k
].
where
.
v
};
double
pd
[
2
]
=
{(
double
)
pPointArray
[
k
].
where
.
h
,
(
double
)
pPointArray
[
k
].
where
.
v
};
// we use robust predicates here
double
result
=
gmsh
::
incircle
(
pa
,
pb
,
pc
,
pd
)
*
gmsh
::
orient2d
(
pa
,
pb
,
pc
);
double
result
=
gmsh
::
incircle
(
pa
,
pb
,
pc
,
pd
)
*
gmsh
::
orient2d
(
pa
,
pb
,
pc
);
return
(
result
<
0
)
?
1
:
0
;
return
(
result
<
0
)
?
1
:
0
;
...
@@ -361,7 +351,7 @@ int comparePoints(const void *i, const void *j)
...
@@ -361,7 +351,7 @@ int comparePoints(const void *i, const void *j)
for a window. All error handling is done here. */
for a window. All error handling is done here. */
int
DelaunayAndVoronoi
(
DocPeek
doc
)
int
DelaunayAndVoronoi
(
DocPeek
doc
)
{
{
Pushg
PointArray
(
doc
->
points
)
;
p
PointArray
=
doc
->
points
;
if
(
doc
->
numPoints
<
2
)
if
(
doc
->
numPoints
<
2
)
return
1
;
return
1
;
...
@@ -474,8 +464,6 @@ int Insert(PointNumero a, PointNumero b)
...
@@ -474,8 +464,6 @@ int Insert(PointNumero a, PointNumero b)
return
rslt
;
return
rslt
;
}
}
int
DListDelete
(
DListPeek
*
dlist
,
PointNumero
oldPoint
)
int
DListDelete
(
DListPeek
*
dlist
,
PointNumero
oldPoint
)
{
{
DListPeek
p
;
DListPeek
p
;
...
@@ -508,7 +496,6 @@ int DListDelete(DListPeek * dlist, PointNumero oldPoint)
...
@@ -508,7 +496,6 @@ int DListDelete(DListPeek * dlist, PointNumero oldPoint)
return
0
;
return
0
;
}
}
/* This routine removes the point 'a' in the adjency list of 'b' and
/* This routine removes the point 'a' in the adjency list of 'b' and
the point 'b' in the adjency list of 'a'. */
the point 'b' in the adjency list of 'a'. */
...
...
This diff is collapsed.
Click to expand it.
Mesh/DivideAndConquer.h
+
0
−
24
View file @
e1fe26aa
...
@@ -21,10 +21,8 @@
...
@@ -21,10 +21,8 @@
// Please report all bugs and problems to <gmsh@geuz.org>.
// Please report all bugs and problems to <gmsh@geuz.org>.
typedef
struct
_POINT
PointRecord
,
*
PointPeek
;
typedef
struct
_POINT
PointRecord
,
*
PointPeek
;
typedef
struct
_CONTOUR
ContourRecord
,
*
ContourPeek
;
typedef
struct
_DOC
DocRecord
,
*
DocPeek
;
typedef
struct
_DOC
DocRecord
,
*
DocPeek
;
typedef
struct
_CDLIST
DListRecord
,
*
DListPeek
;
typedef
struct
_CDLIST
DListRecord
,
*
DListPeek
;
typedef
struct
_MAILLAGE
maillage
,
*
maipeek
;
typedef
struct
_DELAUNAY
Delaunay
,
*
delpeek
;
typedef
struct
_DELAUNAY
Delaunay
,
*
delpeek
;
typedef
int
PointNumero
;
typedef
int
PointNumero
;
...
@@ -43,7 +41,6 @@ typedef struct{
...
@@ -43,7 +41,6 @@ typedef struct{
struct
_POINT
{
struct
_POINT
{
MPoint
where
;
MPoint
where
;
DListPeek
adjacent
;
DListPeek
adjacent
;
int
initial
,
permu
,
numcontour
;
double
quality
;
double
quality
;
void
*
data
;
void
*
data
;
};
};
...
@@ -64,13 +61,6 @@ typedef struct{
...
@@ -64,13 +61,6 @@ typedef struct{
int
t_length
,
info_length
;
int
t_length
,
info_length
;
}
Striangle
;
}
Striangle
;
typedef
struct
{
PointNumero
from
;
PointNumero
to
;
int
num
;
int
seg
;
}
edge
;
typedef
struct
{
typedef
struct
{
PointNumero
begin
;
PointNumero
begin
;
PointNumero
end
;
PointNumero
end
;
...
@@ -97,20 +87,6 @@ struct _DELAUNAY{
...
@@ -97,20 +87,6 @@ struct _DELAUNAY{
Voronoi
v
;
Voronoi
v
;
};
};
struct
_CONTOUR
{
PointRecord
*
oriented_points
;
MPoint
*
perturbations
;
int
numpoints
,
numerocontour
,
numerozon
,
info
;
};
struct
_MAILLAGE
{
PointRecord
*
points
;
delpeek
*
listdel
;
edge
*
listedges
;
int
numedges
,
numtriangles
,
numpoints
;
int
zone
;
};
void
Make_Mesh_With_Points
(
DocRecord
*
ptr
,
PointRecord
*
Liste
,
int
Numpoints
);
void
Make_Mesh_With_Points
(
DocRecord
*
ptr
,
PointRecord
*
Liste
,
int
Numpoints
);
#endif
#endif
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