Actual source code: petscvec.h90

      1: #if defined(PETSC_HAVE_FORTRAN_TYPE_STAR)
      2:       Interface
      3:        subroutine PetscSFBcastBegin(sf,unit,rarray,larray,op,ierr)
      4:           import tPetscSF
      5:           PetscSF :: sf
      6:           PetscMPIInt :: unit,op
      7:           type(*) :: rarray(:)
      8:           type(*) :: larray(:)
      9:           PetscErrorCode :: ierr
     10:         end Subroutine PetscSFBcastBegin

     12:       subroutine PetscSFBcastEnd(sf,unit,rarray,larray,op,ierr)
     13:           import tPetscSF
     14:           PetscSF :: sf
     15:           PetscMPIInt :: unit,op
     16:           type(*) :: rarray(:)
     17:           type(*) :: larray(:)
     18:           PetscErrorCode :: ierr
     19:         end Subroutine PetscSFBcastEnd
     20:       end Interface
     21: #endif

     23:       Interface
     24:       subroutine PetscSFGetGraph(sf,nroots,nleaves,ilocal,iremote,ierr)
     25:           import tPetscSF,PetscSFNode
     26:           PetscSF :: sf
     27:           PetscInt :: nroots,nleaves
     28:           PetscInt, pointer :: ilocal(:)
     29:           type(PetscSFNode), pointer :: iremote(:)
     30:           PetscErrorCode :: ierr
     31:       end Subroutine PetscSFGetGraph
     32:       end Interface

     34:       Interface VecGetOwnershipRange
     35:       subroutine VecGetOwnershipRange1(x,l,h,ierr)
     36:        import tVec
     37:        Vec, intent(in) :: x
     38:        PetscInt, intent(out) ::  l,h
     39:        PetscErrorCode, intent(out) :: ierr
     40:        end subroutine
     41:       subroutine VecGetOwnershipRange2(x,l,h,ierr)
     42:        import tVec
     43:        Vec, intent(in) :: x
     44:        PetscInt, intent(out) ::  l(*),h
     45:        PetscErrorCode, intent(out) :: ierr
     46:        end subroutine
     47:       subroutine VecGetOwnershipRange3(x,l,h,ierr)
     48:        import tVec
     49:        Vec, intent(in) :: x
     50:        PetscInt, intent(out) ::  l,h(*)
     51:        PetscErrorCode, intent(out) :: ierr
     52:        end subroutine
     53:        end Interface

     55:       Interface VecMin
     56:       subroutine VecMin1(x,p,val,ierr)
     57:        import tVec
     58:        Vec, intent(in) :: x
     59:        PetscInt, intent(out) ::  p
     60:        PetscReal, intent(out) ::  val
     61:        PetscErrorCode, intent(out) :: ierr
     62:        end subroutine
     63:       subroutine VecMin2(x,p,val,ierr)
     64:        import tVec
     65:        Vec, intent(in) :: x
     66:        PetscInt, intent(out) ::  p(*)
     67:        PetscReal, intent(out) ::  val
     68:        PetscErrorCode, intent(out) :: ierr
     69:        end subroutine
     70:       end Interface

     72:       Interface VecMax
     73:       subroutine VecMax1(x,p,val,ierr)
     74:        import tVec
     75:        Vec, intent(in) :: x
     76:        PetscInt, intent(out) ::  p
     77:        PetscReal, intent(out) ::  val
     78:        PetscErrorCode, intent(out) :: ierr
     79:        end subroutine
     80:       subroutine VecMax2(x,p,val,ierr)
     81:        import tVec
     82:        Vec, intent(in) :: x
     83:        PetscInt, intent(out) ::  p(*)
     84:        PetscReal, intent(out) ::  val
     85:        PetscErrorCode, intent(out) :: ierr
     86:        end subroutine
     87:       end Interface

     89:       Interface
     90:       subroutine VecScatterCreateToAll(a,b,c,z)
     91:        import tVec,tVecScatter
     92:        Vec a
     93:        VecScatter b
     94:        Vec c
     95:        PetscErrorCode z
     96:        end subroutine
     97:       end Interface

     99:       Interface
    100:       subroutine VecScatterCreateToZero(a,b,c,z)
    101:        import tVec,tVecScatter
    102:        Vec a
    103:        VecScatter b
    104:        Vec c
    105:        PetscErrorCode z
    106:        end subroutine
    107:       end Interface

    109:       Interface VecSetValuesLocal
    110:         subroutine VecSetValuesLocal0(a,b,c,d,e,z)
    111:           import tVec
    112:           Vec a ! Vec
    113:           PetscInt b ! PetscInt
    114:           PetscInt c (*) ! PetscInt
    115:           PetscScalar d (*) ! PetscScalar
    116:           InsertMode e ! InsertMode
    117:           PetscErrorCode z
    118:         end subroutine
    119:         subroutine VecSetValuesLocal11(a,b,c,d,e,z)
    120:           import tVec
    121:           Vec a ! Vec
    122:           PetscInt b ! PetscInt
    123:           PetscInt c ! PetscInt
    124:           PetscScalar d ! PetscScalar
    125:           InsertMode e ! InsertMode
    126:           PetscErrorCode z
    127:         end subroutine
    128:       end interface VecSetValuesLocal

    130:       Interface VecGetValues
    131:         subroutine VecGetValues0(a,b,c,d,z)
    132:           import tVec
    133:           Vec a ! Vec
    134:           PetscInt b ! PetscInt
    135:           PetscInt c (*) ! PetscInt
    136:           PetscScalar d (*) ! PetscScalar
    137:           PetscErrorCode z
    138:         end subroutine
    139:         subroutine VecGetValues1(a,b,c,d,z)
    140:           import tVec
    141:           Vec a ! Vec
    142:           PetscInt b ! PetscInt
    143:           PetscInt c ! PetscInt
    144:           PetscScalar d (*) ! PetscScalar
    145:           PetscErrorCode z
    146:         end subroutine
    147:         subroutine VecGetValues11(a,b,c,d,z)
    148:           import tVec
    149:           Vec a ! Vec
    150:           PetscInt b ! PetscInt
    151:           PetscInt c ! PetscInt
    152:           PetscScalar d ! PetscScalar
    153:           PetscErrorCode z
    154:         end subroutine
    155:       End Interface VecGetValues

    157:       Interface VecSetValues
    158:         subroutine VecSetValues0(a,b,c,d,e,z)
    159:           import tVec
    160:           Vec a ! Vec
    161:           PetscInt b ! PetscInt
    162:           PetscInt c (*) ! PetscInt
    163:           PetscScalar d (*) ! PetscScalar
    164:           InsertMode e ! InsertMode
    165:           PetscErrorCode z
    166:         end subroutine
    167:         subroutine VecSetValues1(a,b,c,d,e,z)
    168:           import tVec
    169:           Vec a ! Vec
    170:           PetscInt b ! PetscInt
    171:           PetscInt c ! PetscInt
    172:           PetscScalar d (*) ! PetscScalar
    173:           InsertMode e ! InsertMode
    174:           PetscErrorCode z
    175:         end subroutine
    176:         subroutine VecSetValues11(a,b,c,d,e,z)
    177:           import tVec
    178:           Vec a ! Vec
    179:           PetscInt b ! PetscInt
    180:           PetscInt c ! PetscInt
    181:           PetscScalar d ! PetscScalar
    182:           InsertMode e ! InsertMode
    183:           PetscErrorCode z
    184:         end subroutine
    185:       End Interface VecSetValues

    187:       Interface VecSetValuesBlocked
    188:         subroutine VecSetValuesBlocked0(a,b,c,d,e,z)
    189:           import tVec
    190:           Vec a ! Vec
    191:           PetscInt b ! PetscInt
    192:           PetscInt c (*) ! PetscInt
    193:           PetscScalar d (*) ! PetscScalar
    194:           InsertMode e ! InsertMode
    195:           PetscErrorCode z
    196:         end subroutine
    197:         subroutine VecSetValuesBlocked1(a,b,c,d,e,z)
    198:           import tVec
    199:           Vec a ! Vec
    200:           PetscInt b ! PetscInt
    201:           PetscInt c ! PetscInt
    202:           PetscScalar d (*) ! PetscScalar
    203:           InsertMode e ! InsertMode
    204:           PetscErrorCode z
    205:         end subroutine
    206:         subroutine VecSetValuesBlocked11(a,b,c,d,e,z)
    207:           import tVec
    208:           Vec a ! Vec
    209:           PetscInt b ! PetscInt
    210:           PetscInt c ! PetscInt
    211:           PetscScalar d ! PetscScalar
    212:           InsertMode e ! InsertMode
    213:           PetscErrorCode z
    214:         end subroutine
    215:       End Interface VecSetValuesBlocked

    217:       Interface
    218:         Subroutine VecGetArrayF90(v,array,ierr)
    219:           import tVec
    220:           PetscScalar, pointer :: array(:)
    221:           PetscErrorCode ierr
    222:           Vec     v
    223:         End Subroutine
    224:       End Interface

    226:       Interface
    227:         Subroutine VecRestoreArrayF90(v,array,ierr)
    228:           import tVec
    229:           PetscScalar, pointer :: array(:)
    230:           PetscErrorCode ierr
    231:           Vec     v
    232:         End Subroutine
    233:       End Interface

    235:       Interface
    236:         Subroutine VecGetArrayReadF90(v,array,ierr)
    237:           import tVec
    238:           PetscScalar, pointer :: array(:)
    239:           PetscErrorCode ierr
    240:           Vec     v
    241:         End Subroutine
    242:       End Interface

    244:       Interface
    245:         Subroutine VecRestoreArrayReadF90(v,array,ierr)
    246:           import tVec
    247:           PetscScalar, pointer :: array(:)
    248:           PetscErrorCode ierr
    249:           Vec     v
    250:         End Subroutine
    251:       End Interface

    253:       Interface
    254:         Subroutine VecSetValuesSectionF90(v,s,p,va,mode,ierr)
    255:           import tVec,tPetscSection
    256:           PetscScalar, pointer :: va(:)
    257:           PetscErrorCode ierr
    258:           Vec     v
    259:           PetscSection s
    260:           PetscInt p
    261:           InsertMode mode
    262:         End Subroutine
    263:       End Interface

    265: ! -------------------------------------------------------------

    267:       Interface
    268:         Subroutine VecDuplicateVecsF90(v,m,vs,ierr)
    269:           import tVec
    270:           Vec, pointer :: vs(:)
    271:           PetscInt m
    272:           PetscErrorCode ierr
    273:           Vec     v
    274:         End Subroutine
    275:       End Interface
    276: !
    277: !  Question: should VecDestroyVecsF90() take the m argument since
    278: ! the array of vectors already knows how long it is? Yes, to
    279: ! match calling sequence for C/C++.
    280: !
    281:       Interface
    282:         Subroutine VecDestroyVecsF90(m,vs,ierr)
    283:           import tVec
    284:           Vec, pointer :: vs(:)
    285:           PetscInt m
    286:           PetscErrorCode ierr
    287:         End Subroutine

    289:         Subroutine VecDestroy(a,ierr)
    290:           import tVec
    291:           Vec a
    292:           PetscErrorCode ierr
    293:         End Subroutine

    295:         subroutine VecSetType(a,b,ierr)
    296:          import tVec
    297:          Vec a
    298:          character(*) b
    299:          PetscErrorCode ierr
    300:        end subroutine

    302:        subroutine VecView(a,b,ierr)
    303:          import tVec,tPetscViewer
    304:          Vec a
    305:          PetscViewer b
    306:          PetscErrorCode ierr
    307:        end subroutine

    309:        subroutine VecScatterRemap(a,b,c,ierr)
    310:          import tVecScatter
    311:          VecScatter a ! VecScatter
    312:          PetscInt b (*) ! PetscInt
    313:          PetscInt c (*) ! PetscInt
    314:          PetscErrorCode ierr
    315:        end subroutine

    317:        subroutine VecLoad(a,b,ierr)
    318:          import tVec,tPetscViewer
    319:          Vec a
    320:          PetscViewer b
    321:          PetscErrorCode ierr
    322:        end subroutine

    324:       end Interface