diff --git a/code/CPFEM.f90 b/code/CPFEM.f90 index b0a1aa96f..605517a2d 100644 --- a/code/CPFEM.f90 +++ b/code/CPFEM.f90 @@ -217,6 +217,7 @@ subroutine CPFEM_init enddo enddo; enddo; enddo close (777) +#endif call IO_read_realFile(777,'convergedStateHomog',modelName) m = 0_pInt @@ -227,7 +228,7 @@ subroutine CPFEM_init enddo enddo; enddo close (777) -#endif + call IO_read_realFile(777,'convergeddcsdE',modelName,size(CPFEM_dcsdE)) @@ -240,7 +241,7 @@ subroutine CPFEM_init write(6,'(a32,1x,6(i8,1x))') 'CPFEM_cs: ', shape(CPFEM_cs) write(6,'(a32,1x,6(i8,1x))') 'CPFEM_dcsdE: ', shape(CPFEM_dcsdE) write(6,'(a32,1x,6(i8,1x),/)') 'CPFEM_dcsdE_knownGood: ', shape(CPFEM_dcsdE_knownGood) - write(6,*) 'symmetricSolver: ', symmetricSolver + write(6,'(a32,l1)') 'symmetricSolver: ', symmetricSolver endif flush(6) @@ -440,6 +441,7 @@ subroutine CPFEM_general(mode, parallelExecution, ffn, ffn1, temperature, dt, el call IO_write_jobRealFile(777,'convergedTstar',size(crystallite_Tstar0_v)) write (777,rec=1) crystallite_Tstar0_v close (777) + #ifdef TODO call IO_write_jobRealFile(777,'convergedStateConst') m = 0_pInt @@ -451,6 +453,7 @@ subroutine CPFEM_general(mode, parallelExecution, ffn, ffn1, temperature, dt, el enddo; enddo; enddo close (777) #endif + call IO_write_jobRealFile(777,'convergedStateHomog') m = 0_pInt do k = 1,mesh_NcpElems; do j = 1,mesh_maxNips diff --git a/code/FEsolving.f90 b/code/FEsolving.f90 index 346c6c5dc..eb6b2a467 100644 --- a/code/FEsolving.f90 +++ b/code/FEsolving.f90 @@ -175,8 +175,8 @@ subroutine FE_init if (allocated(FEsolving_execIP)) deallocate(FEsolving_execIP) #endif if (iand(debug_level(debug_FEsolving),debug_levelBasic) /= 0_pInt) then - write(6,*) 'restart writing: ', restartWrite - write(6,*) 'restart reading: ', restartRead + write(6,'(a20,l1)') 'restart writing: ', restartWrite + write(6,'(a20,l1)') 'restart reading: ', restartRead if (restartRead) write(6,'(a,/)') 'restart Job: '//trim(modelName) endif diff --git a/code/Makefile b/code/Makefile index 05c728e5c..81bcdf8d2 100644 --- a/code/Makefile +++ b/code/Makefile @@ -20,25 +20,26 @@ SHELL = /bin/sh # SUFFIX = arbitrary suffix (after file to compile) # STANDARD_CHECK = checking for Fortran 2008, compiler dependend ######################################################################################## -ifneq ("","$(wildcard ${HOME}/.damask/damask.conf)") - include ${HOME}/.damask/damask.conf +ifneq ("","$(wildcard $(HOME)/.damask/damask.conf)") + include $(HOME)/.damask/damask.conf else include /etc/damask.conf endif COMPILERNAME ?= $(F90) +ifdef PETSC_DIR +include $(PETSC_DIR)/conf/variables +INCLUDE_DIRS :=$(PETSC_FC_INCLUDES) -DPETSc -I../lib +LIBRARIES :=$(PETSC_WITH_EXTERNAL_LIB) -lfftw3 +else INCLUDE_DIRS :=-I../lib -LIBRARIES :=-llapack -lfftw3 +LIBRARIES :=-lfftw3 +endif + LIB_DIRS :=-L$(FFTW_ROOT)/lib RUN_PATH :=-Wl,-rpath,$(FFTW_ROOT)/lib -ifdef PETSC_DIR -include ${PETSC_DIR}/conf/variables -INCLUDE_DIRS +=${PETSC_FC_INCLUDES} -DPETSc -LIBRARIES +=${PETSC_WITH_EXTERNAL_LIB} -endif - ifeq "$(FASTBUILD)" "YES" OPENMP := OFF OPTIMIZATION := OFF @@ -365,7 +366,7 @@ endif DAMASK_spectral.exe: DAMASK_spectral_driver.o $(PREFIX) $(COMPILERNAME) $(OPENMP_FLAG_$(F90)) $(LINK_OPTIONS_$(F90)) $(STANDARD_CHECK_$(F90)) $(OPTIMIZATION_$(MAXOPTI)_$(F90)) \ -o DAMASK_spectral.exe DAMASK_spectral_driver.o \ - $(COMPILED_FILES) $(LIB_DIRS) $(RUN_PATH) $(LIBRARIES) $(SUFFIX) + $(COMPILED_FILES) $(LIBRARIES) $(LIB_DIRS) $(RUN_PATH) $(SUFFIX) DAMASK_spectral_driver.o: DAMASK_spectral_driver.f90 DAMASK_spectral_solverBasic.o $(PETSC_FILES) $(PREFIX) $(COMPILERNAME) $(COMPILE_MAXOPTI) -c DAMASK_spectral_driver.f90 $(SUFFIX) diff --git a/code/crystallite.f90 b/code/crystallite.f90 index d51cc5578..c4136de42 100644 --- a/code/crystallite.f90 +++ b/code/crystallite.f90 @@ -2793,15 +2793,15 @@ eIter = FEsolving_execElem(1:2) * crystallite_subdt(g,i,e) #ifndef _OPENMP -#ifdef TODO if (iand(debug_level(debug_crystallite), debug_levelExtensive) /= 0_pInt & .and. ((e == debug_e .and. i == debug_i .and. g == debug_g) & .or. .not. iand(debug_level(debug_crystallite), debug_levelSelective) /= 0_pInt)) then + p = mappingConstitutive(2,g,i,e) + c = mappingConstitutive(1,g,i,e) write(6,'(a,i8,1x,i2,1x,i3,/)') '<< CRYST >> update state at el ip g ',e,i,g - write(6,'(a,/,(12x,12(e12.5,1x)),/)') '<< CRYST >> dotState', constitutive_dotState(g,i,e)%p(1:mySizeDotState) - write(6,'(a,/,(12x,12(e12.5,1x)),/)') '<< CRYST >> new state', constitutive_state(g,i,e)%p(1:mySizeDotState) + write(6,'(a,/,(12x,12(e12.5,1x)),/)') '<< CRYST >> dotState', plasticState(p)%dotState (1:mySizePlasticDotState,c) + write(6,'(a,/,(12x,12(e12.5,1x)),/)') '<< CRYST >> new state', plasticState(p)%state (1:mySizePlasticDotState,c) endif -#endif #endif endif enddo; enddo; enddo @@ -3414,17 +3414,18 @@ logical function crystallite_stateJump(g,i,e) endif plasticState(p)%state(1:mySizePlasticDotState,c) = plasticState(p)%state(1:mySizePlasticDotState,c) + & plasticState(p)%deltaState(1:mySizePlasticDotState,c) -#ifdef TODO + #ifndef _OPENMP - if (any(constitutive_deltaState(g,i,e)%p(1:mySizeDotState) /= 0.0_pReal) & + p = mappingConstitutive(2,g,i,e) + c = mappingConstitutive(1,g,i,e) + if (any(plasticState(p)%deltaState(1:mySizePlasticDotState,c) /= 0.0_pReal) & .and. iand(debug_level(debug_crystallite), debug_levelExtensive) /= 0_pInt & .and. ((e == debug_e .and. i == debug_i .and. g == debug_g) & .or. .not. iand(debug_level(debug_crystallite), debug_levelSelective) /= 0_pInt)) then write(6,'(a,i8,1x,i2,1x,i3, /)') '<< CRYST >> update state at el ip g ',e,i,g - write(6,'(a,/,(12x,12(e12.5,1x)),/)') '<< CRYST >> deltaState', constitutive_deltaState(g,i,e)%p(1:mySizeDotState) - write(6,'(a,/,(12x,12(e12.5,1x)),/)') '<< CRYST >> new state', constitutive_state(g,i,e)%p(1:mySizeDotState) + write(6,'(a,/,(12x,12(e12.5,1x)),/)') '<< CRYST >> deltaState', plasticState(p)%deltaState(1:mySizePlasticDotState,c) + write(6,'(a,/,(12x,12(e12.5,1x)),/)') '<< CRYST >> new state', plasticState(p)%state (1:mySizePlasticDotState,c) endif -#endif #endif endif