[petsc-users] Declaring struct to represent field for dof > 1 for DM in Fortran
TAY wee-beng
zonexo at gmail.com
Tue Jul 10 05:39:41 CDT 2012
Hi,
I read in the manual in page 50 that it's recommended to declare struct
to represent field for dof > 1 for DM.
I'm using Fortran and for testing, I use dof = 1 and write as:
/type field
//PetscScalar//u (or real(8) :: u)
end type field
type(field), pointer :: field_u(:,:)/
When I tried to use :
/call DMDAVecGetArrayF90(da,x_local,field_u,ierr)/
I got the error : There is no matching specific subroutine for this
generic subroutine call. [DMDAVECGETARRAYF90]
The da, x_local has been defined with the specific DM routines. It
worked if I use :
/PetscScalar,pointer :: array(:,:) and
call DMDAVecGetArrayF90(da,x_local,array,ierr)/
May I know what did I do wrong?
--
Yours sincerely,
TAY wee-beng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120710/fa589911/attachment.html>
More information about the petsc-users
mailing list