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
05d79704
Commit
05d79704
authored
9 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
don't crash of we try to display serendipity pyramids
parent
14940753
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
Geo/GModelVertexArrays.cpp
+6
-4
6 additions, 4 deletions
Geo/GModelVertexArrays.cpp
Numeric/pyramidalBasis.cpp
+7
-19
7 additions, 19 deletions
Numeric/pyramidalBasis.cpp
with
13 additions
and
23 deletions
Geo/GModelVertexArrays.cpp
+
6
−
4
View file @
05d79704
...
@@ -355,7 +355,8 @@ class initMeshGRegion {
...
@@ -355,7 +355,8 @@ class initMeshGRegion {
for
(
unsigned
int
i
=
0
;
i
<
r
->
polyhedra
.
size
();
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
r
->
polyhedra
.
size
();
i
++
)
numLP
+=
2
*
r
->
polyhedra
[
i
]
->
getNumEdges
();
numLP
+=
2
*
r
->
polyhedra
[
i
]
->
getNumEdges
();
num
+=
(
12
*
r
->
tetrahedra
.
size
()
+
24
*
r
->
hexahedra
.
size
()
+
num
+=
(
12
*
r
->
tetrahedra
.
size
()
+
24
*
r
->
hexahedra
.
size
()
+
18
*
r
->
prisms
.
size
()
+
16
*
r
->
pyramids
.
size
()
+
10
*
r
->
trihedra
.
size
()
+
numLP
)
/
4
;
18
*
r
->
prisms
.
size
()
+
16
*
r
->
pyramids
.
size
()
+
10
*
r
->
trihedra
.
size
()
+
numLP
)
/
4
;
num
=
_estimateIfClipped
(
num
);
num
=
_estimateIfClipped
(
num
);
if
(
CTX
::
instance
()
->
mesh
.
explode
!=
1.
)
num
*=
4
;
if
(
CTX
::
instance
()
->
mesh
.
explode
!=
1.
)
num
*=
4
;
if
(
_curved
)
num
*=
2
;
if
(
_curved
)
num
*=
2
;
...
@@ -370,7 +371,8 @@ class initMeshGRegion {
...
@@ -370,7 +371,8 @@ class initMeshGRegion {
for
(
unsigned
int
i
=
0
;
i
<
r
->
polyhedra
.
size
();
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
r
->
polyhedra
.
size
();
i
++
)
numFP
+=
r
->
polyhedra
[
i
]
->
getNumFaces
();
numFP
+=
r
->
polyhedra
[
i
]
->
getNumFaces
();
num
+=
(
4
*
r
->
tetrahedra
.
size
()
+
12
*
r
->
hexahedra
.
size
()
+
num
+=
(
4
*
r
->
tetrahedra
.
size
()
+
12
*
r
->
hexahedra
.
size
()
+
8
*
r
->
prisms
.
size
()
+
6
*
r
->
pyramids
.
size
()
+
4
*
r
->
trihedra
.
size
()
+
numFP
)
/
2
;
8
*
r
->
prisms
.
size
()
+
6
*
r
->
pyramids
.
size
()
+
4
*
r
->
trihedra
.
size
()
+
numFP
)
/
2
;
num
=
_estimateIfClipped
(
num
);
num
=
_estimateIfClipped
(
num
);
if
(
CTX
::
instance
()
->
mesh
.
explode
!=
1.
)
num
*=
2
;
if
(
CTX
::
instance
()
->
mesh
.
explode
!=
1.
)
num
*=
2
;
if
(
_curved
)
num
*=
4
;
if
(
_curved
)
num
*=
4
;
...
...
This diff is collapsed.
Click to expand it.
Numeric/pyramidalBasis.cpp
+
7
−
19
View file @
05d79704
...
@@ -8,10 +8,10 @@
...
@@ -8,10 +8,10 @@
#include
"pyramidalBasis.h"
#include
"pyramidalBasis.h"
#include
"pointsGenerators.h"
#include
"pointsGenerators.h"
pyramidalBasis
::
pyramidalBasis
(
int
tag
)
:
nodalBasis
(
tag
)
pyramidalBasis
::
pyramidalBasis
(
int
tag
)
:
nodalBasis
(
tag
)
,
bergot
(
0
)
{
{
if
(
serendip
)
{
if
(
serendip
)
{
Msg
::
Error
(
"Serendipity
P
yramid not implemented"
);
Msg
::
Warning
(
"Serendipity
p
yramid not implemented
yet
"
);
return
;
return
;
}
}
...
@@ -56,21 +56,16 @@ pyramidalBasis::pyramidalBasis(int tag) : nodalBasis(tag)
...
@@ -56,21 +56,16 @@ pyramidalBasis::pyramidalBasis(int tag) : nodalBasis(tag)
delete
[]
fval
;
delete
[]
fval
;
}
}
pyramidalBasis
::~
pyramidalBasis
()
pyramidalBasis
::~
pyramidalBasis
()
{
{
delete
bergot
;
if
(
bergot
)
delete
bergot
;
}
}
int
pyramidalBasis
::
getNumShapeFunctions
()
const
{
return
points
.
size1
();
}
int
pyramidalBasis
::
getNumShapeFunctions
()
const
{
return
points
.
size1
();
}
void
pyramidalBasis
::
f
(
double
u
,
double
v
,
double
w
,
double
*
val
)
const
void
pyramidalBasis
::
f
(
double
u
,
double
v
,
double
w
,
double
*
val
)
const
{
{
if
(
!
bergot
)
return
;
const
int
N
=
bergot
->
size
();
const
int
N
=
bergot
->
size
();
...
@@ -83,13 +78,11 @@ void pyramidalBasis::f(double u, double v, double w, double *val) const
...
@@ -83,13 +78,11 @@ void pyramidalBasis::f(double u, double v, double w, double *val) const
}
}
delete
[]
fval
;
delete
[]
fval
;
}
}
void
pyramidalBasis
::
f
(
const
fullMatrix
<
double
>
&
coord
,
fullMatrix
<
double
>
&
sf
)
const
void
pyramidalBasis
::
f
(
const
fullMatrix
<
double
>
&
coord
,
fullMatrix
<
double
>
&
sf
)
const
{
{
if
(
!
bergot
)
return
;
const
int
N
=
bergot
->
size
(),
NPts
=
coord
.
size1
();
const
int
N
=
bergot
->
size
(),
NPts
=
coord
.
size1
();
...
@@ -105,13 +98,11 @@ void pyramidalBasis::f(const fullMatrix<double> &coord, fullMatrix<double> &sf)
...
@@ -105,13 +98,11 @@ void pyramidalBasis::f(const fullMatrix<double> &coord, fullMatrix<double> &sf)
}
}
delete
[]
fval
;
delete
[]
fval
;
}
}
void
pyramidalBasis
::
df
(
double
u
,
double
v
,
double
w
,
double
grads
[][
3
])
const
void
pyramidalBasis
::
df
(
double
u
,
double
v
,
double
w
,
double
grads
[][
3
])
const
{
{
if
(
!
bergot
)
return
;
const
int
N
=
bergot
->
size
();
const
int
N
=
bergot
->
size
();
...
@@ -128,13 +119,11 @@ void pyramidalBasis::df(double u, double v, double w, double grads[][3]) const
...
@@ -128,13 +119,11 @@ void pyramidalBasis::df(double u, double v, double w, double grads[][3]) const
}
}
delete
[]
dfval
;
delete
[]
dfval
;
}
}
void
pyramidalBasis
::
df
(
const
fullMatrix
<
double
>
&
coord
,
fullMatrix
<
double
>
&
dfm
)
const
void
pyramidalBasis
::
df
(
const
fullMatrix
<
double
>
&
coord
,
fullMatrix
<
double
>
&
dfm
)
const
{
{
if
(
!
bergot
)
return
;
const
int
N
=
bergot
->
size
(),
NPts
=
coord
.
size1
();
const
int
N
=
bergot
->
size
(),
NPts
=
coord
.
size1
();
...
@@ -151,5 +140,4 @@ void pyramidalBasis::df(const fullMatrix<double> &coord, fullMatrix<double> &dfm
...
@@ -151,5 +140,4 @@ void pyramidalBasis::df(const fullMatrix<double> &coord, fullMatrix<double> &dfm
}
}
delete
[]
dfv
;
delete
[]
dfv
;
}
}
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