From 3bb5a5e7b5b670310259803b766ba9f955305ca7 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 8 Aug 2013 18:10:58 +0000 Subject: [PATCH] line too long in DAMASK_spectral_solverPolarisation.f90, reordered curl calculation for clearer look, fixed test for Marc 2013 --- code/DAMASK_spectral_solverPolarisation.f90 | 8 ++--- code/DAMASK_spectral_utilities.f90 | 38 ++++++++++----------- lib/damask/solver/marc.py | 4 +-- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/code/DAMASK_spectral_solverPolarisation.f90 b/code/DAMASK_spectral_solverPolarisation.f90 index 904efd9ee..c91182585 100644 --- a/code/DAMASK_spectral_solverPolarisation.f90 +++ b/code/DAMASK_spectral_solverPolarisation.f90 @@ -603,10 +603,10 @@ subroutine Polarisation_formResidual(in,x_scal,f_scal,dummy,ierr) e = 0_pInt do k = 1_pInt, grid(3); do j = 1_pInt, grid(2); do i = 1_pInt, grid(1) e = e + 1_pInt - residual_F(1:3,1:3,i,j,k) = math_mul3333xx33(math_invSym3333(materialpoint_dPdF(:,:,:,:,1,e) + C_scale), & - residual_F(1:3,1:3,i,j,k) - & - math_mul33x33(F(1:3,1:3,i,j,k), & - math_mul3333xx33(C_scale,F_tau(1:3,1:3,i,j,k) - F(1:3,1:3,i,j,k) - math_I3))) & + residual_F(1:3,1:3,i,j,k) = & + math_mul3333xx33(math_invSym3333(materialpoint_dPdF(:,:,:,:,1,e) + C_scale), residual_F(1:3,1:3,i,j,k) + - math_mul33x33(F(1:3,1:3,i,j,k), & + math_mul3333xx33(C_scale,F_tau(1:3,1:3,i,j,k) - F(1:3,1:3,i,j,k) - math_I3))) & + residual_F_tau(1:3,1:3,i,j,k) enddo; enddo; enddo diff --git a/code/DAMASK_spectral_utilities.f90 b/code/DAMASK_spectral_utilities.f90 index 73e7a584c..a46b13882 100644 --- a/code/DAMASK_spectral_utilities.f90 +++ b/code/DAMASK_spectral_utilities.f90 @@ -567,7 +567,7 @@ subroutine utilities_fourierConvolution(fieldAim) field_fourier(i,j,k, 1:3,1:3) = temp33_Complex enddo; enddo; enddo endif - field_fourier(1,1,1,1:3,1:3) = cmplx(fieldAim*real(product(grid),pReal),0.0_pReal,pReal) ! singular point at xi=(0.0,0.0,0.0) i.e. i=j=k=1 + field_fourier(1,1,1,1:3,1:3) = cmplx(fieldAim*real(product(grid),pReal),0.0_pReal,pReal) ! singular point at xi=(0.0,0.0,0.0) i.e. i=j=k=1 end subroutine utilities_fourierConvolution @@ -659,33 +659,33 @@ real(pReal) function utilities_curlRMS() do k = 1_pInt, grid(3); do j = 1_pInt, grid(2); do i = 2_pInt, grid1Red - 1_pInt do l = 1_pInt, 3_pInt - curl_fourier(l,1) = (field_fourier(i,j,k,l,3)*xi(2,i,j,k)& - - field_fourier(i,j,k,l,2)*xi(3,i,j,k))*TWOPIIMG - curl_fourier(l,2) = (-field_fourier(i,j,k,l,3)*xi(1,i,j,k)& - +field_fourier(i,j,k,l,1)*xi(3,i,j,k) )*TWOPIIMG - curl_fourier(l,3) = ( field_fourier(i,j,k,l,2)*xi(1,i,j,k)& - -field_fourier(i,j,k,l,1)*xi(2,i,j,k) )*TWOPIIMG + curl_fourier(l,1) = (+field_fourier(i,j,k,l,3)*xi(2,i,j,k)& + -field_fourier(i,j,k,l,2)*xi(3,i,j,k))*TWOPIIMG + curl_fourier(l,2) = (+field_fourier(i,j,k,l,1)*xi(3,i,j,k)& + -field_fourier(i,j,k,l,3)*xi(1,i,j,k))*TWOPIIMG + curl_fourier(l,3) = (+field_fourier(i,j,k,l,2)*xi(1,i,j,k)& + -field_fourier(i,j,k,l,1)*xi(2,i,j,k))*TWOPIIMG enddo utilities_curlRMS = utilities_curlRMS + & 2.0_pReal*sum(real(curl_fourier)**2.0_pReal + aimag(curl_fourier)**2.0_pReal) enddo do l = 1_pInt, 3_pInt - curl_fourier = (field_fourier(1,j,k,l,3)*xi(2,1,j,k)& - - field_fourier(1,j,k,l,2)*xi(3,1,j,k))*TWOPIIMG - curl_fourier = (-field_fourier(1,j,k,l,3)*xi(1,1,j,k)& - +field_fourier(1,j,k,l,1)*xi(3,1,j,k) )*TWOPIIMG - curl_fourier = ( field_fourier(1,j,k,l,2)*xi(1,1,j,k)& - -field_fourier(1,j,k,l,1)*xi(2,1,j,k) )*TWOPIIMG + curl_fourier = (+field_fourier(1,j,k,l,3)*xi(2,1,j,k)& + -field_fourier(1,j,k,l,2)*xi(3,1,j,k))*TWOPIIMG + curl_fourier = (+field_fourier(1,j,k,l,1)*xi(3,1,j,k)& + -field_fourier(1,j,k,l,3)*xi(1,1,j,k))*TWOPIIMG + curl_fourier = (+field_fourier(1,j,k,l,2)*xi(1,1,j,k)& + -field_fourier(1,j,k,l,1)*xi(2,1,j,k))*TWOPIIMG enddo utilities_curlRMS = utilities_curlRMS + & 2.0_pReal*sum(real(curl_fourier)**2.0_pReal + aimag(curl_fourier)**2.0_pReal) do l = 1_pInt, 3_pInt - curl_fourier = ( field_fourier(grid1Red,j,k,l,3)*xi(2,grid1Red,j,k)& - -field_fourier(grid1Red,j,k,l,2)*xi(3,grid1Red,j,k))*TWOPIIMG - curl_fourier = (-field_fourier(grid1Red,j,k,l,3)*xi(1,grid1Red,j,k)& - +field_fourier(grid1Red,j,k,l,1)*xi(3,grid1Red,j,k))*TWOPIIMG - curl_fourier = ( field_fourier(grid1Red,j,k,l,2)*xi(1,grid1Red,j,k)& - -field_fourier(grid1Red,j,k,l,1)*xi(2,grid1Red,j,k))*TWOPIIMG + curl_fourier = (+field_fourier(grid1Red,j,k,l,3)*xi(2,grid1Red,j,k)& + -field_fourier(grid1Red,j,k,l,2)*xi(3,grid1Red,j,k))*TWOPIIMG + curl_fourier = (+field_fourier(grid1Red,j,k,l,1)*xi(3,grid1Red,j,k)& + -field_fourier(grid1Red,j,k,l,3)*xi(1,grid1Red,j,k))*TWOPIIMG + curl_fourier = (+field_fourier(grid1Red,j,k,l,2)*xi(1,grid1Red,j,k)& + -field_fourier(grid1Red,j,k,l,1)*xi(2,grid1Red,j,k))*TWOPIIMG enddo utilities_curlRMS = utilities_curlRMS + & 2.0_pReal*sum(real(curl_fourier)**2.0_pReal + aimag(curl_fourier)**2.0_pReal) diff --git a/lib/damask/solver/marc.py b/lib/damask/solver/marc.py index cfb88f75b..ffd74c161 100644 --- a/lib/damask/solver/marc.py +++ b/lib/damask/solver/marc.py @@ -92,8 +92,8 @@ class Marc(Solver): # Define options [see Marc Installation and Operation Guide, pp 23] if int(release)>=2013: - script = 'run_damask%s'%({False:'',True:'_'}[len(optimization)>0 or openMP]) - script = 'run_damask%s%s'%({False:'',True:optimization}[len(optimization)>0],{False:'',True:'mp'}[openMP]) + script = 'run_damask%s'%({False:'',True:'_'}[optimization!='' or openMP]) + script = script+'%s%s'%({False:'',True:optimization}[optimization!=''],{False:'',True:'mp'}[openMP]) else: script = 'run_marc'