From c8835947dbddab826945e76187a617245eb6b00c Mon Sep 17 00:00:00 2001 From: Test User Date: Fri, 24 Jan 2020 22:16:33 +0100 Subject: [PATCH 01/12] [skip ci] updated version information after successful test of v2.0.3-1545-ge63c9b94 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 3339b66fc..8dda7a7de 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.3-1531-g3d6ec695 +v2.0.3-1545-ge63c9b94 From 2100742a31a93365adb2c4adf4b4b7d0d3602179 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 26 Jan 2020 08:17:25 +0100 Subject: [PATCH 02/12] better have no support then untested support --- src/mesh_marc.f90 | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/mesh_marc.f90 b/src/mesh_marc.f90 index 22f978609..869677b19 100644 --- a/src/mesh_marc.f90 +++ b/src/mesh_marc.f90 @@ -561,26 +561,23 @@ subroutine inputRead_elemType(elem, & select case (IO_lc(what)) case ( '6') mapElemtype = 1 ! Two-dimensional Plane Strain Triangle - case ( '155', & - '125', & - '128') + case ( '125') ! 155, 128 (need test) mapElemtype = 2 ! Two-dimensional Plane Strain triangle (155: cubic shape function, 125/128: second order isoparametric) - case ( '11') - mapElemtype = 3 ! Arbitrary Quadrilateral Plane-strain + !case ( '11') ! need test + ! mapElemtype = 3 ! Arbitrary Quadrilateral Plane-strain case ( '27') mapElemtype = 4 ! Plane Strain, Eight-node Distorted Quadrilateral case ( '54') mapElemtype = 5 ! Plane Strain, Eight-node Distorted Quadrilateral with reduced integration - case ( '134') - mapElemtype = 6 ! Three-dimensional Four-node Tetrahedron - case ( '157') - mapElemtype = 7 ! Three-dimensional, Low-order, Tetrahedron, Herrmann Formulations - case ( '127') - mapElemtype = 8 ! Three-dimensional Ten-node Tetrahedron - case ( '136') - mapElemtype = 9 ! Three-dimensional Arbitrarily Distorted Pentahedral - case ( '117', & - '123') + !case ( '134') ! need test + ! mapElemtype = 6 ! Three-dimensional Four-node Tetrahedron + !case ( '157') ! need test + ! mapElemtype = 7 ! Three-dimensional, Low-order, Tetrahedron, Herrmann Formulations + !case ( '127') ! need test + ! mapElemtype = 8 ! Three-dimensional Ten-node Tetrahedron + !case ( '136') ! need test + ! mapElemtype = 9 ! Three-dimensional Arbitrarily Distorted Pentahedral + case ( '117') ! 123 (need test) mapElemtype = 10 ! Three-dimensional Arbitrarily Distorted linear hexahedral with reduced integration case ( '7') mapElemtype = 11 ! Three-dimensional Arbitrarily Distorted Brick From 7671e257bd489704a015fb7d1f9b568691fdfa04 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 26 Jan 2020 08:17:59 +0100 Subject: [PATCH 03/12] reorder elem 11 (Marc 7) to match 12 (Marc 57) --- src/element.f90 | 92 +++++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 45 deletions(-) diff --git a/src/element.f90 b/src/element.f90 index a38036f93..023259c9b 100644 --- a/src/element.f90 +++ b/src/element.f90 @@ -482,33 +482,34 @@ module element integer, dimension(NNODE(11),NCELLNODE(GEOMTYPE(11))), parameter :: CELLNODEPARENTNODEWEIGHTS11 = & reshape([& - 1, 0, 0, 0, 0, 0, 0, 0, & ! - 0, 1, 0, 0, 0, 0, 0, 0, & ! - 0, 0, 1, 0, 0, 0, 0, 0, & ! - 0, 0, 0, 1, 0, 0, 0, 0, & ! + 1, 0, 0, 0, 0, 0, 0, 0, & ! 1 + 0, 1, 0, 0, 0, 0, 0, 0, & ! 2 + 0, 0, 1, 0, 0, 0, 0, 0, & ! 3 + 0, 0, 0, 1, 0, 0, 0, 0, & ! 4 0, 0, 0, 0, 1, 0, 0, 0, & ! 5 - 0, 0, 0, 0, 0, 1, 0, 0, & ! - 0, 0, 0, 0, 0, 0, 1, 0, & ! - 0, 0, 0, 0, 0, 0, 0, 1, & ! - 1, 1, 0, 0, 0, 0, 0, 0, & ! + 0, 0, 0, 0, 0, 1, 0, 0, &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0, 1, 1, 1, 1, & ! 26 + 1, 1, 1, 1, 1, 1, 1, 1 & ! 27 #if !defined(__GFORTRAN__) ],shape(CELLNODEPARENTNODEWEIGHTS11)) !< 3D 8node 8ip #else @@ -517,33 +518,34 @@ module element integer, dimension(NNODE(12),NCELLNODE(GEOMTYPE(12))), parameter :: CELLNODEPARENTNODEWEIGHTS12 = & reshape([& - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, & ! - 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, & ! - 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, & ! - 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, & ! + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, & ! 1 + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, & ! 2 + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, & ! 3 + 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, & ! 4 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, & ! 5 - 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, & ! - 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, & ! - 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, & ! - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0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! 24 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 2, 2, 0, 0, 2, & ! 25 - 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, & ! - 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 & ! + 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, & ! 26 + 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 & ! 27 #if !defined(__GFORTRAN__) ],shape(CELLNODEPARENTNODEWEIGHTS12)) !< 3D 20node 8ip #else From b16f4155d487741c20088bb5256f7cf50e05650d Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 26 Jan 2020 09:06:45 +0100 Subject: [PATCH 04/12] cell definition follows correct order for 11/12 (7/57 in MSC.Marc) --- src/element.f90 | 64 ++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/src/element.f90 b/src/element.f90 index 023259c9b..91b687c2e 100644 --- a/src/element.f90 +++ b/src/element.f90 @@ -482,34 +482,34 @@ module element integer, dimension(NNODE(11),NCELLNODE(GEOMTYPE(11))), parameter :: CELLNODEPARENTNODEWEIGHTS11 = & reshape([& - 1, 0, 0, 0, 0, 0, 0, 0, & ! 1 - 0, 1, 0, 0, 0, 0, 0, 0, & ! 2 - 0, 0, 1, 0, 0, 0, 0, 0, & ! 3 - 0, 0, 0, 1, 0, 0, 0, 0, & ! 4 + 1, 0, 0, 0, 0, 0, 0, 0, & ! + 0, 1, 0, 0, 0, 0, 0, 0, & ! + 0, 0, 1, 0, 0, 0, 0, 0, & ! + 0, 0, 0, 1, 0, 0, 0, 0, & ! 0, 0, 0, 0, 1, 0, 0, 0, & ! 5 - 0, 0, 0, 0, 0, 1, 0, 0, & ! 6 - 0, 0, 0,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! + 1, 1, 0, 0, 1, 1, 0, 0, & ! + 0, 1, 1, 0, 0, 1, 1, 0, & ! + 0, 0, 1, 1, 0, 0, 1, 1, & ! 1, 0, 0, 1, 1, 0, 0, 1, & ! 25 - 0, 0, 0, 0, 1, 1, 1, 1, & ! 26 - 1, 1, 1, 1, 1, 1, 1, 1 & ! 27 + 0, 0, 0, 0, 1, 1, 1, 1, & ! + 1, 1, 1, 1, 1, 1, 1, 1 & ! #if !defined(__GFORTRAN__) ],shape(CELLNODEPARENTNODEWEIGHTS11)) !< 3D 8node 8ip #else @@ -720,14 +720,14 @@ module element integer, dimension(NCELLNODEPERCELL(CELLTYPE(9)),NIP(9)), parameter :: CELL9 = & reshape([& - 1, 9,21,12,13,22,27,25, & - 9, 2,10,21,22,14,23,27, & - 12,21,11, 4,25,27,24,16, & - 21,10, 3,11,27,23,15,24, & - 13,22,27,25, 5,17,26,20, & - 22,14,23,27,17, 6,18,26, & - 25,27,24,16,20,26,19, 8, & - 27,23,15,24,26,18, 7,19 & + 1, 9,21,12,17,22,27,25, & + 9, 2,10,21,22,18,23,27, & + 12,21,11, 4,25,27,24,20, & + 21,10, 3,11,27,23,19,24, & + 17,22,27,25, 5,13,26,16, & + 22,18,23,27,13, 6,14,26, & + 25,27,24,20,16,26,15, 8, & + 27,23,19,24,26,14, 7,15 & #if !defined(__GFORTRAN__) ],shape(CELL9)) #else From ffea69955e7a674e4be3b38b4249086debfa6b67 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 26 Jan 2020 09:14:51 +0100 Subject: [PATCH 05/12] polishing and testing element 11/12 (7/57 for MSC.Marc) have the same geometry type, i.e. both are a hexahedral with 8 integration points/cells Type 11 is linear (8 nodes), type 12 quadradic with reduced integration (20 nodes). The modified definition ensures that the cell nodes 9-20 of element 11 are in the same order as the real nodes 9-20 of element 12. Real nodes 1-8 (corners) and 21-27 needed no modification. Notes: * Documentation on https://damask.mpie.de/Documentation/ElementType is now outdated. * Element defition in MSC.Marc manual volume B (2001 version) is confusing because element numbering is sometimes clowise and sometimes counterclockwise. The latter one seems to be correct --- PRIVATE | 2 +- src/element.f90 | 62 ++++++++++++++++++++++++------------------------- 2 files changed, 31 insertions(+), 33 deletions(-) diff --git a/PRIVATE b/PRIVATE index 5be24da73..11aea4aa2 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 5be24da737ceb89599c7b995c605cab08fdc05c2 +Subproject commit 11aea4aa272ef037c189a158c4f7b2af923fdf30 diff --git a/src/element.f90 b/src/element.f90 index 91b687c2e..1159d401a 100644 --- a/src/element.f90 +++ b/src/element.f90 @@ -494,15 +494,14 @@ module element 0, 1, 1, 0, 0, 0, 0, 0, & ! 10 0, 0, 1, 1, 0, 0, 0, 0, & ! 1, 0, 0, 1, 0, 0, 0, 0, & ! - 0, 0, 0, 0, 1, 1, 0, 0, & ! 17 => 13 - 0, 0, 0, 0, 0, 1, 1, 0, & ! 18 => 14 - 0, 0, 0, 0, 0, 0, 1, 1, & ! 19 => 15 - 0, 0, 0, 0, 1, 0, 0, 1, & ! 20 => 16 - 1, 0, 0, 0, 1, 0, 0, 0, & ! 13 => 17 - 0, 1, 0, 0, 0, 1, 0, 0, & ! 14 => 18 - 0, 0, 1, 0, 0, 0, 1, 0, & ! 15 => 19 - 0, 0, 0, 1, 0, 0, 0, 1, & ! 16 => 20 -! + 0, 0, 0, 0, 1, 1, 0, 0, & ! + 0, 0, 0, 0, 0, 1, 1, 0, & ! + 0, 0, 0, 0, 0, 0, 1, 1, & ! 15 + 0, 0, 0, 0, 1, 0, 0, 1, & ! + 1, 0, 0, 0, 1, 0, 0, 0, & ! + 0, 1, 0, 0, 0, 1, 0, 0, & ! + 0, 0, 1, 0, 0, 0, 1, 0, & ! + 0, 0, 0, 1, 0, 0, 0, 1, & ! 20 1, 1, 1, 1, 0, 0, 0, 0, & ! 1, 1, 0, 0, 1, 1, 0, 0, & ! 0, 1, 1, 0, 0, 1, 1, 0, & ! @@ -518,34 +517,33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 2, 0, 0, 0, 0, & ! 26 - 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 & ! 27 + 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, & ! + 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 & ! #if !defined(__GFORTRAN__) ],shape(CELLNODEPARENTNODEWEIGHTS12)) !< 3D 20node 8ip #else From e6cf75ca791477482a1da700abee14ece1fd8a77 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 26 Jan 2020 09:41:41 +0100 Subject: [PATCH 06/12] current status of PRIVATE --- PRIVATE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PRIVATE b/PRIVATE index 5be24da73..2077cffcf 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 5be24da737ceb89599c7b995c605cab08fdc05c2 +Subproject commit 2077cffcf72afd273751c85dfb77bf7c7f372575 From 7f92418fc47bfd740054a53640a036851065a60e Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 26 Jan 2020 10:01:00 +0100 Subject: [PATCH 07/12] shapes should also match --- python/tests/test_Table.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/tests/test_Table.py b/python/tests/test_Table.py index d5f505e76..eed7b76b8 100644 --- a/python/tests/test_Table.py +++ b/python/tests/test_Table.py @@ -38,14 +38,14 @@ class TestTable: def test_write_read_str(self,default,tmpdir): default.to_ASCII(str(tmpdir.join('default.txt'))) new = Table.from_ASCII(str(tmpdir.join('default.txt'))) - assert all(default.data==new.data) + assert all(default.data==new.data) and default.shapes == new.shapes def test_write_read_file(self,default,tmpdir): with open(tmpdir.join('default.txt'),'w') as f: default.to_ASCII(f) with open(tmpdir.join('default.txt')) as f: new = Table.from_ASCII(f) - assert all(default.data==new.data) + assert all(default.data==new.data) and default.shapes == new.shapes def test_read_ang_str(self,reference_dir): new = Table.from_ang(os.path.join(reference_dir,'simple.ang')) From 6fed655500754b6e519d70d3d84493b86c2dffcc Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 26 Jan 2020 10:17:27 +0100 Subject: [PATCH 08/12] fix for new style and test --- python/damask/table.py | 2 +- python/tests/test_Table.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/python/damask/table.py b/python/damask/table.py index 582089a54..3ef824c6d 100644 --- a/python/damask/table.py +++ b/python/damask/table.py @@ -74,7 +74,7 @@ class Table(): f.seek(0) try: - N_comment_lines,keyword = f.readline().split() + N_comment_lines,keyword = f.readline().strip().split(maxsplit=1) if keyword != 'header': raise TypeError else: diff --git a/python/tests/test_Table.py b/python/tests/test_Table.py index eed7b76b8..369a99efb 100644 --- a/python/tests/test_Table.py +++ b/python/tests/test_Table.py @@ -47,6 +47,13 @@ class TestTable: new = Table.from_ASCII(f) assert all(default.data==new.data) and default.shapes == new.shapes + def test_write_read_new_style(self,default,tmpdir): + with open(tmpdir.join('new_style.txt'),'w') as f: + default.to_ASCII(f,new=True) + with open(tmpdir.join('new_style.txt')) as f: + new = Table.from_ASCII(f) + assert all(default.data==new.data) and default.shapes == new.shapes + def test_read_ang_str(self,reference_dir): new = Table.from_ang(os.path.join(reference_dir,'simple.ang')) assert new.data.shape == (4,10) and \ From ed9347e9bd830c797a3c33e026fc624864eff821 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 26 Jan 2020 10:34:30 +0100 Subject: [PATCH 09/12] more robust: * split(maxsplit=1) will raise ValueError if split into two strings is not possible * int('a') will raise ValueError if 'a' cannot be interpreted as an integer --- python/damask/table.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/damask/table.py b/python/damask/table.py index 3ef824c6d..15b501ac9 100644 --- a/python/damask/table.py +++ b/python/damask/table.py @@ -76,11 +76,11 @@ class Table(): try: N_comment_lines,keyword = f.readline().strip().split(maxsplit=1) if keyword != 'header': - raise TypeError + raise ValueError else: comments = [f.readline().strip() for i in range(1,int(N_comment_lines))] labels = f.readline().split() - except TypeError: + except ValueError: f.seek(0) comments = [] line = f.readline().strip() From 9a0d8db23e7412e338dca03835ce3dcfec169d05 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 26 Jan 2020 10:53:24 +0100 Subject: [PATCH 10/12] [skip ci] replacement is done --- src/mesh_marc.f90 | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mesh_marc.f90 b/src/mesh_marc.f90 index 22f978609..96f2edc49 100644 --- a/src/mesh_marc.f90 +++ b/src/mesh_marc.f90 @@ -1072,7 +1072,6 @@ end function mesh_FEasCP !> @brief return integer list corresponding to items in consecutive lines. !! First integer in array is counter !> @details ints concatenated by "c" as last char, range of a "to" b, or named set -! REMARK: should replace IO_continuousIntValues !-------------------------------------------------------------------------------------------------- function continuousIntValues(fileContent,maxN,lookupName,lookupMap,lookupMaxN) From 0eba4e39ccfc6dd99f9bb939c38bbad226a88c06 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 26 Jan 2020 14:18:16 +0100 Subject: [PATCH 11/12] trying to make the whole procedure understandable --- src/element.f90 | 113 ++++++++++++++++++++++++------------------------ 1 file changed, 57 insertions(+), 56 deletions(-) diff --git a/src/element.f90 b/src/element.f90 index 1159d401a..6ce23a9da 100644 --- a/src/element.f90 +++ b/src/element.f90 @@ -43,38 +43,39 @@ module element integer, dimension(NELEMTYPE), parameter :: NNODE = & [ & - 3, & ! 2D 3node 1ip - 6, & ! 2D 6node 3ip - 4, & ! 2D 4node 4ip - 8, & ! 2D 8node 9ip - 8, & ! 2D 8node 4ip - !-------------------- - 4, & ! 3D 4node 1ip - 5, & ! 3D 5node 4ip - 10, & ! 3D 10node 4ip - 6, & ! 3D 6node 6ip - 8, & ! 3D 8node 1ip - 8, & ! 3D 8node 8ip - 20, & ! 3D 20node 8ip - 20 & ! 3D 20node 27ip + 3, & ! 2D, 1 IP + 6, & ! 2D, 3 IP + 4, & ! 2D, 4 IP + 8, & ! 2D, 9 IP + 8, & ! 2D, 4 IP + !---------------------- + 4, & ! 3D, 1 IP + 5, & ! 3D, 4 IP + 10, & ! 3D, 4 IP + 6, & ! 3D, 6 IP + 8, & ! 3D, 1 IP + 8, & ! 3D, 8 IP + 20, & ! 3D, 8 IP + 20 & ! 3D, 27 IP ] !< number of nodes that constitute a specific type of element integer, dimension(NELEMTYPE), parameter :: GEOMTYPE = & [ & - 1, & - 2, & - 3, & - 4, & - 3, & - 5, & - 6, & - 6, & - 7, & - 8, & - 9, & - 9, & - 10 & - ] !< geometry type of particular element type + 1, & ! 1 triangle + 2, & ! 3 quadrilaterals + 3, & ! 4 quadrilaterals + 4, & ! 9 quadrilaterals + 3, & ! 4 quadrilaterals + !---------------------- + 5, & ! 1 tetrahedron + 6, & ! 4 hexahedrons + 6, & ! 4 hexahedrons + 7, & ! 6 hexahedrons + 8, & ! 1 hexahedron + 9, & ! 8 hexahedrons + 9, & ! 8 hexahedrons + 10 & ! 27 hexahedrons + ] !< geometry type (same number of cell nodes and IPs) integer, dimension(maxval(GEOMTYPE)), parameter :: NCELLNODE = & [ & @@ -88,7 +89,7 @@ module element 8, & 27, & 64 & - ] !< number of cell nodes in a specific geometry type + ] !< number of cell nodes integer, dimension(maxval(GEOMTYPE)), parameter :: NIP = & [ & @@ -102,45 +103,45 @@ module element 1, & 8, & 27 & - ] !< number of IPs in a specific geometry type + ] !< number of IPs integer, dimension(maxval(GEOMTYPE)), parameter :: CELLTYPE = & [ & - 1, & ! 2D 3node - 2, & ! 2D 4node - 2, & ! 2D 4node - 2, & ! 2D 4node - 3, & ! 3D 4node - 4, & ! 3D 8node - 4, & ! 3D 8node - 4, & ! 3D 8node - 4, & ! 3D 8node - 4 & ! 3D 8node - ] !< cell type that is used by each geometry type + 1, & ! 2D, 3 node (Triangle) + 2, & ! 2D, 4 node (Quadrilateral) + 2, & ! - " - + 2, & ! - " - + 3, & ! 3D, 4 node (Tetrahedron) + 4, & ! 3D, 4 node (Hexahedron) + 4, & ! - " - + 4, & ! - " - + 4, & ! - " - + 4 & ! - " - + ] !< cell type integer, dimension(maxval(CELLTYPE)), parameter :: NIPNEIGHBOR = & [ & - 3, & ! 2D 3node - 4, & ! 2D 4node - 4, & ! 3D 4node - 6 & ! 3D 8node - ] !< number of ip neighbors / cell faces in a specific cell type + 3, & + 4, & + 4, & + 6 & + ] !< number of ip neighbors / cell faces integer, dimension(maxval(CELLTYPE)), parameter :: NCELLNODEPERCELLFACE = & [ & - 2, & ! 2D 3node - 2, & ! 2D 4node - 3, & ! 3D 4node - 4 & ! 3D 8node - ] !< number of cell nodes in a specific cell type + 2, & + 2, & + 3, & + 4 & + ] !< number of cell nodes per face integer, dimension(maxval(CELLTYPE)), parameter :: NCELLNODEPERCELL = & [ & - 3, & ! 2D 3node - 4, & ! 2D 4node - 4, & ! 3D 4node - 8 & ! 3D 8node - ] !< number of cell nodes in a specific cell type + 3, & + 4, & + 4, & + 8 & + ] !< number of total cell nodes ! *** IPneighbor *** ! list of the neighborhood of each IP. From 8344e23c65e40ea80d385cae185f7db63886ccab Mon Sep 17 00:00:00 2001 From: Test User Date: Mon, 27 Jan 2020 16:54:01 +0100 Subject: [PATCH 12/12] [skip ci] updated version information after successful test of v2.0.3-1601-gc433e244 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 8dda7a7de..66536aad6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.3-1545-ge63c9b94 +v2.0.3-1601-gc433e244