[petsc-users] using SNES_VI_INF in variable initialization
Dharmendar Reddy
dharmareddy84 at gmail.com
Fri Jan 17 15:17:46 CST 2014
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