Commits

Anonymous committed 986a31c

Added update of pressure and temperature for general

  • Participants
  • Parent commits 1239779

Comments (0)

Files changed (1)

File src/pflotran/global.F90

        (1.d0-weight)*auxvars(ghosted_id)%sat_store(:,TIME_T))
   enddo
   
-    ! need future implementation for ims_mode too    
-  if (option%iflowmode == MPH_MODE) then
-    do ghosted_id = 1, realization%patch%aux%Global%num_aux
-      auxvars(ghosted_id)%pres(:) = &
-        (weight*auxvars(ghosted_id)%pres_store(:,TIME_TpDT)+ &
-         (1.d0-weight)*auxvars(ghosted_id)%pres_store(:,TIME_T))
-      auxvars(ghosted_id)%temp(:) = &
-        (weight*auxvars(ghosted_id)%temp_store(:,TIME_TpDT)+ &
-         (1.d0-weight)*auxvars(ghosted_id)%temp_store(:,TIME_T))
-      auxvars(ghosted_id)%fugacoeff(:) = &
-        (weight*auxvars(ghosted_id)%fugacoeff_store(:,TIME_TpDT)+ &
-         (1.d0-weight)*auxvars(ghosted_id)%fugacoeff_store(:,TIME_T))
-      if (weight<1D-12) auxvars(ghosted_id)%reaction_rate(:)=0D0
-!      auxvars(ghosted_id)%den(:) = &
-!        (weight*auxvars(ghosted_id)%den_store(:,TIME_TpDT)+ &
-!         (1.d0-weight)*auxvars(ghosted_id)%den_store(:,TIME_T))
-    enddo     
-  endif 
-  if (option%iflowmode == FLASH2_MODE) then
-    do ghosted_id = 1, realization%patch%aux%Global%num_aux
-      auxvars(ghosted_id)%pres(:) = &
-        (weight*auxvars(ghosted_id)%pres_store(:,TIME_TpDT)+ &
-         (1.d0-weight)*auxvars(ghosted_id)%pres_store(:,TIME_T))
-      auxvars(ghosted_id)%temp(:) = &
-        (weight*auxvars(ghosted_id)%temp_store(:,TIME_TpDT)+ &
-         (1.d0-weight)*auxvars(ghosted_id)%temp_store(:,TIME_T))
-      auxvars(ghosted_id)%fugacoeff(:) = &
-        (weight*auxvars(ghosted_id)%fugacoeff_store(:,TIME_TpDT)+ &
-         (1.d0-weight)*auxvars(ghosted_id)%fugacoeff_store(:,TIME_T))
-      if (weight<1D-12) auxvars(ghosted_id)%reaction_rate(:)=0D0
-!      auxvars(ghosted_id)%den(:) = &
-!        (weight*auxvars(ghosted_id)%den_store(:,TIME_TpDT)+ &
-!         (1.d0-weight)*auxvars(ghosted_id)%den_store(:,TIME_T))
-    enddo     
-  endif
+  select case(option%iflowmode) 
+    case(G_MODE)
+      do ghosted_id = 1, realization%patch%aux%Global%num_aux
+        auxvars(ghosted_id)%pres(:) = &
+          (weight*auxvars(ghosted_id)%pres_store(:,TIME_TpDT)+ &
+           (1.d0-weight)*auxvars(ghosted_id)%pres_store(:,TIME_T))
+        auxvars(ghosted_id)%temp(:) = &
+          (weight*auxvars(ghosted_id)%temp_store(:,TIME_TpDT)+ &
+           (1.d0-weight)*auxvars(ghosted_id)%temp_store(:,TIME_T))
+      enddo  
+    case(MPH_MODE,FLASH2_MODE)
+      ! need future implementation for ims_mode too    
+      do ghosted_id = 1, realization%patch%aux%Global%num_aux
+        auxvars(ghosted_id)%pres(:) = &
+          (weight*auxvars(ghosted_id)%pres_store(:,TIME_TpDT)+ &
+           (1.d0-weight)*auxvars(ghosted_id)%pres_store(:,TIME_T))
+        auxvars(ghosted_id)%temp(:) = &
+          (weight*auxvars(ghosted_id)%temp_store(:,TIME_TpDT)+ &
+           (1.d0-weight)*auxvars(ghosted_id)%temp_store(:,TIME_T))
+        auxvars(ghosted_id)%fugacoeff(:) = &
+          (weight*auxvars(ghosted_id)%fugacoeff_store(:,TIME_TpDT)+ &
+           (1.d0-weight)*auxvars(ghosted_id)%fugacoeff_store(:,TIME_T))
+        if (weight<1D-12) auxvars(ghosted_id)%reaction_rate(:)=0D0
+  !      auxvars(ghosted_id)%den(:) = &
+  !        (weight*auxvars(ghosted_id)%den_store(:,TIME_TpDT)+ &
+  !         (1.d0-weight)*auxvars(ghosted_id)%den_store(:,TIME_T))
+      enddo  
+  end select
   
 end subroutine GlobalWeightAuxVars