Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minimal quadratic quadratic prism shape #362

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion apf/apfShape.cc
Original file line number Diff line number Diff line change
Expand Up @@ -522,20 +522,42 @@ class QuadraticBase : public FieldShape
}
int countNodes() const {return 10;}
};
class Prism : public EntityShape
{
public:
void getValues(Mesh*, MeshEntity*,
Vector3 const& , NewArray<double>& ) const
{
fail("getValue not implemented for quadratic prisms type!");
}
void getLocalGradients(Mesh*, MeshEntity*,
Vector3 const& ,
NewArray<Vector3>& ) const
{
fail("getLocalGradients not implemented for quadratic prisms type!");
}
void getVectorValues(Mesh*, MeshEntity*,
Vector3 const&, NewArray<Vector3>&) const
{
fail("getVectorValues not defined for nodal shapes");
}
int countNodes() const {return 18;}
};
EntityShape* getEntityShape(int type)
{
static Linear::Vertex vertex;
static Edge edge;
static Triangle triangle;
static Tetrahedron tet;
static Prism prism;
static EntityShape* shapes[Mesh::TYPES] =
{&vertex, //vertex
&edge, //edge
&triangle, //triangle
NULL, //quad
&tet, //tet
NULL, //hex
NULL, //prism
&prism, //prism
NULL}; //pyramid
return shapes[type];
}
Expand Down
2 changes: 1 addition & 1 deletion apf/apfVtk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ static void writeTypes(std::ostream& file,
,{ 9,23}//quad
,{10,24}//tet
,{12,25}//hex
,{13,-1}//prism
,{13,32}//prism
,{14,-1}//pyramid
};
if (isWritingBinary)
Expand Down