[petsc-dev] Microsoft doesn't like

Barry Smith bsmith at mcs.anl.gov
Mon Mar 10 15:25:58 CDT 2014


/home/sbalay/petsc.clone-2/bin/win32fe/win32fe cl -o ex7.o -c -DMPICH_SKIP_MPICXX -MT -GR -EHsc -Z7 -Zm200  -TP    -I/home/sbalay/petsc.clone-2/include -I/home/sbalay/petsc.clone-2/arch-mswin-cxx-cmplx/include -I/cygdrive/c/Program\ Files/MPICH2/include    `pwd`/ex7.c
ex7.c
C:\cygwin\home\sbalay\PETSC~2.CLO\src\snes\examples\TUTORI~1\ex7.c(297) : error C2440: 'initializing' : cannot convert from 'const double' to 'Field'
        No constructor could take the source type, or constructor overload resolution was ambiguous
C:\cygwin\home\sbalay\PETSC~2.CLO\src\snes\examples\TUTORI~1\ex7.c(297) : error C2440: 'initializing' : cannot convert from 'const double' to 'Field'
        No constructor could take the source type, or constructor overload resolution was ambiguous

typedef struct {
  PetscScalar u;
  PetscScalar v;
  PetscScalar p;
} Field;


PetscErrorCode constantResidual(PetscReal lambda, PetscBool isLower, int i, int j, PetscReal hx, PetscReal hy, Field r[])
{
  Field       rLocal[3] = {{0.0, 0.0}, {0.0, 0.0}, {0.0, 0.0}};
  PetscScalar phi[3]    = {0.0, 0.0, 0.0};
  PetscReal   xI = i*hx, yI = j*hy, hxhy = hx*hy;




More information about the petsc-dev mailing list