[petsc-users] using SNES_VI_INF in variable initialization
Barry Smith
bsmith at mcs.anl.gov
Fri Jan 17 15:36:02 CST 2014
Sorry, it is missing from Fortran. Use 1.0e20 and -1.0e20 for the values
Barry
Request-assigned: Barry define SNES_VI_INF and NINF for Fortran
On Jan 17, 2014, at 3:17 PM, Dharmendar Reddy <dharmareddy84 at gmail.com> wrote:
> Hello,
> I am not sure if this is a petsc related issue. I am trying to
> use SNES_VI_{INF,NINF} to initialize a variable as shown below in the
> code. The code does not compile...How do i fix it ? Looks like
> SNES_VI_INF is not available via petscdef.h
>
> module test_m
> implicit none
> #include "finclude/petscdef.h"
> type Var_t
> real :: lb = SNES_VI_NINF
> real :: ub = SNES_VI_INF
> end type Var_t
> end module test_m
>
> program test
> implicit none
> #include "finclude/petsc.h"
> PetscErrorCode ierr
> type(Var_t) :: Var
> call PetscInitialize(PETSC_NULL_CHARACTER, ierr)
> print*, 'lb=',Var%lb
> print*, 'ub=',Var%ub
> call PetscFinalize(ierr)
> end program test
More information about the petsc-users
mailing list