From baaf1042380b7a08d48a19e269c34b6415dc1a3a Mon Sep 17 00:00:00 2001
From: Pratheek Shanthraj
Date: Wed, 25 Jun 2014 14:22:08 +0000
Subject: [PATCH] changed pointer attribute to allocatable in tState. since the
pointers are only used for allocation, allocatables should do the same job
more efficiently
---
code/prec.f90 | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/code/prec.f90 b/code/prec.f90
index 0bbb86015..124a5a66f 100644
--- a/code/prec.f90
+++ b/code/prec.f90
@@ -63,21 +63,21 @@ module prec
#ifdef NEWSTATE
!http://stackoverflow.com/questions/3948210/can-i-have-a-pointer-to-an-item-in-an-allocatable-array
type, public :: tState
- integer(pInt) :: sizeState,sizeDotState
- logical :: nonlocal
- real(pReal), pointer, dimension(:) :: atolState
- real(pReal), pointer, dimension(:,:) :: state, & ! material points, state size
- dotState, &
- state0, &
- partionedState0, &
- subState0, &
- state_backup, &
- deltaState, &
- previousDotState, &
- previousDotState2, &
- dotState_backup, &
- RK4dotState
- real(pReal), pointer, dimension(:,:,:) :: RKCK45dotState
+ integer(pInt) :: sizeState,sizeDotState
+ logical :: nonlocal
+ real(pReal), allocatable, dimension(:) :: atolState
+ real(pReal), allocatable, dimension(:,:) :: state, & ! material points, state size
+ dotState, &
+ state0, &
+ partionedState0, &
+ subState0, &
+ state_backup, &
+ deltaState, &
+ previousDotState, &
+ previousDotState2, &
+ dotState_backup, &
+ RK4dotState
+ real(pReal), allocatable, dimension(:,:,:) :: RKCK45dotState
end type
#endif