DAMASK with grid solvers  Revision: v2.0.3-2204-gdb1f2151
The Düsseldorf Advanced Material Simulation Kit with Grid Solvers
discretization.f90
Go to the documentation of this file.
1 # 1 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/discretization.f90"
2 # 1 "<built-in>"
3 # 1 "<command-line>"
4 # 1 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/discretization.f90"
5 !--------------------------------------------------------------------------------------------------
8 !--------------------------------------------------------------------------------------------------
10 
11  use prec
12  use results
13 
14  implicit none
15  private
16 
17  integer, public, protected :: &
20 
21  integer, public, protected, dimension(:), allocatable :: &
24 
25  real(preal), public, protected, dimension(:,:), allocatable :: &
30 
31  integer :: &
33 
34  public :: &
39 
40 contains
41 
42 !--------------------------------------------------------------------------------------------------
44 !--------------------------------------------------------------------------------------------------
45 subroutine discretization_init(homogenizationAt,microstructureAt,&
46  IPcoords0,NodeCoords0,&
47  sharedNodesBegin)
48 
49  integer, dimension(:), intent(in) :: &
50  homogenizationat, &
51  microstructureat
52  real(preal), dimension(:,:), intent(in) :: &
53  ipcoords0, &
54  nodecoords0
55  integer, optional, intent(in) :: &
56  sharednodesbegin
57 
58  write(6,'(/,a)') ' <<<+- discretization init -+>>>'; flush(6)
59 
60  discretization_nelem = size(microstructureat,1)
61  discretization_nip = size(ipcoords0,2)/discretization_nelem
62 
63  discretization_homogenizationat = homogenizationat
64  discretization_microstructureat = microstructureat
65 
66  discretization_ipcoords0 = ipcoords0
67  discretization_ipcoords = ipcoords0
68 
69  discretization_nodecoords0 = nodecoords0
70  discretization_nodecoords = nodecoords0
71 
72  if(present(sharednodesbegin)) then
73  discretization_sharednodesbegin = sharednodesbegin
74  else
76  endif
77 
78 end subroutine discretization_init
79 
80 
81 !--------------------------------------------------------------------------------------------------
83 !--------------------------------------------------------------------------------------------------
84 subroutine discretization_results
85 
86  real(preal), dimension(:,:), allocatable :: u
87 
88  call results_closegroup(results_addgroup('current/geometry'))
89 
92  call results_writedataset('current/geometry',u,'u_n','displacements of the nodes','m')
93 
96  call results_writedataset('current/geometry',u,'u_p','displacements of the materialpoints','m')
97 
98 end subroutine discretization_results
99 
100 
101 !--------------------------------------------------------------------------------------------------
103 !--------------------------------------------------------------------------------------------------
104 subroutine discretization_setipcoords(IPcoords)
105 
106  real(preal), dimension(:,:), intent(in) :: ipcoords
107 
108  discretization_ipcoords = ipcoords
109 
110 end subroutine discretization_setipcoords
111 
112 
113 !--------------------------------------------------------------------------------------------------
115 !--------------------------------------------------------------------------------------------------
116 subroutine discretization_setnodecoords(NodeCoords)
117 
118  real(preal), dimension(:,:), intent(in) :: nodecoords
119 
120  discretization_nodecoords = nodecoords
121 
122 end subroutine discretization_setnodecoords
123 
124 
125 end module discretization
discretization::discretization_setipcoords
subroutine, public discretization_setipcoords(IPcoords)
stores current IP coordinates
Definition: discretization.f90:105
discretization::discretization_setnodecoords
subroutine, public discretization_setnodecoords(NodeCoords)
stores current IP coordinates
Definition: discretization.f90:117
discretization::discretization_ipcoords
real(preal), dimension(:,:), allocatable, public, protected discretization_ipcoords
Definition: discretization.f90:25
prec
setting precision for real and int type
Definition: prec.f90:13
discretization::discretization_homogenizationat
integer, dimension(:), allocatable, public, protected discretization_homogenizationat
Definition: discretization.f90:21
discretization
spatial discretization
Definition: discretization.f90:9
discretization::discretization_nip
integer, public, protected discretization_nip
Definition: discretization.f90:17
discretization::discretization_ipcoords0
real(preal), dimension(:,:), allocatable, public, protected discretization_ipcoords0
Definition: discretization.f90:25
results::results_writedataset
Definition: results.f90:25
prec::preal
integer, parameter preal
number with 15 significant digits, up to 1e+-307 (typically 64 bit)
Definition: prec.f90:20
results::results_addgroup
integer(hid_t) function, public results_addgroup(groupName)
adds a new group to the results file
Definition: results.f90:154
discretization::discretization_nodecoords0
real(preal), dimension(:,:), allocatable, public, protected discretization_nodecoords0
Definition: discretization.f90:25
discretization::discretization_init
subroutine, public discretization_init(homogenizationAt, microstructureAt, IPcoords0, NodeCoords0, sharedNodesBegin)
stores the relevant information in globally accesible variables
Definition: discretization.f90:48
discretization::discretization_nodecoords
real(preal), dimension(:,:), allocatable, public, protected discretization_nodecoords
Definition: discretization.f90:25
results
Definition: results.f90:11
discretization::discretization_nelem
integer, public, protected discretization_nelem
Definition: discretization.f90:17
discretization::discretization_sharednodesbegin
integer discretization_sharednodesbegin
Definition: discretization.f90:31
discretization::discretization_microstructureat
integer, dimension(:), allocatable, public, protected discretization_microstructureat
Definition: discretization.f90:21
results::results_closegroup
subroutine, public results_closegroup(group_id)
close a group
Definition: results.f90:166
discretization::discretization_results
subroutine, public discretization_results
write the displacements
Definition: discretization.f90:85