100 stringx, stringy, stringz)
102 integer,
intent(inout) :: n
103 real(kind=
rp),
intent(inout),
dimension(n) :: b_u, b_v, b_w
104 integer,
intent(in) :: tstep
105 class(
coef_t),
intent(inout) :: coef
107 character(len=*),
optional :: stringx, stringy, stringz
109 call this%proj_u%pre_solving(b_u, tstep, coef, n, dt_controller, stringx)
110 call this%proj_v%pre_solving(b_v, tstep, coef, n, dt_controller, stringy)
111 call this%proj_w%pre_solving(b_w, tstep, coef, n, dt_controller, stringz)
116 bclst_u, bclst_v, bclst_w, &
117 gs_h, n, tstep, dt_controller)
119 integer,
intent(inout) :: n
120 class(
ax_t),
intent(inout) :: Ax
121 class(
coef_t),
intent(inout) :: coef
122 class(
bc_list_t),
intent(inout) :: bclst_u, bclst_v, bclst_w
123 type(
gs_t),
intent(inout) :: gs_h
124 real(kind=
rp),
intent(inout),
dimension(n) :: x_u, x_v, x_w
125 integer,
intent(in) :: tstep
130 if (tstep .gt. this%activ_step .and. this%L .gt. 0)
then
131 if ((.not. dt_controller%is_variable_dt) .or. &
132 (dt_controller%dt_last_change .gt. this%activ_step - 1))
then
133 call this%project_back(x_u, x_v, x_w, ax, coef, bclst_u, bclst_v, &
141 Ax, coef, bclst_u, bclst_v, bclst_w, gs_h, n)
143 integer,
intent(inout) :: n
144 class(
ax_t),
intent(inout) :: Ax
145 class(
coef_t),
intent(inout) :: coef
146 class(
bc_list_t),
intent(inout) :: bclst_u, bclst_v, bclst_w
147 type(
gs_t),
intent(inout) :: gs_h
148 real(kind=
rp),
intent(inout),
dimension(n) :: x_u, x_v, x_w
149 type(c_ptr) :: x_u_d, x_v_d, x_w_d
157 if (this%proj_u%m .gt. 0)
then
160 if (this%proj_v%m .gt. 0)
then
163 if (this%proj_w%m .gt. 0)
then
167 if (this%proj_u%m .eq. this%proj_u%L)
then
170 this%proj_u%m = min(this%proj_u%m + 1, this%proj_u%L)
172 if (this%proj_v%m .eq. this%proj_v%L)
then
175 this%proj_v%m = min(this%proj_v%m + 1, this%proj_v%L)
177 if (this%proj_w%m .eq. this%proj_w%L)
then
180 this%proj_w%m = min(this%proj_w%m + 1, this%proj_w%L)
183 call device_copy(this%proj_u%xx_d(this%proj_u%m), &
185 call device_copy(this%proj_v%xx_d(this%proj_u%m), &
187 call device_copy(this%proj_w%xx_d(this%proj_u%m), &
191 if (this%proj_u%m .gt. 0)
then
192 call add2(x_u, this%proj_u%xbar, n)
194 if (this%proj_v%m .gt. 0)
then
195 call add2(x_v, this%proj_v%xbar, n)
197 if (this%proj_w%m .gt. 0)
then
198 call add2(x_w, this%proj_w%xbar, n)
201 if (this%proj_u%m .eq. this%proj_u%L)
then
204 this%proj_u%m = min(this%proj_u%m + 1, this%proj_u%L)
206 if (this%proj_v%m .eq. this%proj_v%L)
then
209 this%proj_v%m = min(this%proj_v%m + 1, this%proj_v%L)
211 if (this%proj_w%m .eq. this%proj_w%L)
then
214 this%proj_w%m = min(this%proj_w%m + 1, this%proj_w%L)
217 call copy(this%proj_u%xx(1, this%proj_u%m), x_u, n)
218 call copy(this%proj_v%xx(1, this%proj_v%m), x_v, n)
219 call copy(this%proj_w%xx(1, this%proj_w%m), x_w, n)
222 call ax%compute_vector(this%proj_u%bb(1, this%proj_u%m), &
223 this%proj_v%bb(1, this%proj_v%m), &
224 this%proj_w%bb(1, this%proj_w%m), x_u, x_v, x_w, &
225 coef, coef%msh, coef%Xh)
227 call gs_h%gs_op_vector(this%proj_u%bb(1, this%proj_u%m), n, gs_op_add)
228 call gs_h%gs_op_vector(this%proj_v%bb(1, this%proj_v%m), n, gs_op_add)
229 call gs_h%gs_op_vector(this%proj_w%bb(1, this%proj_w%m), n, gs_op_add)
231 call bclst_u%apply_scalar(this%proj_u%bb(1, this%proj_u%m), n)
232 call bclst_v%apply_scalar(this%proj_v%bb(1, this%proj_v%m), n)
233 call bclst_w%apply_scalar(this%proj_w%bb(1, this%proj_w%m), n)