reshape to expected shape
This commit is contained in:
parent
5c08794bbf
commit
40b4062b83
|
@ -375,16 +375,17 @@ end subroutine grid_mechanical_spectral_basic_forward
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief Update coordinates
|
!> @brief Update coordinates.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine grid_mechanical_spectral_basic_updateCoords
|
subroutine grid_mechanical_spectral_basic_updateCoords()
|
||||||
|
|
||||||
PetscErrorCode :: err_PETSc
|
PetscErrorCode :: err_PETSc
|
||||||
real(pREAL), dimension(:,:,:,:), pointer :: F
|
real(pREAL), dimension(:,:,:,:), pointer :: F
|
||||||
|
|
||||||
|
|
||||||
call DMDAVecGetArrayF90(da,solution_vec,F,err_PETSc)
|
call DMDAVecGetArrayF90(da,solution_vec,F,err_PETSc)
|
||||||
CHKERRQ(err_PETSc)
|
CHKERRQ(err_PETSc)
|
||||||
call utilities_updateCoords(F)
|
call utilities_updateCoords(reshape(F,[3,3,size(F,2),size(F,3),size(F,4)]))
|
||||||
call DMDAVecRestoreArrayF90(da,solution_vec,F,err_PETSc)
|
call DMDAVecRestoreArrayF90(da,solution_vec,F,err_PETSc)
|
||||||
CHKERRQ(err_PETSc)
|
CHKERRQ(err_PETSc)
|
||||||
|
|
||||||
|
@ -392,14 +393,15 @@ end subroutine grid_mechanical_spectral_basic_updateCoords
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief Write current solver and constitutive data for restart to file
|
!> @brief Write current solver and constitutive data for restart to file.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine grid_mechanical_spectral_basic_restartWrite
|
subroutine grid_mechanical_spectral_basic_restartWrite()
|
||||||
|
|
||||||
PetscErrorCode :: err_PETSc
|
PetscErrorCode :: err_PETSc
|
||||||
integer(HID_T) :: fileHandle, groupHandle
|
integer(HID_T) :: fileHandle, groupHandle
|
||||||
real(pREAL), dimension(:,:,:,:), pointer :: F
|
real(pREAL), dimension(:,:,:,:), pointer :: F
|
||||||
|
|
||||||
|
|
||||||
call DMDAVecGetArrayF90(da,solution_vec,F,err_PETSc)
|
call DMDAVecGetArrayF90(da,solution_vec,F,err_PETSc)
|
||||||
CHKERRQ(err_PETSc)
|
CHKERRQ(err_PETSc)
|
||||||
|
|
||||||
|
|
|
@ -432,16 +432,17 @@ end subroutine grid_mechanical_spectral_polarisation_forward
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief Update coordinates
|
!> @brief Update coordinates.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine grid_mechanical_spectral_polarisation_updateCoords
|
subroutine grid_mechanical_spectral_polarisation_updateCoords()
|
||||||
|
|
||||||
PetscErrorCode :: err_PETSc
|
PetscErrorCode :: err_PETSc
|
||||||
real(pREAL), dimension(:,:,:,:), pointer :: FandF_tau
|
real(pREAL), dimension(:,:,:,:), pointer :: FandF_tau
|
||||||
|
|
||||||
|
|
||||||
call DMDAVecGetArrayF90(da,solution_vec,FandF_tau,err_PETSc)
|
call DMDAVecGetArrayF90(da,solution_vec,FandF_tau,err_PETSc)
|
||||||
CHKERRQ(err_PETSc)
|
CHKERRQ(err_PETSc)
|
||||||
call utilities_updateCoords(FandF_tau(0:8,:,:,:))
|
call utilities_updateCoords(reshape(FandF_tau(0:8,:,:,:),[3,3,size(FandF_tau,2),size(FandF_tau,3),size(FandF_tau,4)]))
|
||||||
call DMDAVecRestoreArrayF90(da,solution_vec,FandF_tau,err_PETSc)
|
call DMDAVecRestoreArrayF90(da,solution_vec,FandF_tau,err_PETSc)
|
||||||
CHKERRQ(err_PETSc)
|
CHKERRQ(err_PETSc)
|
||||||
|
|
||||||
|
@ -449,14 +450,15 @@ end subroutine grid_mechanical_spectral_polarisation_updateCoords
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief Write current solver and constitutive data for restart to file
|
!> @brief Write current solver and constitutive data for restart to file.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine grid_mechanical_spectral_polarisation_restartWrite
|
subroutine grid_mechanical_spectral_polarisation_restartWrite()
|
||||||
|
|
||||||
PetscErrorCode :: err_PETSc
|
PetscErrorCode :: err_PETSc
|
||||||
integer(HID_T) :: fileHandle, groupHandle
|
integer(HID_T) :: fileHandle, groupHandle
|
||||||
real(pREAL), dimension(:,:,:,:), pointer :: FandF_tau, F, F_tau
|
real(pREAL), dimension(:,:,:,:), pointer :: FandF_tau, F, F_tau
|
||||||
|
|
||||||
|
|
||||||
call DMDAVecGetArrayF90(da,solution_vec,FandF_tau,err_PETSc)
|
call DMDAVecGetArrayF90(da,solution_vec,FandF_tau,err_PETSc)
|
||||||
CHKERRQ(err_PETSc)
|
CHKERRQ(err_PETSc)
|
||||||
F => FandF_tau(0: 8,:,:,:)
|
F => FandF_tau(0: 8,:,:,:)
|
||||||
|
|
Loading…
Reference in New Issue