linear elliptic vector equation

2009-08-19 Thread nicolas aunai
Hi, OK then, lets go for multigrid. When I'm looking for example at exercice 32 : http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/src/ksp/ksp/examples/tutorials/ex32.c.html I realize that I don't understand some things, in particular about the DMMGSetKSP function. I need to give

cast PetscScalar to double

2009-08-19 Thread Fredrik Bengzon
Hi I'm using a Petsc 3 installation compiled with support for complex numbers. However, in the code I have made frequent use of the stl library and the standard type double. This now gives a compilation error since PetscScalar can not be casted into double. Do you know of a quick workaround or

cast PetscScalar to double

2009-08-19 Thread Satish Balay
you can replace (double)(var) with one of the following [approprate to your code] thingy. PetscAbsScalar(var) PetscRealPart(var) Satish On Wed, 19 Aug 2009, Fredrik Bengzon wrote: Hi I'm using a Petsc 3 installation compiled with support for complex numbers. However, in the code I have made

linear elliptic vector equation

2009-08-19 Thread Barry Smith
On Aug 19, 2009, at 2:04 AM, nicolas aunai wrote: Hi, OK then, lets go for multigrid. When I'm looking for example at exercice 32 : http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/src/ksp/ksp/examples/tutorials/ex32.c.html I realize that I don't understand some things, in