Hello
Trying to loop over the TSolve() to apply the refinement, I used the below 
procedure. However, this only goes 1 level of refinement and then it exits. Do 
you think this is a right algorithm?
Thanks for your great time.
Amir

PetscInt GRID=1;
for (GRID=1;GRID<GRID_MAX;){
//
// FIND THE ADAPTED SOLUTION
// USING PREVIOUS SOLUTION VECTORS
//
//
// BUILDING THE ADAPTED SOLUTION AND DM
//
DMDACreate1d();
DMSetFromOptions();
DMSetUp();
DMCreateGlobalVector();
//
// INTERPOLATE FROM COARSE TO REFINE
//
// DESTROYING THE FINE TEMPERORAY VECS AND
// RESETTING THE COARSE VECS WITH REFINED NEW VECS
//
//
// BUILDING TS
//
TSCreate();
TSSetApplicationContext();
TSSetDM();
TSSetProblemType(ts,TS_NONLINEAR);
TSSetType(ts,TSPSEUDO);
TSSetIFunction();
TSSetTimeStep();
//
TSSolve();
//
TSDestroy();
DMDestroy();
//
GRID=GRID+1;
//
}//end GRID-loop

Reply via email to