diff --git a/src/config.f90 b/src/config.f90 index dda41a48f..cef6633ba 100644 --- a/src/config.f90 +++ b/src/config.f90 @@ -4,7 +4,6 @@ !> @details Reads the material configuration file, where solverJobName.materialConfig takes !! precedence over material.config. Stores the raw strings and the positions of delimiters for the !! parts 'homogenization', 'crystallite', 'phase', 'texture', and 'microstucture' -!! Reads numerics.config and debug.config !-------------------------------------------------------------------------------------------------- module config use prec @@ -50,11 +49,14 @@ subroutine config_init line, & part character(len=pStringLen), dimension(:), allocatable :: fileContent - logical :: fileExists + class(tNode), pointer :: & + debug_material + logical :: fileExists write(6,'(/,a)') ' <<<+- config init -+>>>'; flush(6) - verbose = iand(debug_level(debug_material),debug_levelBasic) /= 0 + debug_material => debug_root%get('material',defaultVal=emptyList) + verbose = debug_material%contains('basic') inquire(file=trim(getSolverJobName())//'.materialConfig',exist=fileExists) if(fileExists) then diff --git a/src/debug.f90 b/src/debug.f90 index 4ed5b1f46..82a2a8db1 100644 --- a/src/debug.f90 +++ b/src/debug.f90 @@ -17,10 +17,6 @@ module debug class(tNode), pointer, public :: & debug_root -#ifdef PETSc - character(len=1024), parameter, public :: & - PETSCDEBUG = ' -snes_view -snes_monitor ' -#endif public :: debug_init contains diff --git a/src/grid/spectral_utilities.f90 b/src/grid/spectral_utilities.f90 index 30329d6dc..273f0dabf 100644 --- a/src/grid/spectral_utilities.f90 +++ b/src/grid/spectral_utilities.f90 @@ -190,7 +190,8 @@ subroutine spectral_utilities_init vecSize = 3_C_INTPTR_T, & tensorSize = 9_C_INTPTR_T character(len=pStringLen) :: & - petsc_options + petsc_options, & + PETSCDEBUG = ' -snes_view -snes_monitor ' class (tNode) , pointer :: & num_grid, & num_generic, & diff --git a/src/homogenization.f90 b/src/homogenization.f90 index 3cc4dbbc1..4729933fe 100644 --- a/src/homogenization.f90 +++ b/src/homogenization.f90 @@ -491,7 +491,11 @@ subroutine partitionDeformation(subF,ip,el) integer, intent(in) :: & ip, & !< integration point el !< element number + class(tNode), pointer :: & + debug_homogenization + debug_homogenization => debug_root%get('homogenization',defaultVal=emptyList) + chosenHomogenization: select case(homogenization_type(material_homogenizationAt(el))) case (HOMOGENIZATION_NONE_ID) chosenHomogenization @@ -507,7 +511,7 @@ subroutine partitionDeformation(subF,ip,el) crystallite_partionedF(1:3,1:3,1:homogenization_Ngrains(material_homogenizationAt(el)),ip,el), & subF,& ip, & - el) + el,debug_homogenization) end select chosenHomogenization end subroutine partitionDeformation @@ -527,7 +531,11 @@ function updateState(subdt,subF,ip,el) ip, & !< integration point el !< element number logical, dimension(2) :: updateState - + class(tNode), pointer :: & + debug_homogenization + + debug_homogenization => debug_root%get('homogenization',defaultVal=emptyList) + updateState = .true. chosenHomogenization: select case(homogenization_type(material_homogenizationAt(el))) case (HOMOGENIZATION_RGC_ID) chosenHomogenization @@ -540,7 +548,7 @@ function updateState(subdt,subF,ip,el) subdt, & crystallite_dPdF(1:3,1:3,1:3,1:3,1:homogenization_Ngrains(material_homogenizationAt(el)),ip,el), & ip, & - el) + el,debug_homogenization) end select chosenHomogenization chosenThermal: select case (thermal_type(material_homogenizationAt(el))) diff --git a/src/marc/discretization_marc.f90 b/src/marc/discretization_marc.f90 index 8945c2c18..5b615494f 100644 --- a/src/marc/discretization_marc.f90 +++ b/src/marc/discretization_marc.f90 @@ -58,7 +58,8 @@ subroutine discretization_marc_init homogenizationAt integer:: & Nnodes, & !< total number of nodes in the mesh - Nelems !< total number of elements in the mesh + Nelems, & !< total number of elements in the mesh + debug_e, debug_i real(pReal), dimension(:,:), allocatable :: & IP_reshaped @@ -73,11 +74,19 @@ subroutine discretization_marc_init num_commercialFEM write(6,'(/,a)') ' <<<+- discretization_marc init -+>>>'; flush(6) - + +!--------------------------------------------------------------------------------- +! read debug parameters + debug_e = debug_root%get_asInt('element',defaultVal=1) + debug_i = debug_root%get_asInt('integrationpoint',defaultVal=1) + +!-------------------------------------------------------------------------------- +! read numerics parameter and do sanity check num_commercialFEM => numerics_root%get('commercialFEM',defaultVal = emptyDict) mesh_unitlength = num_commercialFEM%get_asFloat('unitlength',defaultVal=1.0_pReal) ! set physical extent of a length unit in mesh if (mesh_unitlength <= 0.0_pReal) call IO_error(301,ext_msg='unitlength') + call inputRead(elem,node0_elem,connectivity_elem,microstructureAt,homogenizationAt) nElems = size(connectivity_elem,2) diff --git a/src/mesh/FEM_utilities.f90 b/src/mesh/FEM_utilities.f90 index 3bced3b57..94b69c073 100644 --- a/src/mesh/FEM_utilities.f90 +++ b/src/mesh/FEM_utilities.f90 @@ -108,7 +108,8 @@ subroutine FEM_utilities_init debug_mesh integer :: structOrder !< order of displacement shape functions character(len=pStringLen) :: & - petsc_options + petsc_options, & + PETSCDEBUG = ' -snes_view -snes_monitor ' PetscErrorCode :: ierr write(6,'(/,a)') ' <<<+- DAMASK_FEM_utilities init -+>>>' diff --git a/src/source_damage_isoDuctile.f90 b/src/source_damage_isoDuctile.f90 index 8ba28ee1b..83be82300 100644 --- a/src/source_damage_isoDuctile.f90 +++ b/src/source_damage_isoDuctile.f90 @@ -8,6 +8,7 @@ module source_damage_isoDuctile use prec use debug use IO + use YAML_types use discretization use material use config diff --git a/src/source_thermal_dissipation.f90 b/src/source_thermal_dissipation.f90 index 3b08f7e25..e8dd2eddb 100644 --- a/src/source_thermal_dissipation.f90 +++ b/src/source_thermal_dissipation.f90 @@ -7,6 +7,7 @@ module source_thermal_dissipation use prec use debug + use YAML_types use discretization use material use config diff --git a/src/source_thermal_externalheat.f90 b/src/source_thermal_externalheat.f90 index 482de87de..65b11a499 100644 --- a/src/source_thermal_externalheat.f90 +++ b/src/source_thermal_externalheat.f90 @@ -7,6 +7,7 @@ module source_thermal_externalheat use prec use debug + use YAML_types use discretization use material use config