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
9844b363
Commit
9844b363
authored
20 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
Fix compilation bustage with older gcc versions + fix non-gsl compilation problem
parent
b0d4154c
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Common/AdaptiveViews.cpp
+9
-9
9 additions, 9 deletions
Common/AdaptiveViews.cpp
Common/GmshMatrix.h
+43
-35
43 additions, 35 deletions
Common/GmshMatrix.h
Common/Views.h
+3
-3
3 additions, 3 deletions
Common/Views.h
with
55 additions
and
47 deletions
Common/AdaptiveViews.cpp
+
9
−
9
View file @
9844b363
...
@@ -187,7 +187,7 @@ void Adaptive_Post_View:: zoomElement (Post_View * view ,
...
@@ -187,7 +187,7 @@ void Adaptive_Post_View:: zoomElement (Post_View * view ,
std
::
set
<
_point
>::
iterator
it
=
_point
::
all_points
.
begin
();
std
::
set
<
_point
>::
iterator
it
=
_point
::
all_points
.
begin
();
std
::
set
<
_point
>::
iterator
ite
=
_point
::
all_points
.
end
();
std
::
set
<
_point
>::
iterator
ite
=
_point
::
all_points
.
end
();
clock_t
c0
=
clock
();
double
c0
=
Cpu
();
const
int
N
=
_coefs
->
size1
();
const
int
N
=
_coefs
->
size1
();
Double_Vector
val
(
N
),
res
(
_point
::
all_points
.
size
());
Double_Vector
val
(
N
),
res
(
_point
::
all_points
.
size
());
...
@@ -208,7 +208,7 @@ void Adaptive_Post_View:: zoomElement (Post_View * view ,
...
@@ -208,7 +208,7 @@ void Adaptive_Post_View:: zoomElement (Post_View * view ,
_Interpolate
->
mult
(
val
,
res
);
_Interpolate
->
mult
(
val
,
res
);
_Geometry
->
mult
(
xyz
,
XYZ
);
_Geometry
->
mult
(
xyz
,
XYZ
);
clock_t
c1
=
clock
();
double
c1
=
Cpu
();
int
kk
=
0
;
int
kk
=
0
;
for
(
;
it
!=
ite
;
++
it
)
for
(
;
it
!=
ite
;
++
it
)
...
@@ -232,7 +232,7 @@ void Adaptive_Post_View:: zoomElement (Post_View * view ,
...
@@ -232,7 +232,7 @@ void Adaptive_Post_View:: zoomElement (Post_View * view ,
kk
++
;
kk
++
;
}
}
clock_t
c2
=
clock
();
double
c2
=
Cpu
();
std
::
list
<
_triangle
*>::
iterator
itt
=
_triangle
::
all_triangles
.
begin
();
std
::
list
<
_triangle
*>::
iterator
itt
=
_triangle
::
all_triangles
.
begin
();
std
::
list
<
_triangle
*>::
iterator
itte
=
_triangle
::
all_triangles
.
end
();
std
::
list
<
_triangle
*>::
iterator
itte
=
_triangle
::
all_triangles
.
end
();
...
@@ -248,7 +248,7 @@ void Adaptive_Post_View:: zoomElement (Post_View * view ,
...
@@ -248,7 +248,7 @@ void Adaptive_Post_View:: zoomElement (Post_View * view ,
else
else
_triangle
::
Error
(
max
-
min
,
tol
);
_triangle
::
Error
(
max
-
min
,
tol
);
clock_t
c3
=
clock
();
double
c3
=
Cpu
();
itt
=
_triangle
::
all_triangles
.
begin
();
itt
=
_triangle
::
all_triangles
.
begin
();
for
(
;
itt
!=
itte
;
itt
++
)
for
(
;
itt
!=
itte
;
itt
++
)
{
{
...
@@ -272,12 +272,12 @@ void Adaptive_Post_View:: zoomElement (Post_View * view ,
...
@@ -272,12 +272,12 @@ void Adaptive_Post_View:: zoomElement (Post_View * view ,
view
->
NbST
++
;
view
->
NbST
++
;
}
}
}
}
clock_t
c4
=
clock
();
double
c4
=
Cpu
();
t0
+=
(
double
)(
c1
-
c0
)
/
CLOCKS_PER_SEC
;
t0
+=
c1
-
c0
;
t1
+=
(
double
)(
c2
-
c1
)
/
CLOCKS_PER_SEC
;
t1
+=
c2
-
c1
;
t2
+=
(
double
)(
c3
-
c2
)
/
CLOCKS_PER_SEC
;
t2
+=
c3
-
c2
;
t3
+=
(
double
)(
c4
-
c3
)
/
CLOCKS_PER_SEC
;
t3
+=
c4
-
c3
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Common/GmshMatrix.h
+
43
−
35
View file @
9844b363
...
@@ -2,89 +2,97 @@
...
@@ -2,89 +2,97 @@
#define _GMSH_BOOSTMATRIX_
#define _GMSH_BOOSTMATRIX_
template
<
class
SCALAR
>
template
<
class
SCALAR
>
class
Gmsh_
Matrix
class
Gmsh_
Vector
{
{
private:
private:
int
r
,
c
;
int
r
;
public:
public:
inline
int
size1
()
const
{
return
r
;}
inline
int
size
()
const
{
return
r
;}
inline
int
size2
()
const
{
return
c
;}
SCALAR
*
data
;
SCALAR
*
data
;
~
Gmsh_
Matrix
()
{
delete
[]
data
;}
~
Gmsh_
Vector
()
{
delete
[]
data
;}
Gmsh_
Matrix
(
int
R
,
int
C
)
Gmsh_
Vector
(
int
R
)
:
r
(
R
)
,
c
(
C
)
:
r
(
R
)
{
{
data
=
new
SCALAR
[
r
*
c
];
data
=
new
SCALAR
[
r
];
scal
(
0
);
scal
(
0
);
}
}
Gmsh_
Matrix
(
const
Gmsh_
Matrix
<
SCALAR
>
&
other
)
Gmsh_
Vector
(
const
Gmsh_
Vector
<
SCALAR
>
&
other
)
:
r
(
other
.
r
)
,
c
(
other
.
c
)
:
r
(
other
.
r
)
{
{
data
=
new
double
[
r
*
c
];
data
=
new
double
[
r
];
copy
(
other
.
data
)
;
copy
(
other
.
data
)
;
}
}
inline
SCALAR
operator
()
(
int
i
,
int
j
)
const
inline
SCALAR
operator
()
(
int
i
)
const
{
{
return
data
[
i
+
r
*
j
];
return
data
[
i
];
}
}
inline
SCALAR
&
operator
()
(
int
i
,
int
j
)
inline
SCALAR
&
operator
()
(
int
i
)
{
{
return
data
[
i
+
r
*
j
];
return
data
[
i
];
}
}
inline
Gmsh_Matrix
operator
*
(
const
Gmsh_
Matrix
<
SCALAR
>
&
other
)
inline
SCALAR
operator
*
(
const
Gmsh_
Vector
<
SCALAR
>
&
other
)
{
{
throw
;
throw
;
}
}
inline
void
scal
(
const
SCALAR
s
)
inline
void
scal
(
const
SCALAR
s
)
{
{
for
(
int
i
=
0
;
i
<
r
*
c
;
++
i
)
data
[
i
]
*=
s
;
for
(
int
i
=
0
;
i
<
r
;
++
i
)
data
[
i
]
*=
s
;
}
}
inline
void
copy
(
const
SCALAR
**
other
)
inline
void
copy
(
const
SCALAR
**
other
)
{
{
for
(
int
i
=
0
;
i
<
r
*
c
;
++
i
)
data
[
i
]
=
other
.
data
[
i
];
for
(
int
i
=
0
;
i
<
r
;
++
i
)
data
[
i
]
=
other
.
data
[
i
];
}
}
};
};
template
<
class
SCALAR
>
template
<
class
SCALAR
>
class
Gmsh_
Vector
class
Gmsh_
Matrix
{
{
private:
private:
int
r
;
int
r
,
c
;
public:
public:
inline
int
size
()
const
{
return
r
;}
inline
int
size1
()
const
{
return
r
;}
inline
int
size2
()
const
{
return
c
;}
SCALAR
*
data
;
SCALAR
*
data
;
~
Gmsh_
Vector
()
{
delete
[]
data
;}
~
Gmsh_
Matrix
()
{
delete
[]
data
;}
Gmsh_
Vector
(
int
R
)
Gmsh_
Matrix
(
int
R
,
int
C
)
:
r
(
R
)
:
r
(
R
)
,
c
(
C
)
{
{
data
=
new
SCALAR
[
r
];
data
=
new
SCALAR
[
r
*
c
];
scal
(
0
);
scal
(
0
);
}
}
Gmsh_
Vector
(
const
Gmsh_
Vector
<
SCALAR
>
&
other
)
Gmsh_
Matrix
(
const
Gmsh_
Matrix
<
SCALAR
>
&
other
)
:
r
(
other
.
r
)
:
r
(
other
.
r
)
,
c
(
other
.
c
)
{
{
data
=
new
double
[
r
];
data
=
new
double
[
r
*
c
];
copy
(
other
.
data
)
;
copy
(
other
.
data
)
;
}
}
inline
SCALAR
operator
()
(
int
i
)
const
inline
SCALAR
operator
()
(
int
i
,
int
j
)
const
{
{
return
data
[
i
];
return
data
[
i
+
r
*
j
];
}
}
inline
SCALAR
&
operator
()
(
int
i
)
inline
SCALAR
&
operator
()
(
int
i
,
int
j
)
{
{
return
data
[
i
];
return
data
[
i
+
r
*
j
];
}
}
inline
SCALAR
operator
*
(
const
Gmsh_
Vector
<
SCALAR
>
&
other
)
inline
Gmsh_Matrix
operator
*
(
const
Gmsh_
Matrix
<
SCALAR
>
&
other
)
{
{
throw
;
throw
;
}
}
inline
void
scal
(
const
SCALAR
s
)
inline
void
scal
(
const
SCALAR
s
)
{
{
for
(
int
i
=
0
;
i
<
r
;
++
i
)
data
[
i
]
*=
s
;
for
(
int
i
=
0
;
i
<
r
*
c
;
++
i
)
data
[
i
]
*=
s
;
}
}
inline
void
copy
(
const
SCALAR
**
other
)
inline
void
copy
(
const
SCALAR
**
other
)
{
{
for
(
int
i
=
0
;
i
<
r
;
++
i
)
data
[
i
]
=
other
.
data
[
i
];
for
(
int
i
=
0
;
i
<
r
*
c
;
++
i
)
data
[
i
]
=
other
.
data
[
i
];
}
inline
void
mult
(
const
Gmsh_Matrix
<
SCALAR
>
&
x
,
const
Gmsh_Matrix
<
SCALAR
>
&
b
)
{
throw
;
}
inline
void
mult
(
const
Gmsh_Vector
<
SCALAR
>
&
x
,
Gmsh_Vector
<
SCALAR
>
&
b
)
{
throw
;
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
Common/Views.h
+
3
−
3
View file @
9844b363
...
@@ -25,7 +25,8 @@
...
@@ -25,7 +25,8 @@
#include
"VertexArray.h"
#include
"VertexArray.h"
#include
"SmoothNormals.h"
#include
"SmoothNormals.h"
#include
"GmshMatrix.h"
#include
"GmshMatrix.h"
#include
<list>
#include
<list>
#define VIEW_NB_ELEMENT_TYPES (8*3)
#define VIEW_NB_ELEMENT_TYPES (8*3)
#define VIEW_MAX_ELEMENT_NODES 8
#define VIEW_MAX_ELEMENT_NODES 8
#define VAL_INF 1.e200
#define VAL_INF 1.e200
...
@@ -77,8 +78,7 @@ public:
...
@@ -77,8 +78,7 @@ public:
inline
double
V
()
const
inline
double
V
()
const
{
{
static
const
double
THIRD
=
1.
/
3.
;
return
(
p
[
0
]
->
val
+
p
[
1
]
->
val
+
p
[
2
]
->
val
)
/
3.
;
return
(
p
[
0
]
->
val
+
p
[
1
]
->
val
+
p
[
2
]
->
val
)
*
THIRD
;
}
}
void
print
()
void
print
()
{
{
...
...
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