Skip to content
Snippets Groups Projects
Commit 9bd3ac3e authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

avoid crash (workaround ugly polygon/polyhedron code)

parent f15b2296
Branches
Tags
No related merge requests found
...@@ -270,6 +270,8 @@ static void drawTangentVectorGlyphs(drawContext *ctx, PView *p, int numNodes, ...@@ -270,6 +270,8 @@ static void drawTangentVectorGlyphs(drawContext *ctx, PView *p, int numNodes,
static void drawGlyphs(drawContext *ctx, PView *p) static void drawGlyphs(drawContext *ctx, PView *p)
{ {
static int numNodesError = 0;
// use adaptive data if available // use adaptive data if available
PViewData *data = p->getData(true); PViewData *data = p->getData(true);
PViewOptions *opt = p->getOptions(); PViewOptions *opt = p->getOptions();
...@@ -325,6 +327,15 @@ static void drawGlyphs(drawContext *ctx, PView *p) ...@@ -325,6 +327,15 @@ static void drawGlyphs(drawContext *ctx, PView *p)
val[j] = new double[9]; val[j] = new double[9];
} }
} }
else{
if(numNodesError != numNodes){
numNodesError = numNodes;
Msg::Error("You should never draw views with > %d nodes per element: use"
"'Adapt visualization grid' to view high-order datasets!",
PVIEW_NMAX);
}
continue;
}
} }
for(int j = 0; j < numNodes; j++){ for(int j = 0; j < numNodes; j++){
data->getNode(opt->timeStep, ent, i, j, xyz[j][0], xyz[j][1], xyz[j][2]); data->getNode(opt->timeStep, ent, i, j, xyz[j][0], xyz[j][1], xyz[j][2]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment