102c639afSMartin Diehlinterface 202c639afSMartin Diehl subroutine DMSwarmGetField(dm, fieldname, blocksize, dtype, data, ierr) 3fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 46dd63270SBarry Smith use petscsys, only: ePetscDataType 56dd63270SBarry Smith import tDM 66dd63270SBarry Smith DM dm 76dd63270SBarry Smith character(len=*) :: fieldname 86dd63270SBarry Smith PetscInt blocksize 96dd63270SBarry Smith PetscDataType dtype 106dd63270SBarry Smith PetscScalar, pointer :: data(:) 11*0da4d79bSMartin Diehl PetscErrorCode, intent(out) :: ierr 1202c639afSMartin Diehl end subroutine 136dd63270SBarry Smith 1402c639afSMartin Diehl subroutine DMSwarmRestoreField(dm, fieldname, blocksize, dtype, data, ierr) 15fe66ebccSMartin Diehl use, intrinsic :: ISO_C_binding 166dd63270SBarry Smith use petscsys, only: ePetscDataType 176dd63270SBarry Smith import tDM 186dd63270SBarry Smith DM dm 196dd63270SBarry Smith character(len=*) :: fieldname 206dd63270SBarry Smith PetscInt blocksize 216dd63270SBarry Smith PetscDataType dtype 226dd63270SBarry Smith PetscScalar, pointer :: data(:) 23*0da4d79bSMartin Diehl PetscErrorCode, intent(out) :: ierr 2402c639afSMartin Diehl end subroutine 2502c639afSMartin Diehlend interface 263d1372b2SMartin Diehl 273d1372b2SMartin Diehl#if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES) 283d1372b2SMartin Diehl!DEC$ ATTRIBUTES DLLEXPORT::DMSwarmGetField 293d1372b2SMartin Diehl!DEC$ ATTRIBUTES DLLEXPORT::DMSwarmRestoreField 303d1372b2SMartin Diehl#endif 31