Minimal fix for timestepping bug. There are two problems here:
authorOrion Lawlor <olawlor@acm.org>
Mon, 10 Jan 2005 19:09:08 +0000 (19:09 +0000)
committerOrion Lawlor <olawlor@acm.org>
Mon, 10 Jan 2005 19:09:08 +0000 (19:09 +0000)
  1.) The boundary condition control variables "kk", prop, slope, etc
have strange meanings and complicated processing.

  2.) Everything assumes Fortran 1-based array indexing, but we're
in 0-based C here.

examples/fem/crack2D/node.C

index 03f724c981d4814ef45031ee30976d6eae48ef3e..580a9d70fb0f87e9c447924bc8d46afe8073606f 100644 (file)
@@ -23,6 +23,7 @@ void nodeBeginStep(MeshData *mesh)
 
 void nodeFinishStep(MeshData *mesh, NodeSlope *sl,int tstep)
 {
+  tstep++; /* subtle: timesteps are 1-based in the .inp file, so make tstep 1-based */
   // Slowly ramp up boundary conditions:
   if (config.ts_proportion[sl->kk+1] == tstep)
   {