20 real(r8),
dimension(mfm + 2),
intent(in) :: fr
22 real(r8),
dimension(nr) :: sg_equi, density
23 real(r8),
dimension(np) :: theta, dtc
25 real(r8) :: thtj, radius
26 real(r8) :: rm, drm, drmt, drmtr
27 integer(itm_i4) :: i, j, m
28 integer(itm_i4) :: node
30 dt = (1._r8 + ias) * pi / dble(np - 1)
31 dr = 1._r8 / dble(nr - 1)
35 call
arclength(fr, mfm, theta, dtc, xgauss, wgauss)
38 theta(j) = dt * (j - 1)
45 if (imesh == 2 .or. imesh == 3)
then
47 sig(1 : n_acc_points), weights(1 : n_acc_points), equidistant, &
48 sg, dsg, ddsg, .false.)
49 else if (imesh == 3)
then
51 sig(1 : n_acc_points), weights(1 : n_acc_points), equidistant, &
52 sg, dsg, ddsg, .true.)
55 sg(i) = dble(i - 1) / dble(nr - 1)
63 density(i) = dble(nr - 1) / dsg(i)
65 if (xmgrace_output)
then
66 call
plot_data_1d(
'line', sg, sg_equi, nr,
'xmgr_radial_points')
67 call
plot_data_1d(
'line', sg, density, nr,
'xmgr_s_density')
72 node = np * (i - 1) + j
74 radius = sg(nr - i + 1)
75 xx(1,node) = radius * fr(1) * cos(thtj) / 2._r8
76 xx(2,node) = fr(1) * cos(thtj) / 2._r8
77 xx(3,node) = -radius * fr(1) * sin(thtj) / 2._r8
78 xx(4,node) = -fr(1) * sin(thtj) / 2._r8
79 yy(1,node) = radius * fr(1) * sin(thtj) / 2._r8
80 yy(2,node) = fr(1) * sin(thtj) / 2._r8
81 yy(3,node) = radius * fr(1) * cos(thtj) / 2._r8
82 yy(4,node) = fr(1) * cos(thtj) / 2._r8
86 rm = radius * (fr(2 * m - 1) * cos((m - 1) * thtj) &
87 + fr(2 * m) * sin((m - 1) * thtj))
88 drm = (fr(2 * m - 1) * cos((m - 1) * thtj) + fr(2 * m) &
89 * sin((m - 1) * thtj))
90 drmt = radius * (-fr(2 * m - 1) * (m - 1) * sin((m - 1) &
91 * thtj) + fr(2 * m) * (m - 1) * cos((m - 1) * thtj))
92 drmtr = (-fr(2 * m - 1) * (m - 1) * sin((m - 1) * thtj) &
93 + fr(2 * m) * (m - 1) * cos((m - 1) * thtj))
95 rm = radius**(m - 1) * (fr(2 * m - 1) * cos((m - 1) &
96 * thtj) + fr(2 * m) * sin((m - 1) * thtj))
97 drm = (m - 1) * radius**(m - 2) * (fr(2 * m - 1) &
98 * cos((m - 1) * thtj) + fr(2 * m) * sin((m - 1) * thtj))
99 drmt = radius**(m - 1) * (-fr(2 * m - 1) * (m - 1) &
100 * sin((m - 1) * thtj) + fr(2 * m) * (m - 1) &
101 * cos((m - 1) * thtj))
102 drmtr = (m - 1) * radius**(m - 2) * (-fr(2 * m - 1) &
103 * (m - 1) * sin((m - 1) * thtj) + fr(2 * m) * (m - 1) &
104 * cos((m - 1) * thtj))
106 xx(1, node) = xx(1, node) + rm * cos(thtj)
107 yy(1, node) = yy(1, node) + rm * sin(thtj)
108 xx(2, node) = xx(2, node) + drm * cos(thtj)
109 yy(2, node) = yy(2, node) + drm * sin(thtj)
110 xx(3, node) = xx(3, node) - rm * sin(thtj) + drmt * cos(thtj)
111 yy(3, node) = yy(3, node) + rm * cos(thtj) + drmt * sin(thtj)
112 xx(4, node) = xx(4, node) - drm * sin(thtj) + drmtr * cos(thtj)
113 yy(4, node) = yy(4, node) + drm * cos(thtj) + drmtr * sin(thtj)
115 xx(2, node) = -xx(2, node) * dr / 2._r8 * dsg(nr - i + 1)
116 xx(3, node) = xx(3, node) * dt / 2._r8 * dtc(j)
117 xx(4, node) = -xx(4, node) * dr / 2._r8 * dt / 2._r8 * dtc(j) &
119 yy(2, node) = -yy(2, node) * dr / 2._r8 * dsg(nr - i + 1)
120 yy(3, node) = yy(3, node) * dt / 2._r8 * dtc(j)
121 yy(4, node) = -yy(4, node) * dr / 2._r8 * dt / 2._r8 * dtc(j) &
123 psi(4 * (node - 1) + 1) = radius**2
124 psi(4 * (node - 1) + 2) = -2._r8* radius * dr / 2._r8 &
126 psi(4 * (node - 1) + 3) = 0._r8
127 psi(4 * (node - 1) + 4) = 0._r8
subroutine plot_data_1d(type_plot, x, y, np, printname, z)
subroutine initial_grid(fr)
subroutine mesh_accumulation(nrtmp, nv, s_acc, sig, weights, equidistant, sg, dsg, ddsg, in_psi)
subroutine arclength(fr, mfm, theta, dtc, wr, ws)