[petsc-users] Refinement on TS
Amir
mhbaghaei at mail.sjtu.edu.cn
Thu Jul 5 12:26:17 CDT 2018
This is what I get from Valgrind. I think there is a problem in setting TS in the loop. But I am not sure what it really is. Sorry for may be confusing you.
Amir
Thread 1: status = VgTs_Runnable (lwpid 23154)
==23154== at 0x4C320A6: memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==23154== by 0x4FA68E0: PetscMallocAlign (mal.c:42)
==23154== by 0x4FA6EEA: PetscMallocA (mal.c:390)
==23154== by 0x50FFBAF: VecCreate (veccreate.c:35)
==23154== by 0x54E77BB: DMCreateGlobalVector_DA (dadist.c:36)
==23154== by 0x5463DDD: DMCreateGlobalVector (dm.c:928)
==23154== by 0x54E7613: VecDuplicate_MPI_DA (dadist.c:16)
==23154== by 0x50FC014: VecDuplicate (vector.c:375)
==23154== by 0x593ED55: SNESSolve (snes.c:4296)
==23154== by 0x59D9519: TSStep_Pseudo (posindep.c:151)
==23154== by 0x59B8A88: TSStep (ts.c:3548)
==23154== by 0x59C383D: TSSolve (ts.c:3731)
==23154== by 0x115BEC: main (1d.c:1253)
On Jul 6 2018, at 1:20 am, Smith, Barry F. <bsmith at mcs.anl.gov> wrote:
>
>
> When it exits the loop will depend on your criteria for adapativitiy so I have no way of knowing if it is enough, surely you can tighten your criteria so that it requires several refinements in the loop.
> Barry
>
> > On Jul 5, 2018, at 5:38 AM, Amir <mhbaghaei at mail.sjtu.edu.cn> wrote:
> > 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180706/474ee45f/attachment.html>
More information about the petsc-users
mailing list