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

better info messages for fields with more components/nodes that can be displayed

parent 02419c83
No related branches found
No related tags found
No related merge requests found
...@@ -342,9 +342,9 @@ static void drawGlyphs(drawContext *ctx, PView *p) ...@@ -342,9 +342,9 @@ static void drawGlyphs(drawContext *ctx, PView *p)
else{ else{
if(numNodesError != numNodes){ if(numNodesError != numNodes){
numNodesError = numNodes; numNodesError = numNodes;
Msg::Error("You should never draw views with > %d nodes per element: use" Msg::Warning("Fields with %d nodes per element cannot be displayed: "
"'Adapt visualization grid' to view high-order datasets!", "either force the field type or select 'Adapt visualization "
PVIEW_NMAX); "grid' if the field is high-order", numNodes);
} }
continue; continue;
} }
......
...@@ -425,8 +425,8 @@ bool PViewDataGModel::readMED(const std::string &fileName, int fileIndex) ...@@ -425,8 +425,8 @@ bool PViewDataGModel::readMED(const std::string &fileName, int fileIndex)
(numComp <= 1) ? 1 : (numComp <= 3) ? 3 : (numComp <= 9) ? 9 : numComp; (numComp <= 1) ? 1 : (numComp <= 3) ? 3 : (numComp <= 9) ? 9 : numComp;
if(numCompMsh > 9) if(numCompMsh > 9)
Msg::Warning("More than 9 components in field: you will probably want to force " Msg::Info("More than 9 components in field: you will probably want to force "
"the field type to scalar, vector or tensor in the options"); "the field type to scalar, vector or tensor in the options");
// Warning! The ordering of the elements in the last two lists is // Warning! The ordering of the elements in the last two lists is
// important: it should match the ordering of the MSH element types // important: it should match the ordering of the MSH element types
......
...@@ -1213,9 +1213,9 @@ static void addElementsInArrays(PView *p, bool preprocessNormalsOnly) ...@@ -1213,9 +1213,9 @@ static void addElementsInArrays(PView *p, bool preprocessNormalsOnly)
else { else {
if(numNodesError != numNodes){ if(numNodesError != numNodes){
numNodesError = numNodes; numNodesError = numNodes;
Msg::Error("You should never draw views with > %d nodes per element: use" Msg::Warning("Fields with %d nodes per element cannot be displayed: "
"'Adapt visualization grid' to view high-order datasets!", "either force the field type or select 'Adapt visualization "
PVIEW_NMAX); "grid' if the field is high-order", numNodes);
} }
continue; continue;
} }
...@@ -1223,8 +1223,9 @@ static void addElementsInArrays(PView *p, bool preprocessNormalsOnly) ...@@ -1223,8 +1223,9 @@ static void addElementsInArrays(PView *p, bool preprocessNormalsOnly)
if((numComp > 9 && !opt->forceNumComponents) || opt->forceNumComponents > 9){ if((numComp > 9 && !opt->forceNumComponents) || opt->forceNumComponents > 9){
if(numCompError != numComp) { if(numCompError != numComp) {
numCompError = numComp; numCompError = numComp;
Msg::Error("You should never draw views with > 9 values per node: use" Msg::Warning("Fields with %d components cannot be displayed: "
"'Adapt visualization grid' to view high-order datasets!"); "either force the field type or select 'Adapt visualization "
"grid' if the field is high-order", numComp);
} }
continue; continue;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment