[petsc-users] Changing TSAdapt

Miguel Angel Salazar de Troya salazardetroya at gmail.com
Thu Dec 11 16:06:12 CST 2014


Hi

I'm trying to use the same TS twice, the first time using the basic
TSAdaptType, then I change it to none like this:

TSAdapt adapt;
TSGetAdapt(ts,&adapt);
TSAdaptSetType(adapt,"none");

However, when I destroy the TS, I get this error:

0x00007ffff605c4f2 in VecDestroy (v=0x28) at
/home/miguel/petsc/src/vec/vec/interface/vector.c:423
423  if (!*v) PetscFunctionReturn(0);
(gdb) backtrace
#0  0x00007ffff605c4f2 in VecDestroy (v=0x28) at
/home/miguel/petsc/src/vec/vec/interface/vector.c:423
#1  0x00007ffff6f330a5 in TSAdaptDestroy_Basic (adapt=0xfdacd0) at
/home/miguel/petsc/src/ts/adapt/impls/basic/adaptbasic.c:66
#2  0x00007ffff6f2c433 in TSAdaptDestroy (adapt=0xfccbc8) at
/home/miguel/petsc/src/ts/adapt/interface/tsadapt.c:238
#3  0x00007ffff6f03093 in TSDestroy (ts=0x7fffffffdd80) at
/home/miguel/petsc/src/ts/interface/ts.c:1906


It's trying to destroy the TSAdaptDestroy_Basic, but I think it was already
destroyed when I changed the TSAdaptType to none, is this true? How can I
effectively change the TSAdaptType without having this error?

Thanks
Miguel

-- 
*Miguel Angel Salazar de Troya*
Graduate Research Assistant
Department of Mechanical Science and Engineering
University of Illinois at Urbana-Champaign
(217) 550-2360
salaza11 at illinois.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141211/1405927f/attachment.html>


More information about the petsc-users mailing list