[petsc-users] Coloring modifies user defined Jacobian at the first time step
Barry Smith
bsmith at mcs.anl.gov
Wed Oct 7 15:44:00 CDT 2015
The defaults have become rather convoluted and it looks like since you provided a matrix but not a function it is computing the jacobin for you using coloring.
Create a dummy computejacobian function that does nothing but returns and pass that in to snessetjacobian.
Barry
> On Oct 7, 2015, at 3:30 PM, Juris Vencels <vencels at kth.se> wrote:
>
> Hello,
>
> I am using such options:
> -ksp_type gmres -snes_monitor_short -snes_mf_operator -info
>
> I construct Jacobian and pass it to SNES
> SNESSetJacobian(snes,Jac,Jac,PETSC_NULL_FUNCTION,PETSC_NULL_OBJECT,ierr)
>
> Jacobian is not changing during simulation.
>
> At the first time step I get the following message
> [0] ISColoringCreate(): Number of colors 3
> [0] PetscCommDuplicate(): Duplicating a communicator 1 3 max tags = 100000000
> [0] PetscCommDuplicate(): Using internal PETSc communicator 1 3
> [0] VecScatterCreate(): Special case: sequential vector general to stride
> [0] MatFDColoringSetUp_SeqXAIJ(): ncolors 3, brows 48 and bcols 1 are used.
>
> When I print Jacobian matrix after the first time step, it is different from one that I set at the beginning of simulation. Any ideas why coloring (which I am not using) changes user defined Jacobian?
>
> Petsc Release Version 3.6.1 from Git
> Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-fblaslapack --with-fortran-kernels=generic --with-scalar-type=complex --with-debugging=0 COPTFLAGS="-O3 -march=native -mtune=native" CXXOPTFLAGS="-O3 -march=native -mtune=native" FOPTFLAGS="-O3 -march=native -mtune=native" --with-mpi=0 --with-openmp --with-threadcomm --with-pthreadclasses --with-openmpclasses
>
> Thanks!
More information about the petsc-users
mailing list