[petsc-users] TSSetMaxSteps gives undefined reference error
Ali Berk Kahraman
aliberkkahraman at yahoo.com
Tue Oct 10 07:56:24 CDT 2017
Hello All,
When I try to use TSSetMaxSteps function in my code, the compiler gives
me "undefined reference to TSSetMaxSteps" error. I have petscts.h
included, and my makefile is also operational for ts. Any ideas why this
might be? I use petsc 3.7.3. The code sample is as follows,
#include <petscts.h>
.
.
.
.
TS ts;
ierr= TSCreate(PETSC_COMM_WORLD,&ts);
CHKERRQ(ierr);
ierr= TSSetProblemType(ts,TS_LINEAR);
CHKERRQ(ierr);
ierr= TSSetSolution(ts, dummyvec);
CHKERRQ(ierr);
ierr= TSSetType(ts,TSRK);
CHKERRQ(ierr);
ierr= TSSetTime(ts,time);
CHKERRQ(ierr);
ierr= TSSetTimeStep(ts,timestep);
CHKERRQ(ierr);
ierr=TSSetExactFinalTime(ts,TS_EXACTFINALTIME_STEPOVER);
CHKERRQ(ierr);
ierr=TSSetMaxSteps(ts,maxsteps);CHKERRQ(ierr);
TSSetRHSFunction(ts,residual,
FormRHSFunction,&mycontext);
ierr= TSSolve(ts,uJi);
CHKERRQ(ierr);
More information about the petsc-users
mailing list