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
89317b9c
Commit
89317b9c
authored
9 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
draw serendip pyramids as linear ones for now
parent
05d79704
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Geo/MPyramid.cpp
+11
-4
11 additions, 4 deletions
Geo/MPyramid.cpp
Geo/MPyramid.h
+16
-12
16 additions, 12 deletions
Geo/MPyramid.h
Numeric/pyramidalBasis.h
+1
-6
1 addition, 6 deletions
Numeric/pyramidalBasis.h
with
28 additions
and
22 deletions
Geo/MPyramid.cpp
+
11
−
4
View file @
89317b9c
...
...
@@ -37,13 +37,16 @@ MPyramidN::~MPyramidN() {}
int
MPyramidN
::
getNumEdgesRep
(
bool
curved
)
{
return
curved
?
8
*
CTX
::
instance
()
->
mesh
.
numSubEdges
:
8
;
// FIXME: remove !getIsAssimilatedSerendipity() when serendip are implemented
return
(
curved
&&
!
getIsAssimilatedSerendipity
())
?
8
*
CTX
::
instance
()
->
mesh
.
numSubEdges
:
8
;
}
void
MPyramidN
::
getEdgeRep
(
bool
curved
,
int
num
,
double
*
x
,
double
*
y
,
double
*
z
,
SVector3
*
n
)
{
if
(
curved
)
{
// FIXME: remove !getIsAssimilatedSerendipity() when serendip are implemented
if
(
curved
&&
!
getIsAssimilatedSerendipity
())
{
int
numSubEdges
=
CTX
::
instance
()
->
mesh
.
numSubEdges
;
static
double
pp
[
5
][
3
]
=
{{
-
1
,
-
1
,
0
},{
1
,
-
1
,
0
},{
1
,
1
,
0
},{
-
1
,
1
,
0
},{
0
,
0
,
1
}};
static
int
ed
[
8
][
2
]
=
{{
0
,
1
},{
0
,
3
},{
0
,
4
},{
1
,
2
},{
1
,
4
},{
2
,
3
},{
2
,
4
},{
3
,
4
}};
...
...
@@ -79,7 +82,9 @@ void MPyramidN::getEdgeRep(bool curved, int num,
int
MPyramidN
::
getNumFacesRep
(
bool
curved
)
{
return
curved
?
6
*
gmsh_SQU
(
CTX
::
instance
()
->
mesh
.
numSubEdges
)
:
6
;
// FIXME: remove !getIsAssimilatedSerendipity() when serendip are implemented
return
(
curved
&&
!
getIsAssimilatedSerendipity
())
?
6
*
gmsh_SQU
(
CTX
::
instance
()
->
mesh
.
numSubEdges
)
:
6
;
}
static
void
_myGetFaceRep
(
MPyramid
*
pyr
,
int
num
,
double
*
x
,
double
*
y
,
double
*
z
,
...
...
@@ -321,6 +326,8 @@ static void _myGetFaceRep(MPyramid *pyr, int num, double *x, double *y, double *
void
MPyramidN
::
getFaceRep
(
bool
curved
,
int
num
,
double
*
x
,
double
*
y
,
double
*
z
,
SVector3
*
n
)
{
if
(
curved
)
_myGetFaceRep
(
this
,
num
,
x
,
y
,
z
,
n
,
CTX
::
instance
()
->
mesh
.
numSubEdges
);
// FIXME: remove !getIsAssimilatedSerendipity() when serendip are implemented
if
(
curved
&&
!
getIsAssimilatedSerendipity
())
_myGetFaceRep
(
this
,
num
,
x
,
y
,
z
,
n
,
CTX
::
instance
()
->
mesh
.
numSubEdges
);
else
MPyramid
::
getFaceRep
(
false
,
num
,
x
,
y
,
z
,
n
);
}
This diff is collapsed.
Click to expand it.
Geo/MPyramid.h
+
16
−
12
View file @
89317b9c
...
...
@@ -75,7 +75,8 @@ class MPyramid : public MElement {
return
MEdge
(
_v
[
edges_pyramid
(
num
,
0
)],
_v
[
edges_pyramid
(
num
,
1
)]);
}
virtual
int
getNumEdgesRep
(
bool
curved
){
return
8
;
}
virtual
void
getEdgeRep
(
bool
curved
,
int
num
,
double
*
x
,
double
*
y
,
double
*
z
,
SVector3
*
n
)
virtual
void
getEdgeRep
(
bool
curved
,
int
num
,
double
*
x
,
double
*
y
,
double
*
z
,
SVector3
*
n
)
{
static
const
int
f
[
8
]
=
{
0
,
1
,
1
,
2
,
0
,
3
,
2
,
3
};
MEdge
e
(
getEdge
(
num
));
...
...
@@ -97,7 +98,8 @@ class MPyramid : public MElement {
return
MFace
(
_v
[
0
],
_v
[
3
],
_v
[
2
],
_v
[
1
]);
}
virtual
int
getNumFacesRep
(
bool
curved
){
return
6
;
}
virtual
void
getFaceRep
(
bool
curved
,
int
num
,
double
*
x
,
double
*
y
,
double
*
z
,
SVector3
*
n
)
virtual
void
getFaceRep
(
bool
curved
,
int
num
,
double
*
x
,
double
*
y
,
double
*
z
,
SVector3
*
n
)
{
static
const
int
f
[
6
][
3
]
=
{
{
0
,
1
,
4
},
...
...
@@ -230,7 +232,6 @@ class MPyramidN : public MPyramid {
for
(
unsigned
int
i
=
0
;
i
<
_vs
.
size
();
i
++
)
_vs
[
i
]
->
setPolynomialOrder
(
_order
);
getFunctionSpace
(
order
);
}
MPyramidN
(
const
std
::
vector
<
MVertex
*>
&
v
,
char
order
,
int
num
=
0
,
int
part
=
0
)
:
MPyramid
(
v
[
0
],
v
[
1
],
v
[
2
],
v
[
3
],
v
[
4
],
num
,
part
),
_order
(
order
)
{
...
...
@@ -238,13 +239,14 @@ class MPyramidN : public MPyramid {
for
(
unsigned
int
i
=
0
;
i
<
_vs
.
size
();
i
++
)
_vs
[
i
]
->
setPolynomialOrder
(
_order
);
getFunctionSpace
(
order
);
}
~
MPyramidN
();
virtual
int
getPolynomialOrder
()
const
{
return
_order
;
}
virtual
int
getNumVertices
()
const
{
return
5
+
_vs
.
size
();
}
virtual
MVertex
*
getVertex
(
int
num
){
return
num
<
5
?
_v
[
num
]
:
_vs
[
num
-
5
];
}
virtual
const
MVertex
*
getVertex
(
int
num
)
const
{
return
num
<
5
?
_v
[
num
]
:
_vs
[
num
-
5
];
}
virtual
const
MVertex
*
getVertex
(
int
num
)
const
{
return
num
<
5
?
_v
[
num
]
:
_vs
[
num
-
5
];
}
virtual
int
getNumEdgeVertices
()
const
{
return
8
*
(
_order
-
1
);
}
virtual
int
getNumFaceVertices
()
const
{
...
...
@@ -319,20 +321,22 @@ class MPyramidN : public MPyramid {
}
virtual
void
reverse
()
{
/* MVertex *tmp;
/*
MVertex *tmp;
tmp = _v[1]; _v[1] = _v[2]; _v[2] = tmp;
std::vector<MVertex*> inv(_vs.size());
std::vector<int> reverseIndices = _getReverseIndices(_order);
for (unsigned int i = 0; i< _vs.size(); i++)
inv[i] = _vs[reverseIndices[i + 4] - 4];
_vs = inv;
*/
_vs = inv;
*/
Msg
::
Error
(
"Reverse not implemented yet for MPyramidN"
);
}
virtual
void
getEdgeRep
(
bool
curved
,
int
num
,
double
*
x
,
double
*
y
,
double
*
z
,
SVector3
*
n
);
virtual
void
getEdgeRep
(
bool
curved
,
int
num
,
double
*
x
,
double
*
y
,
double
*
z
,
SVector3
*
n
);
virtual
int
getNumEdgesRep
(
bool
curved
);
virtual
void
getFaceRep
(
bool
curved
,
int
num
,
double
*
x
,
double
*
y
,
double
*
z
,
SVector3
*
n
);
virtual
void
getFaceRep
(
bool
curved
,
int
num
,
double
*
x
,
double
*
y
,
double
*
z
,
SVector3
*
n
);
virtual
int
getNumFacesRep
(
bool
curved
);
virtual
void
getNode
(
int
num
,
double
&
u
,
double
&
v
,
double
&
w
)
const
{
...
...
This diff is collapsed.
Click to expand it.
Numeric/pyramidalBasis.h
+
1
−
6
View file @
89317b9c
...
...
@@ -7,12 +7,9 @@
#define PYRAMIDALBASIS_H
#include
"fullMatrix.h"
#include
"nodalBasis.h"
#include
"BergotBasis.h"
class
pyramidalBasis
:
public
nodalBasis
{
private:
...
...
@@ -37,6 +34,4 @@ class pyramidalBasis: public nodalBasis
virtual
int
getNumShapeFunctions
()
const
;
};
#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