 	{
 	  for(int i=0; i < numElementsPerSide-1; i++)
 	  {
-	    sys.addConstraint_RelativeFixed(
-	        sys.elements[i+offset+j*numElementsPerSide], 1,
-	        sys.elements[i+offset+1+j*numElementsPerSide], 0);
+	    sys->addConstraint_RelativeFixed(
+	        sys->elements[i+offset+j*numElementsPerSide], 1,
+	        sys->elements[i+offset+1+j*numElementsPerSide], 0);
 	  }
 	}
 


void renderSceneAll(){
	if(OGL){
		//if(sys.timeIndex%10==0)
		drawAll();

		// Force a preconditioner update if needed
		if ((sys.preconditionerUpdateModulus > 0) && (sys.timeIndex % sys.preconditionerUpdateModulus == 0)) {
		  //mySolver->update(lhs.values);
		  delete sys.mySolver;
		  sys.mySolver = new SpikeSolver(sys.partitions, sys.solverOptions);
		  sys.mySolver->setup(sys.lhs);
		  sys.precUpdated = true;
		  printf("Preconditioner updated (step condition)!\n");
		}

		sys.DoTimeStep();
	}
}


#ifdef WITH_GLUT
	bool visualize = true;
#endif
	sys = new ANCFSystem();

	sys->setTimeStep(1e-3, 1e-10);
	sys->setMaxNewtonIterations(20);
	sys->setMaxKrylovIterations(5000);
	sys->numContactPoints = 30;

	sys->setNumPartitions(1);
	int numElementsPerSide = 4;
	sys->setSolverType(2);
	sys->setPrecondType(0);
	double E = 2e11;

	double t_end = 5.0;
