FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
hecmw_Jacob_231.f90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
2 ! Copyright (c) 2019 FrontISTR Commons
3 ! This software is released under the MIT License, see LICENSE.txt
4 !-------------------------------------------------------------------------------
6 
8 contains
9 
10  subroutine hecmw_jacob_231 ( hecMESH, iElem, DET, W, N, NX, NY )
12  implicit none
13 
14  type(hecmwst_local_mesh):: hecMESH
15  integer(kind=kint):: iElem
16  real(kind=kreal):: det
17  real(kind=kreal):: w(3),n(3,3),nx(3,3),ny(3,3)
18 
19  integer(kind=kint):: i, ii, j, iLocal
20  real(kind=kreal):: dum
21  real(kind=kreal):: xx(3), yy(3)
22  real(kind=kreal):: nr(3), ns(3)
23  real(kind=kreal):: jacob(2,2), jinv(2,2)
24 
25  !!
26  !! ******** Set values of coordinates********
27  !!
28  do i = 1, 3
29  ii = 3 - i
30  ilocal = hecmesh%elem_node_item( 3*ielem -ii )
31  xx(i) = hecmesh%node( ilocal*3 -1 )
32  yy(i) = hecmesh%node( ilocal*3 )
33  w(i) = 1.0 / 3.0d0
34  end do
35 
36  !!
37  !! ******** Set values to shape functions ********
38  !!
39  n(1,1) = 0.5d0
40  n(2,1) = 0.5d0
41  n(3,1) = 0.0d0
42 
43  n(1,2) = 0.0d0
44  n(2,2) = 0.5d0
45  n(3,2) = 0.5d0
46 
47  n(1,3) = 0.5d0
48  n(2,3) = 0.0d0
49  n(3,3) = 0.5d0
50  !!
51  !! ******** Derivative of shape functions ********
52  !!
53  !! ----------- For R-Coordinate -------------
54  nr(1) = 1.0d0
55  nr(2) = 0.0d0
56  nr(3) =-1.0d0
57  !! ----------- For S-Coordinate -------------
58  ns(1) = 0.0d0
59  ns(2) = 1.0d0
60  ns(3) =-1.0d0
61  !!
62  !! ******** Jacobi matrix calculation********
63  !!
64  jacob(1,1) = nr(1)*xx(1)+nr(2)*xx(2)+nr(3)*xx(3)
65  jacob(2,1) = ns(1)*xx(1)+ns(2)*xx(2)+ns(3)*xx(3)
66  jacob(1,2) = nr(1)*yy(1)+nr(2)*yy(2)+nr(3)*yy(3)
67  jacob(2,2) = ns(1)*yy(1)+ns(2)*yy(2)+ns(3)*yy(3)
68 
69  det = jacob(1,1)*jacob(2,2) - jacob(1,2)*jacob(2,1)
70  !!
71  !! ******** Inverse Jacobi matrix calculation ********
72  !!
73  dum = 1.0 / det
74  jinv(1,1) = dum * jacob(2,2)
75  jinv(2,1) = -dum * jacob(1,2)
76  jinv(1,2) = -dum * jacob(2,1)
77  jinv(2,2) = dum * jacob(1,1)
78 
79  do i = 1, 3
80  do j = 1, 3
81 
82  nx(i,j) = jinv(1,1)*nr(i) + jinv(1,2)*ns(i)
83  ny(i,j) = jinv(2,1)*nr(i) + jinv(2,2)*ns(i)
84 
85  end do
86  end do
87 
88  end subroutine hecmw_jacob_231
89 end module hecmw_jacob231
90 
hecmw_jacob231::hecmw_jacob_231
subroutine hecmw_jacob_231(hecMESH, iElem, DET, W, N, NX, NY)
Definition: hecmw_Jacob_231.f90:11
hecmw_util
I/O and Utility.
Definition: hecmw_util_f.F90:7
hecmw_util::hecmwst_local_mesh
Definition: hecmw_util_f.F90:234
hecmw_util::kreal
integer(kind=4), parameter kreal
Definition: hecmw_util_f.F90:16
hecmw_jacob231
Jacobian calculation.
Definition: hecmw_Jacob_231.f90:7