From 6a2c1077235f18d530716b5ad1473c1026f7e1cd Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 26 Mar 2021 12:34:16 +0100 Subject: [PATCH] consistent names for debugging --- examples/config/debug.yaml | 15 +++++---------- src/DAMASK_Marc.f90 | 2 +- src/grid/spectral_utilities.f90 | 12 ++++++------ src/mesh/FEM_utilities.f90 | 6 +++--- 4 files changed, 15 insertions(+), 20 deletions(-) diff --git a/examples/config/debug.yaml b/examples/config/debug.yaml index 49e863695..a28c04320 100644 --- a/examples/config/debug.yaml +++ b/examples/config/debug.yaml @@ -1,20 +1,15 @@ -### debugging parameters ### -## case sensitive keys -# example: -# -------- -# mesh: [basic, extensive] # switches on the "basic" and "extensive" debugging in mesh-related functions/subroutines -# - -mesh: [basic,extensive] # mesh.f90, possible value: basic, extensive material: [basic, extensive] # material.f90, possible values: basic, extensive constitutive: [basic, extensive, selective] # constitutive_*.f90 possible values: basic, extensive, selective crystallite: [basic, extensive, selective] # crystallite.f90 possible values: basic, extensive, selective homogenization: [basic, extensive, selective] # homogenization_*.f90 possible values: basic, extensive, selective cpfem: [basic, extensive, selective] # CPFEM.f90 possible values: basic, extensive, selective -grid: [basic, fft, restart, divergence, rotation, petsc] # DAMASK_spectral.f90 possible values: basic, fft, restart, divergence, rotation, petsc -marc: [basic] # MSC.MARC FEM solver possible values: basic # # Parameters for selective element: 1 # selected element for debugging integrationpoint: 1 # selected integration point for debugging grain: 1 # selected grain at ip for debugging + +# solver-specific +mesh: [basic] +grid: [basic, rotation, PETSc] +Marc: [basic] diff --git a/src/DAMASK_Marc.f90 b/src/DAMASK_Marc.f90 index c295de1ee..68265dbdb 100644 --- a/src/DAMASK_Marc.f90 +++ b/src/DAMASK_Marc.f90 @@ -256,7 +256,7 @@ subroutine hypela2(d,g,e,de,s,t,dt,ngens,m,nn,kcus,matus,ndi,nshear,disp, & if (.not. CPFEM_init_done) then CPFEM_init_done = .true. call CPFEM_initAll - debug_Marc => config_debug%get('marc',defaultVal=emptyList) + debug_Marc => config_debug%get('Marc',defaultVal=emptyList) debug_basic = debug_Marc%contains('basic') endif diff --git a/src/grid/spectral_utilities.f90 b/src/grid/spectral_utilities.f90 index 97801cfb3..f512d9b6c 100644 --- a/src/grid/spectral_utilities.f90 +++ b/src/grid/spectral_utilities.f90 @@ -190,25 +190,25 @@ subroutine spectral_utilities_init !-------------------------------------------------------------------------------------------------- ! set debugging parameters + num_grid => config_numerics%get('grid',defaultVal=emptyDict) + debug_grid => config_debug%get('grid',defaultVal=emptyList) debugGeneral = debug_grid%contains('basic') debugRotation = debug_grid%contains('rotation') - debugPETSc = debug_grid%contains('petsc') - + debugPETSc = debug_grid%contains('PETSc') if(debugPETSc) print'(3(/,a),/)', & ' Initializing PETSc with debug options: ', & trim(PETScDebug), & - ' add more using the PETSc_Options keyword in numerics.yaml '; flush(IO_STDOUT) - - num_grid => config_numerics%get('grid',defaultVal=emptyDict) + ' add more using the "PETSc_options" keyword in numerics.yaml' + flush(IO_STDOUT) call PetscOptionsClear(PETSC_NULL_OPTIONS,ierr) CHKERRQ(ierr) if(debugPETSc) call PetscOptionsInsertString(PETSC_NULL_OPTIONS,trim(PETSCDEBUG),ierr) CHKERRQ(ierr) call PetscOptionsInsertString(PETSC_NULL_OPTIONS,& - num_grid%get_asString('petsc_options',defaultVal=''),ierr) + num_grid%get_asString('PETSc_options',defaultVal=''),ierr) CHKERRQ(ierr) grid1Red = grid(1)/2 + 1 diff --git a/src/mesh/FEM_utilities.f90 b/src/mesh/FEM_utilities.f90 index 4b3be8a42..a84e3559f 100644 --- a/src/mesh/FEM_utilities.f90 +++ b/src/mesh/FEM_utilities.f90 @@ -116,12 +116,12 @@ subroutine FEM_utilities_init structOrder = num_mesh%get_asInt('structOrder', defaultVal = 2) debug_mesh => config_debug%get('mesh',defaultVal=emptyList) - debugPETSc = debug_mesh%contains('petsc') + debugPETSc = debug_mesh%contains('PETSc') if(debugPETSc) print'(3(/,a),/)', & ' Initializing PETSc with debug options: ', & trim(PETScDebug), & - ' add more using the PETSc_Options keyword in numerics.yaml ' + ' add more using the "PETSc_options" keyword in numerics.yaml' flush(IO_STDOUT) call PetscOptionsClear(PETSC_NULL_OPTIONS,ierr) CHKERRQ(ierr) @@ -134,7 +134,7 @@ subroutine FEM_utilities_init &-mechanical_pc_type ml -mechanical_mg_levels_ksp_type chebyshev & &-mechanical_mg_levels_pc_type sor -mechanical_pc_ml_nullspace user',ierr) CHKERRQ(ierr) - call PetscOptionsInsertString(PETSC_NULL_OPTIONS,num_mesh%get_asString('petsc_options',defaultVal=''),ierr) + call PetscOptionsInsertString(PETSC_NULL_OPTIONS,num_mesh%get_asString('PETSc_options',defaultVal=''),ierr) CHKERRQ(ierr) write(petsc_optionsOrder,'(a,i0)') '-mechFE_petscspace_degree ', structOrder call PetscOptionsInsertString(PETSC_NULL_OPTIONS,trim(petsc_optionsOrder),ierr)