From bd67296e8d476d3a310b3bb2f70379c9d0a9dfb5 Mon Sep 17 00:00:00 2001 From: Vitesh Shah Date: Thu, 22 Oct 2020 11:48:06 +0200 Subject: [PATCH 01/13] MARC_VERSION as MSCVERSION --- installation/mods_MarcMentat/apply_DAMASK_modifications.py | 6 +++--- python/damask/_environment.py | 2 +- python/damask/solver/_marc.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/installation/mods_MarcMentat/apply_DAMASK_modifications.py b/installation/mods_MarcMentat/apply_DAMASK_modifications.py index 38a6078b3..ef0001074 100755 --- a/installation/mods_MarcMentat/apply_DAMASK_modifications.py +++ b/installation/mods_MarcMentat/apply_DAMASK_modifications.py @@ -7,7 +7,7 @@ from pathlib import Path import damask -marc_version = float(damask.environment.options['MARC_VERSION']) +marc_version = float(damask.environment.options['MSCVERSION']) if int(marc_version) == marc_version: marc_version = int(marc_version) msc_root = Path(damask.environment.options['MSC_ROOT']) @@ -15,7 +15,7 @@ damask_root = damask.environment.root_dir parser = argparse.ArgumentParser( description='Apply DAMASK modification to MSC.Marc/Mentat', - epilog = f'MSC_ROOT={msc_root} and MARC_VERSION={marc_version} (from {damask_root}/env/CONFIG)') + epilog = f'MSC_ROOT={msc_root} and MSCVERSION={marc_version} (from {damask_root}/env/CONFIG)') parser.add_argument('--editor', dest='editor', metavar='string', default='vi', help='Name of the editor for MSC.Mentat (executable)') @@ -23,7 +23,7 @@ parser.add_argument('--editor', dest='editor', metavar='string', default='vi', def copy_and_replace(in_file,dst): with open(in_file) as f: content = f.read() - content = content.replace('%INSTALLDIR%',msc_root) + content = content.replace('%INSTALLDIR%',str(msc_root)) content = content.replace('%VERSION%',str(marc_version)) content = content.replace('%EDITOR%', parser.parse_args().editor) with open(dst/Path(in_file).name,'w') as f: diff --git a/python/damask/_environment.py b/python/damask/_environment.py index d4b7abe51..d3629de31 100644 --- a/python/damask/_environment.py +++ b/python/damask/_environment.py @@ -32,7 +32,7 @@ class Environment: options = {} for item in ['DAMASK_NUM_THREADS', 'MSC_ROOT', - 'MARC_VERSION', + 'MSCVERSION', ]: options[item] = os.environ[item] if item in os.environ else None diff --git a/python/damask/solver/_marc.py b/python/damask/solver/_marc.py index 12e36f7ed..29e7fe671 100644 --- a/python/damask/solver/_marc.py +++ b/python/damask/solver/_marc.py @@ -8,7 +8,7 @@ from .. import environment class Marc: """Wrapper to run DAMASK with MSCMarc.""" - def __init__(self,version=environment.options['MARC_VERSION']): + def __init__(self,version=environment.options['MSCVERSION']): """ Create a Marc solver object. From a4fe71531933be767b37a60f9b337f3c5b7f22d9 Mon Sep 17 00:00:00 2001 From: Franz Roters Date: Fri, 23 Oct 2020 15:33:01 +0200 Subject: [PATCH 02/13] removed unnecessary variables --- src/crystallite.f90 | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/crystallite.f90 b/src/crystallite.f90 index dc6b9f7da..05c409baa 100644 --- a/src/crystallite.f90 +++ b/src/crystallite.f90 @@ -315,7 +315,6 @@ function crystallite_stress() c, & !< counter in integration point component loop i, & !< counter in integration point loop e, & !< counter in element loop - startIP, endIP, & s logical, dimension(homogenization_maxNgrains,discretization_nIP,discretization_nElem) :: todo !ToDo: need to set some values to false for different Ngrains real(pReal), dimension(:,:,:,:,:), allocatable :: & @@ -356,17 +355,8 @@ function crystallite_stress() enddo elementLooping1 !$OMP END PARALLEL DO - singleRun: if (FEsolving_execELem(1) == FEsolving_execElem(2) .and. & - FEsolving_execIP (1) == FEsolving_execIP (2)) then - startIP = FEsolving_execIP(1) - endIP = startIP - else singleRun - startIP = 1 - endIP = discretization_nIP - endif singleRun - NiterationCrystallite = 0 - cutbackLooping: do while (any(todo(:,startIP:endIP,FEsolving_execELem(1):FEsolving_execElem(2)))) + cutbackLooping: do while (any(todo(:,FEsolving_execIP(1):FEsolving_execIP(2),FEsolving_execELem(1):FEsolving_execElem(2)))) NiterationCrystallite = NiterationCrystallite + 1 #ifdef DEBUG From 209367df0e83e508e3a1e010ba3e41dc542a8af0 Mon Sep 17 00:00:00 2001 From: Franz Roters Date: Fri, 23 Oct 2020 15:41:51 +0200 Subject: [PATCH 03/13] save one inversion --- src/crystallite.f90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/crystallite.f90 b/src/crystallite.f90 index 05c409baa..82c485625 100644 --- a/src/crystallite.f90 +++ b/src/crystallite.f90 @@ -418,9 +418,9 @@ function crystallite_stress() crystallite_subF(1:3,1:3,c,i,e) = crystallite_subF0(1:3,1:3,c,i,e) & + crystallite_subStep(c,i,e) *( crystallite_partitionedF (1:3,1:3,c,i,e) & -crystallite_partitionedF0(1:3,1:3,c,i,e)) - crystallite_Fe(1:3,1:3,c,i,e) = matmul(matmul(crystallite_subF(1:3,1:3,c,i,e), & - math_inv33(crystallite_Fp(1:3,1:3,c,i,e))), & - math_inv33(crystallite_Fi(1:3,1:3,c,i,e))) + crystallite_Fe(1:3,1:3,c,i,e) = matmul(crystallite_subF(1:3,1:3,c,i,e), & + math_inv33(matmul(crystallite_Fi(1:3,1:3,c,i,e), & + crystallite_Fp(1:3,1:3,c,i,e)))) crystallite_subdt(c,i,e) = crystallite_subStep(c,i,e) * crystallite_dt(c,i,e) crystallite_converged(c,i,e) = .false. call integrateState(c,i,e) From a6f6166fa96f261b403bb7904d153f8d07454f52 Mon Sep 17 00:00:00 2001 From: Franz Roters Date: Fri, 23 Oct 2020 16:11:33 +0200 Subject: [PATCH 04/13] is set in CPFEM (doing only single IPs in commercial FEM) --- src/marc/discretization_marc.f90 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/marc/discretization_marc.f90 b/src/marc/discretization_marc.f90 index 9696572e5..c462da94b 100644 --- a/src/marc/discretization_marc.f90 +++ b/src/marc/discretization_marc.f90 @@ -12,7 +12,6 @@ module discretization_marc use DAMASK_interface use IO use config - use FEsolving use element use discretization use geometry_plastic_nonlocal @@ -89,9 +88,6 @@ subroutine discretization_marc_init if (debug_e < 1 .or. debug_e > nElems) call IO_error(602,ext_msg='element') if (debug_i < 1 .or. debug_i > elem%nIPs) call IO_error(602,ext_msg='IP') - FEsolving_execElem = [1,nElems] - FEsolving_execIP = [1,elem%nIPs] - allocate(cellNodeDefinition(elem%nNodes-1)) allocate(connectivity_cell(elem%NcellNodesPerCell,elem%nIPs,nElems)) call buildCells(connectivity_cell,cellNodeDefinition,& From e675cec6326dce6ef202f179057568cb2f924062 Mon Sep 17 00:00:00 2001 From: Franz Roters Date: Fri, 23 Oct 2020 17:36:41 +0200 Subject: [PATCH 05/13] improved indentation --- src/crystallite.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crystallite.f90 b/src/crystallite.f90 index 82c485625..d12b361d0 100644 --- a/src/crystallite.f90 +++ b/src/crystallite.f90 @@ -420,7 +420,7 @@ function crystallite_stress() -crystallite_partitionedF0(1:3,1:3,c,i,e)) crystallite_Fe(1:3,1:3,c,i,e) = matmul(crystallite_subF(1:3,1:3,c,i,e), & math_inv33(matmul(crystallite_Fi(1:3,1:3,c,i,e), & - crystallite_Fp(1:3,1:3,c,i,e)))) + crystallite_Fp(1:3,1:3,c,i,e)))) crystallite_subdt(c,i,e) = crystallite_subStep(c,i,e) * crystallite_dt(c,i,e) crystallite_converged(c,i,e) = .false. call integrateState(c,i,e) From 0c51c3d8d484f08e7ff15f22b482bd25d1e47711 Mon Sep 17 00:00:00 2001 From: Franz Roters Date: Tue, 27 Oct 2020 12:56:49 +0100 Subject: [PATCH 06/13] still needed during initialization --- src/marc/discretization_marc.f90 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/marc/discretization_marc.f90 b/src/marc/discretization_marc.f90 index c462da94b..9696572e5 100644 --- a/src/marc/discretization_marc.f90 +++ b/src/marc/discretization_marc.f90 @@ -12,6 +12,7 @@ module discretization_marc use DAMASK_interface use IO use config + use FEsolving use element use discretization use geometry_plastic_nonlocal @@ -88,6 +89,9 @@ subroutine discretization_marc_init if (debug_e < 1 .or. debug_e > nElems) call IO_error(602,ext_msg='element') if (debug_i < 1 .or. debug_i > elem%nIPs) call IO_error(602,ext_msg='IP') + FEsolving_execElem = [1,nElems] + FEsolving_execIP = [1,elem%nIPs] + allocate(cellNodeDefinition(elem%nNodes-1)) allocate(connectivity_cell(elem%NcellNodesPerCell,elem%nIPs,nElems)) call buildCells(connectivity_cell,cellNodeDefinition,& From 904c338b136660283de355e052cdf1923a1e81d7 Mon Sep 17 00:00:00 2001 From: Vitesh Shah Date: Thu, 29 Oct 2020 15:21:40 +0100 Subject: [PATCH 07/13] Reflect version underscore of installation files --- installation/mods_MarcMentat/apply_DAMASK_modifications.py | 4 ++-- python/damask/_environment.py | 2 +- python/damask/solver/_marc.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/installation/mods_MarcMentat/apply_DAMASK_modifications.py b/installation/mods_MarcMentat/apply_DAMASK_modifications.py index ef0001074..51f5e2312 100755 --- a/installation/mods_MarcMentat/apply_DAMASK_modifications.py +++ b/installation/mods_MarcMentat/apply_DAMASK_modifications.py @@ -7,7 +7,7 @@ from pathlib import Path import damask -marc_version = float(damask.environment.options['MSCVERSION']) +marc_version = float(damask.environment.options['MSC_VERSION']) if int(marc_version) == marc_version: marc_version = int(marc_version) msc_root = Path(damask.environment.options['MSC_ROOT']) @@ -15,7 +15,7 @@ damask_root = damask.environment.root_dir parser = argparse.ArgumentParser( description='Apply DAMASK modification to MSC.Marc/Mentat', - epilog = f'MSC_ROOT={msc_root} and MSCVERSION={marc_version} (from {damask_root}/env/CONFIG)') + epilog = f'MSC_ROOT={msc_root} and MSC_VERSION={marc_version} (from {damask_root}/env/CONFIG)') parser.add_argument('--editor', dest='editor', metavar='string', default='vi', help='Name of the editor for MSC.Mentat (executable)') diff --git a/python/damask/_environment.py b/python/damask/_environment.py index d3629de31..9983a91aa 100644 --- a/python/damask/_environment.py +++ b/python/damask/_environment.py @@ -32,7 +32,7 @@ class Environment: options = {} for item in ['DAMASK_NUM_THREADS', 'MSC_ROOT', - 'MSCVERSION', + 'MSC_VERSION', ]: options[item] = os.environ[item] if item in os.environ else None diff --git a/python/damask/solver/_marc.py b/python/damask/solver/_marc.py index 29e7fe671..e37a46488 100644 --- a/python/damask/solver/_marc.py +++ b/python/damask/solver/_marc.py @@ -8,7 +8,7 @@ from .. import environment class Marc: """Wrapper to run DAMASK with MSCMarc.""" - def __init__(self,version=environment.options['MSCVERSION']): + def __init__(self,version=environment.options['MSC_VERSION']): """ Create a Marc solver object. From 680799ae5a213442a2f3fdc63cc23711f90d5316 Mon Sep 17 00:00:00 2001 From: Vitesh Shah Date: Thu, 29 Oct 2020 16:19:11 +0100 Subject: [PATCH 08/13] updated private --- PRIVATE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PRIVATE b/PRIVATE index 1e8c66897..e02d78d1a 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 1e8c66897820468ab46958d995005e2b69204d0e +Subproject commit e02d78d1ad4bef7a85c8895c97cb78871e8faad2 From 8e68b4f5d38071db42d1653c6f65fa53a36fd476 Mon Sep 17 00:00:00 2001 From: Vitesh Shah Date: Fri, 30 Oct 2020 11:46:15 +0100 Subject: [PATCH 09/13] environment should adhere to MSC_VERSION naming --- env/CONFIG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env/CONFIG b/env/CONFIG index 380197583..5d92af7fa 100644 --- a/env/CONFIG +++ b/env/CONFIG @@ -2,4 +2,4 @@ set DAMASK_NUM_THREADS = 4 set MSC_ROOT = /opt/msc -set MARC_VERSION = 2019.1 +set MSC_VERSION = 2019.1 From 9fa0528b85449197a375cf63f6e3c9122e25361a Mon Sep 17 00:00:00 2001 From: Vitesh Shah Date: Fri, 30 Oct 2020 11:56:37 +0100 Subject: [PATCH 10/13] More tests in PRIVATE using MSC_VERSION --- PRIVATE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PRIVATE b/PRIVATE index e02d78d1a..e0cee6bda 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit e02d78d1ad4bef7a85c8895c97cb78871e8faad2 +Subproject commit e0cee6bda1e3819563618113f5a46ae6ccaf026b From b401e48879d7a046b90c25ab70234dd849bf4a28 Mon Sep 17 00:00:00 2001 From: Franz Roters Date: Fri, 30 Oct 2020 17:48:12 +0100 Subject: [PATCH 11/13] upadted tests --- PRIVATE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PRIVATE b/PRIVATE index 3112a4dbf..901db0099 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 3112a4dbfa1e926c07b7f9443161239b8a7e85ca +Subproject commit 901db00995bf4dec47562814bc0b105d7eb75683 From 657d7b06b071ce49b0b1eee43787ada5b01847f4 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 31 Oct 2020 08:28:55 +0100 Subject: [PATCH 12/13] out of sync PRIVATE caused tests to fail --- PRIVATE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PRIVATE b/PRIVATE index 901db0099..fb8647f77 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 901db00995bf4dec47562814bc0b105d7eb75683 +Subproject commit fb8647f77aeb52098605f0fd7fe95764e6d26027 From 7df3563ced9290bd277bcebfaca60d7e0550bbe0 Mon Sep 17 00:00:00 2001 From: Test User Date: Sat, 31 Oct 2020 11:30:09 +0100 Subject: [PATCH 13/13] [skip ci] updated version information after successful test of v3.0.0-alpha-609-g657d7b06b --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 002deaea7..9d16c2ea2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v3.0.0-alpha-594-g46e5023f8 +v3.0.0-alpha-609-g657d7b06b