consistent formatting: always indent by 2 spaces
This commit is contained in:
parent
81b971374b
commit
215598ade9
100
src/element.f90
100
src/element.f90
|
@ -15,7 +15,7 @@ module element
|
|||
type, public :: tElement
|
||||
integer :: &
|
||||
elemType, &
|
||||
geomType, & ! geometry type (same for same dimension and same number of integration points)
|
||||
geomType, & !< geometry type (same for same dimension and same number of integration points)
|
||||
cellType, &
|
||||
Nnodes, &
|
||||
Ncellnodes, &
|
||||
|
@ -24,19 +24,19 @@ module element
|
|||
nIPneighbors, & ! ToDo: MD: Do all IPs in one element type have the same number of neighbors?
|
||||
maxNnodeAtIP
|
||||
integer, dimension(:,:), allocatable :: &
|
||||
Cell, & ! intra-element (cell) nodes that constitute a cell
|
||||
Cell, & !< intra-element (cell) nodes that constitute a cell
|
||||
NnodeAtIP, &
|
||||
IPneighbor, &
|
||||
cellFace
|
||||
real(pReal), dimension(:,:), allocatable :: &
|
||||
! center of gravity of the weighted nodes gives the position of the cell node.
|
||||
! example: face-centered cell node with face nodes 1,2,5,6 to be used in,
|
||||
! e.g., an 8 node element, would be encoded:
|
||||
! 1, 1, 0, 0, 1, 1, 0, 0
|
||||
! e.g., an 8 node element, would be encoded: 1, 1, 0, 0, 1, 1, 0, 0
|
||||
cellNodeParentNodeWeights
|
||||
contains
|
||||
procedure :: init => tElement_init
|
||||
end type
|
||||
end type tElement
|
||||
|
||||
|
||||
integer, parameter, private :: &
|
||||
NELEMTYPE = 13
|
||||
|
@ -61,20 +61,19 @@ module element
|
|||
|
||||
integer, dimension(NelemType), parameter, public :: GEOMTYPE = &
|
||||
[ &
|
||||
1, & ! 2D 3node 1ip
|
||||
2, & ! 2D 6node 3ip
|
||||
3, & ! 2D 4node 4ip
|
||||
4, & ! 2D 8node 9ip
|
||||
3, & ! 2D 8node 4ip
|
||||
!--------------------
|
||||
5, & ! 3D 4node 1ip
|
||||
6, & ! 3D 5node 4ip
|
||||
6, & ! 3D 10node 4ip
|
||||
7, & ! 3D 6node 6ip
|
||||
8, & ! 3D 8node 1ip
|
||||
9, & ! 3D 8node 8ip
|
||||
9, & ! 3D 20node 8ip
|
||||
10 & ! 3D 20node 27ip
|
||||
1, &
|
||||
2, &
|
||||
3, &
|
||||
4, &
|
||||
3, &
|
||||
5, &
|
||||
6, &
|
||||
6, &
|
||||
7, &
|
||||
8, &
|
||||
9, &
|
||||
9, &
|
||||
10 &
|
||||
] !< geometry type of particular element type
|
||||
|
||||
!integer, dimension(maxval(geomType)), parameter, private :: NCELLNODE = & ! Intel 16.0 complains
|
||||
|
@ -108,7 +107,7 @@ module element
|
|||
] !< number of IPs in a specific geometry type
|
||||
|
||||
!integer, dimension(maxval(geomType)), parameter, private :: CELLTYPE = & ! Intel 16.0 complains
|
||||
integer, dimension(10), parameter, private :: CELLTYPE = & !< cell type that is used by each geometry type
|
||||
integer, dimension(10), parameter, private :: CELLTYPE = &
|
||||
[ &
|
||||
1, & ! 2D 3node
|
||||
2, & ! 2D 4node
|
||||
|
@ -120,28 +119,28 @@ module element
|
|||
4, & ! 3D 8node
|
||||
4, & ! 3D 8node
|
||||
4 & ! 3D 8node
|
||||
]
|
||||
] !< cell type that is used by each geometry type
|
||||
|
||||
!integer, dimension(maxval(cellType)), parameter, private :: nIPNeighbor = & ! causes problem with Intel 16.0
|
||||
integer, dimension(4), parameter, private :: NIPNEIGHBOR = & !< number of ip neighbors / cell faces in a specific cell type
|
||||
[&
|
||||
!integer, dimension(maxval(cellType)), parameter, private :: nIPNeighbor = & ! Intel 16.0 complains
|
||||
integer, dimension(4), parameter, private :: NIPNEIGHBOR = &
|
||||
[ &
|
||||
3, & ! 2D 3node
|
||||
4, & ! 2D 4node
|
||||
4, & ! 3D 4node
|
||||
6 & ! 3D 8node
|
||||
]
|
||||
] !< number of ip neighbors / cell faces in a specific cell type
|
||||
|
||||
!integer, dimension(maxval(cellType)), parameter, private :: NCELLNODESPERCELLFACE = &
|
||||
integer, dimension(4), parameter, private :: NCELLNODEPERCELLFACE = & !< number of cell nodes in a specific cell type
|
||||
integer, dimension(4), parameter, private :: NCELLNODEPERCELLFACE = &
|
||||
[ &
|
||||
2, & ! 2D 3node
|
||||
2, & ! 2D 4node
|
||||
3, & ! 3D 4node
|
||||
4 & ! 3D 8node
|
||||
]
|
||||
] !< number of cell nodes in a specific cell type
|
||||
|
||||
!integer, dimension(maxval(geomType)), parameter, private :: maxNodeAtIP = & ! causes problem with Intel 16.0
|
||||
integer, dimension(10), parameter, private :: maxNnodeAtIP = & !< maximum number of parent nodes that belong to an IP for a specific type of element
|
||||
!integer, dimension(maxval(geomType)), parameter, private :: maxNodeAtIP = & ! Intel 16.0 complains
|
||||
integer, dimension(10), parameter, private :: maxNnodeAtIP = &
|
||||
[ &
|
||||
3, &
|
||||
1, &
|
||||
|
@ -153,17 +152,16 @@ module element
|
|||
8, &
|
||||
1, &
|
||||
4 &
|
||||
]
|
||||
|
||||
] !< maximum number of parent nodes that belong to an IP for a specific type of element
|
||||
|
||||
!integer, dimension(maxval(CELLTYPE)), parameter, private :: NCELLNODEPERCELL = & ! Intel 16.0 complains
|
||||
integer, dimension(4), parameter, private :: NCELLNODEPERCELL = & !< number of cell nodes in a specific cell type
|
||||
integer, dimension(4), parameter, private :: NCELLNODEPERCELL = &
|
||||
[ &
|
||||
3, & ! 2D 3node
|
||||
4, & ! 2D 4node
|
||||
4, & ! 3D 4node
|
||||
8 & ! 3D 8node
|
||||
]
|
||||
] !< number of cell nodes in a specific cell type
|
||||
|
||||
integer, dimension(maxNnodeAtIP(1),nIP(1)), parameter, private :: NnodeAtIP1 = &
|
||||
reshape([&
|
||||
|
@ -269,13 +267,13 @@ module element
|
|||
7,0, 0,0 &
|
||||
],[maxNnodeAtIP(10),nIP(10)])
|
||||
|
||||
|
||||
! *** FE_ipNeighbor ***
|
||||
! is a list of the neighborhood of each IP.
|
||||
! It is sorted in (local) +x,-x, +y,-y, +z,-z direction.
|
||||
! Positive integers denote an intra-FE IP identifier.
|
||||
! Negative integers denote the interface behind which the neighboring (extra-FE) IP will be located.
|
||||
|
||||
|
||||
integer, dimension(nIPneighbor(cellType(1)),nIP(1)), parameter, private :: IPneighbor1 = &
|
||||
reshape([&
|
||||
-2,-3,-1 &
|
||||
|
@ -769,7 +767,7 @@ module element
|
|||
2,3, &
|
||||
3,1, &
|
||||
1,2 &
|
||||
],[NCELLNODEPERCELLFACE(1),NIPNEIGHBOR(1)]) ! 2D 3node, VTK_TRIANGLE (5)
|
||||
],[NCELLNODEPERCELLFACE(1),NIPNEIGHBOR(1)]) !< 2D 3node, VTK_TRIANGLE (5)
|
||||
|
||||
integer, dimension(NCELLNODEPERCELLFACE(2),NIPNEIGHBOR(2)), parameter :: CELLFACE2 = &
|
||||
reshape([&
|
||||
|
@ -777,7 +775,7 @@ module element
|
|||
4,1, &
|
||||
3,4, &
|
||||
1,2 &
|
||||
],[NCELLNODEPERCELLFACE(2),NIPNEIGHBOR(2)]) ! 2D 4node, VTK_QUAD (9)
|
||||
],[NCELLNODEPERCELLFACE(2),NIPNEIGHBOR(2)]) !< 2D 4node, VTK_QUAD (9)
|
||||
|
||||
integer, dimension(NCELLNODEPERCELLFACE(3),NIPNEIGHBOR(3)), parameter :: CELLFACE3 = &
|
||||
reshape([&
|
||||
|
@ -785,7 +783,7 @@ module element
|
|||
1,2,4, &
|
||||
2,3,4, &
|
||||
1,4,3 &
|
||||
],[NCELLNODEPERCELLFACE(3),NIPNEIGHBOR(3)]) ! 3D 4node, VTK_TETRA (10)
|
||||
],[NCELLNODEPERCELLFACE(3),NIPNEIGHBOR(3)]) !< 3D 4node, VTK_TETRA (10)
|
||||
|
||||
integer, dimension(NCELLNODEPERCELLFACE(4),NIPNEIGHBOR(4)), parameter :: CELLFACE4 = &
|
||||
reshape([&
|
||||
|
@ -795,12 +793,15 @@ module element
|
|||
1,2,6,5, &
|
||||
5,6,7,8, &
|
||||
1,4,3,2 &
|
||||
],[NCELLNODEPERCELLFACE(4),NIPNEIGHBOR(4)]) ! 3D 8node, VTK_HEXAHEDRON (12)
|
||||
],[NCELLNODEPERCELLFACE(4),NIPNEIGHBOR(4)]) !< 3D 8node, VTK_HEXAHEDRON (12)
|
||||
|
||||
|
||||
contains
|
||||
contains
|
||||
|
||||
subroutine tElement_init(self,elemType)
|
||||
use IO, only: &
|
||||
IO_error
|
||||
|
||||
implicit none
|
||||
class(tElement) :: self
|
||||
integer, intent(in) :: elemType
|
||||
|
@ -836,7 +837,7 @@ contains
|
|||
case(13)
|
||||
self%cellNodeParentNodeWeights = cellNodeParentNodeWeights13
|
||||
case default
|
||||
print*, 'Mist'
|
||||
call IO_error(0,ext_msg='invalid element type')
|
||||
end select
|
||||
|
||||
|
||||
|
@ -888,6 +889,7 @@ contains
|
|||
self%IPneighbor = IPneighbor10
|
||||
self%cell = CELL10
|
||||
end select
|
||||
|
||||
self%NcellNodesPerCell = NCELLNODEPERCELL(self%cellType)
|
||||
|
||||
select case(self%cellType)
|
||||
|
@ -905,15 +907,15 @@ contains
|
|||
|
||||
write(6,'(/,a)') ' <<<+- element_init -+>>>'
|
||||
|
||||
write(6,*)' element type ',self%elemType
|
||||
write(6,*)' geom type ',self%geomType
|
||||
write(6,*)' cell type ',self%cellType
|
||||
write(6,*)' # node ',self%Nnodes
|
||||
write(6,*)' # IP ',self%nIPs
|
||||
write(6,*)' # cellnode ',self%Ncellnodes
|
||||
write(6,*)' # cellnode/cell ',self%NcellnodesPerCell
|
||||
write(6,*)' # IP neighbor ',self%nIPneighbors
|
||||
write(6,*)' max # node at IP ',self%maxNnodeAtIP
|
||||
write(6,*)' element type: ',self%elemType
|
||||
write(6,*)' geom type: ',self%geomType
|
||||
write(6,*)' cell type: ',self%cellType
|
||||
write(6,*)' # node: ',self%Nnodes
|
||||
write(6,*)' # IP: ',self%nIPs
|
||||
write(6,*)' # cellnode: ',self%Ncellnodes
|
||||
write(6,*)' # cellnode/cell: ',self%NcellnodesPerCell
|
||||
write(6,*)' # IP neighbor: ',self%nIPneighbors
|
||||
write(6,*)' max # node at IP: ',self%maxNnodeAtIP
|
||||
|
||||
end subroutine tElement_init
|
||||
|
||||
|
|
Loading…
Reference in New Issue