Skip to content
Snippets Groups Projects
Commit a358c012 authored by Jean-François Remacle's avatar Jean-François Remacle
Browse files

There was a mistake in GetOptions : something like

if(degree != 1 || degree != 2) which was always true,
giving an error when doing the command line gmsh -degree 2
parent c438dae5
No related branches found
No related tags found
No related merge requests found
...@@ -217,7 +217,7 @@ StringXNumber MeshOptions_Number[] = { ...@@ -217,7 +217,7 @@ StringXNumber MeshOptions_Number[] = {
StringXNumber PostProcessingOptions_Number[] = { StringXNumber PostProcessingOptions_Number[] = {
{ F|O, "Scales" , opt_post_scales , 1. }, { F|O, "Scales" , opt_post_scales , 1. },
{ F|O, "Link" , opt_post_link , 0. }, { F|O, "Link" , opt_post_link , 0. },
{ F|O, "Smoothing" , opt_post_smooth , 0. }, { F|O, "Smoothing" , opt_post_smooth , 1. },
{ F|O, "AnimationDelay" , opt_post_anim_delay , 0.25 }, { F|O, "AnimationDelay" , opt_post_anim_delay , 0.25 },
{ F, "NbViews" , opt_post_nb_views , 0. }, { F, "NbViews" , opt_post_nb_views , 0. },
{ 0, NULL , NULL , 0. } { 0, NULL , NULL , 0. }
......
// $Id: GetOptions.cpp,v 1.13 2001-02-22 08:16:30 geuzaine Exp $ // $Id: GetOptions.cpp,v 1.14 2001-02-22 14:43:39 remacle Exp $
#include "Gmsh.h" #include "Gmsh.h"
#include "GmshUI.h" #include "GmshUI.h"
...@@ -188,7 +188,7 @@ void Get_Options (int argc, char *argv[], int *nbfiles) { ...@@ -188,7 +188,7 @@ void Get_Options (int argc, char *argv[], int *nbfiles) {
i++; i++;
if(argv[i]!=NULL){ if(argv[i]!=NULL){
CTX.mesh.degree = atoi(argv[i++]); CTX.mesh.degree = atoi(argv[i++]);
if(CTX.mesh.degree != 1 || CTX.mesh.degree != 2){ if(CTX.mesh.degree != 1 && CTX.mesh.degree != 2){
fprintf(stderr, ERROR_STR "Wrong Degree\n"); fprintf(stderr, ERROR_STR "Wrong Degree\n");
exit(1); exit(1);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment