Skip to content

Commit

Permalink
Must specify nset for it to work correctly in optimized mode, why did…
Browse files Browse the repository at this point in the history
… it work in debug mode?
  • Loading branch information
jedbrown committed Dec 5, 2008
1 parent e5e4b2c commit 0fce5b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/fs/tests/ex1.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,12 +496,15 @@ int main(int argc,char *argv[])
err = PetscOptionsInt("-exact","Exact solution choice (0=transcendental,1=x coord)",NULL,exactChoice,&exactChoice,NULL);dCHK(err);
err = PetscOptionsInt("-cycles","Number of times to solve the equation, useful for profiling",NULL,gopt.cycles,&gopt.cycles,NULL);dCHK(err);
err = PetscOptionsReal("-q1scale","Scale matrix entries of Q1 preconditioning matrix",NULL,gopt.q1scale,&gopt.q1scale,NULL);dCHK(err);
nset = 3;
err = PetscOptionsRealArray("-frequency","Frequency of oscillation in each cartesion direction",NULL,gopt.frequency,&nset,&flg);dCHK(err);
if (flg && nset > 3) dERROR(1,"frequency may be at most 3 values");
err = PetscOptionsTruth("-show_conn","Show connectivity",NULL,showconn,&showconn,NULL);dCHK(err);
err = PetscOptionsTruth("-show_mesh","Show mesh immediately after createHexMesh()",NULL,showmesh,&showmesh,NULL);dCHK(err);
nset = 3;
err = PetscOptionsRealArray("-require_ptwise","<L^1,L^2,L^infty> Error if pointwise norms exceed given values, negative to disable",NULL,gopt.normRequirePtwise,&nset,&flg);dCHK(err);
if (flg && nset != 3) dERROR(1,"You must set 3 values for -require_ptwise");
if (flg && nset != 3) dERROR(1,"You must set 3 values for -require_ptwise, %d set",nset);
nset = 3;
err = PetscOptionsRealArray("-require_grad","<L^1,L^2,L^infty> Error if pointwise gradient norms exceed given values, negative to disable",NULL,gopt.normRequireGrad,&nset,&flg);dCHK(err);
if (flg && nset != 3) dERROR(1,"You must set 3 values for -require_grad");
} err = PetscOptionsEnd();dCHK(err);
Expand Down

0 comments on commit 0fce5b0

Please sign in to comment.