50 |
|
|
51 |
|
subroutine InitializeForceGlobals(nlocal, thisStat) |
52 |
|
integer, intent(out) :: thisStat |
53 |
< |
integer :: nrow, ncol |
54 |
< |
integer :: nrow_group, ncol_group |
53 |
> |
integer :: nAtomsInRow, nAtomsInCol |
54 |
> |
integer :: nGroupsInRow, nGroupsInCol |
55 |
|
integer :: nlocal |
56 |
|
integer :: ndim = 3 |
57 |
|
integer :: alloc_stat |
59 |
|
thisStat = 0 |
60 |
|
|
61 |
|
#ifdef IS_MPI |
62 |
< |
nrow = getNrow(plan_row) |
63 |
< |
ncol = getNcol(plan_col) |
64 |
< |
nrow_group = getNrowGroup(plan_row) |
65 |
< |
ncol_group = getNcolGroup(plan_col) |
62 |
> |
nAtomsInRow = getNatomsInRow(plan_atom_row) |
63 |
> |
nAtomsInCol = getNatomsInCol(plan_atom_col) |
64 |
> |
nGroupsInRow = getNgroupsInRow(plan_group_row) |
65 |
> |
nGroupsInCol = getNgroupsInCol(plan_group_col) |
66 |
|
|
67 |
|
#endif |
68 |
|
|
70 |
|
|
71 |
|
#ifdef IS_MPI |
72 |
|
|
73 |
< |
allocate(q_Row(ndim,nrow),stat=alloc_stat) |
73 |
> |
allocate(q_Row(ndim,nAtomsInRow),stat=alloc_stat) |
74 |
|
if (alloc_stat /= 0 ) then |
75 |
|
thisStat = -1 |
76 |
|
return |
77 |
|
endif |
78 |
|
|
79 |
< |
allocate(q_Col(ndim,ncol),stat=alloc_stat) |
79 |
> |
allocate(q_Col(ndim,nAtomsInCol),stat=alloc_stat) |
80 |
|
if (alloc_stat /= 0 ) then |
81 |
|
thisStat = -1 |
82 |
|
return |
83 |
|
endif |
84 |
|
|
85 |
< |
allocate(q_group_Row(ndim,nrow_group),stat=alloc_stat) |
85 |
> |
allocate(q_group_Row(ndim,nGroupsInRow),stat=alloc_stat) |
86 |
|
if (alloc_stat /= 0 ) then |
87 |
|
thisStat = -1 |
88 |
|
return |
89 |
|
endif |
90 |
|
|
91 |
< |
allocate(q_group_Col(ndim,ncol_group),stat=alloc_stat) |
91 |
> |
allocate(q_group_Col(ndim,nGroupsInCol),stat=alloc_stat) |
92 |
|
if (alloc_stat /= 0 ) then |
93 |
|
thisStat = -1 |
94 |
|
return |
95 |
|
endif |
96 |
|
|
97 |
< |
allocate(u_l_Row(ndim,nrow),stat=alloc_stat) |
97 |
> |
allocate(u_l_Row(ndim,nAtomsInRow),stat=alloc_stat) |
98 |
|
if (alloc_stat /= 0 ) then |
99 |
|
thisStat = -1 |
100 |
|
return |
101 |
|
endif |
102 |
|
|
103 |
< |
allocate(u_l_Col(ndim,ncol),stat=alloc_stat) |
103 |
> |
allocate(u_l_Col(ndim,nAtomsInCol),stat=alloc_stat) |
104 |
|
if (alloc_stat /= 0 ) then |
105 |
|
thisStat = -1 |
106 |
|
return |
107 |
|
endif |
108 |
|
|
109 |
< |
allocate(A_row(9,nrow),stat=alloc_stat) |
109 |
> |
allocate(A_row(9,nAtomsInRow),stat=alloc_stat) |
110 |
|
if (alloc_stat /= 0 ) then |
111 |
|
thisStat = -1 |
112 |
|
return |
113 |
|
endif |
114 |
|
|
115 |
< |
allocate(A_Col(9,ncol),stat=alloc_stat) |
115 |
> |
allocate(A_Col(9,nAtomsInCol),stat=alloc_stat) |
116 |
|
if (alloc_stat /= 0 ) then |
117 |
|
thisStat = -1 |
118 |
|
return |
119 |
|
endif |
120 |
|
|
121 |
< |
allocate(pot_row(nrow),stat=alloc_stat) |
121 |
> |
allocate(pot_row(nAtomsInRow),stat=alloc_stat) |
122 |
|
if (alloc_stat /= 0 ) then |
123 |
|
thisStat = -1 |
124 |
|
return |
125 |
|
endif |
126 |
|
|
127 |
< |
allocate(pot_Col(ncol),stat=alloc_stat) |
127 |
> |
allocate(pot_Col(nAtomsInCol),stat=alloc_stat) |
128 |
|
if (alloc_stat /= 0 ) then |
129 |
|
thisStat = -1 |
130 |
|
return |
136 |
|
return |
137 |
|
endif |
138 |
|
|
139 |
< |
allocate(f_Row(ndim,nrow),stat=alloc_stat) |
139 |
> |
allocate(f_Row(ndim,nAtomsInRow),stat=alloc_stat) |
140 |
|
if (alloc_stat /= 0 ) then |
141 |
|
thisStat = -1 |
142 |
|
return |
143 |
|
endif |
144 |
|
|
145 |
< |
allocate(f_Col(ndim,ncol),stat=alloc_stat) |
145 |
> |
allocate(f_Col(ndim,nAtomsInCol),stat=alloc_stat) |
146 |
|
if (alloc_stat /= 0 ) then |
147 |
|
thisStat = -1 |
148 |
|
return |
154 |
|
return |
155 |
|
endif |
156 |
|
|
157 |
< |
allocate(t_Row(ndim,nrow),stat=alloc_stat) |
157 |
> |
allocate(t_Row(ndim,nAtomsInRow),stat=alloc_stat) |
158 |
|
if (alloc_stat /= 0 ) then |
159 |
|
thisStat = -1 |
160 |
|
return |
161 |
|
endif |
162 |
|
|
163 |
< |
allocate(t_Col(ndim,ncol),stat=alloc_stat) |
163 |
> |
allocate(t_Col(ndim,nAtomsInCol),stat=alloc_stat) |
164 |
|
if (alloc_stat /= 0 ) then |
165 |
|
thisStat = -1 |
166 |
|
return |
179 |
|
endif |
180 |
|
|
181 |
|
|
182 |
< |
allocate(atid_Row(nrow),stat=alloc_stat) |
182 |
> |
allocate(atid_Row(nAtomsInRow),stat=alloc_stat) |
183 |
|
if (alloc_stat /= 0 ) then |
184 |
|
thisStat = -1 |
185 |
|
return |
186 |
|
endif |
187 |
|
|
188 |
< |
allocate(atid_Col(ncol),stat=alloc_stat) |
188 |
> |
allocate(atid_Col(nAtomsInCol),stat=alloc_stat) |
189 |
|
if (alloc_stat /= 0 ) then |
190 |
|
thisStat = -1 |
191 |
|
return |
192 |
|
endif |
193 |
|
|
194 |
< |
allocate(rf_Row(ndim,nrow),stat=alloc_stat) |
194 |
> |
allocate(rf_Row(ndim,nAtomsInRow),stat=alloc_stat) |
195 |
|
if (alloc_stat /= 0 ) then |
196 |
|
thisStat = -1 |
197 |
|
return |
198 |
|
endif |
199 |
|
|
200 |
< |
allocate(rf_Col(ndim,ncol),stat=alloc_stat) |
200 |
> |
allocate(rf_Col(ndim,nAtomsInCol),stat=alloc_stat) |
201 |
|
if (alloc_stat /= 0 ) then |
202 |
|
thisStat = -1 |
203 |
|
return |