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%if_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, bclst_w, gs_h, n)
140 Ax, coef, bclst_u, bclst_v, bclst_w, gs_h, n)
142 integer,
intent(inout) :: n
143 class(
ax_t),
intent(inout) :: Ax
144 class(
coef_t),
intent(inout) :: coef
145 class(
bc_list_t),
intent(inout) :: bclst_u, bclst_v, bclst_w
146 type(
gs_t),
intent(inout) :: gs_h
147 real(kind=
rp),
intent(inout),
dimension(n) :: x_u, x_v, x_w
148 type(c_ptr) :: x_u_d, x_v_d, x_w_d
156 if (this%proj_u%m .gt. 0)
then
159 if (this%proj_v%m .gt. 0)
then
162 if (this%proj_w%m .gt. 0)
then
166 if (this%proj_u%m .eq. this%proj_u%L)
then
169 this%proj_u%m = min(this%proj_u%m + 1, this%proj_u%L)
171 if (this%proj_v%m .eq. this%proj_v%L)
then
174 this%proj_v%m = min(this%proj_v%m + 1, this%proj_v%L)
176 if (this%proj_w%m .eq. this%proj_w%L)
then
179 this%proj_w%m = min(this%proj_w%m + 1, this%proj_w%L)
182 call device_copy(this%proj_u%xx_d(this%proj_u%m), &
184 call device_copy(this%proj_v%xx_d(this%proj_u%m), &
186 call device_copy(this%proj_w%xx_d(this%proj_u%m), &
190 if (this%proj_u%m .gt. 0)
then
191 call add2(x_u, this%proj_u%xbar, n)
193 if (this%proj_v%m .gt. 0)
then
194 call add2(x_v, this%proj_v%xbar, n)
196 if (this%proj_w%m .gt. 0)
then
197 call add2(x_w, this%proj_w%xbar, n)
200 if (this%proj_u%m .eq. this%proj_u%L)
then
203 this%proj_u%m = min(this%proj_u%m + 1, this%proj_u%L)
205 if (this%proj_v%m .eq. this%proj_v%L)
then
208 this%proj_v%m = min(this%proj_v%m + 1, this%proj_v%L)
210 if (this%proj_w%m .eq. this%proj_w%L)
then
213 this%proj_w%m = min(this%proj_w%m + 1, this%proj_w%L)
216 call copy(this%proj_u%xx(1, this%proj_u%m), x_u, n)
217 call copy(this%proj_v%xx(1, this%proj_v%m), x_v, n)
218 call copy(this%proj_w%xx(1, this%proj_w%m), x_w, n)
221 call ax%compute_vector(this%proj_u%bb(1,this%proj_u%m), &
222 this%proj_v%bb(1,this%proj_v%m), &
223 this%proj_w%bb(1,this%proj_w%m), x_u, x_v, x_w, &
224 coef, coef%msh, coef%Xh)
226 call gs_h%gs_op_vector(this%proj_u%bb(1,this%proj_u%m), n, gs_op_add)
227 call gs_h%gs_op_vector(this%proj_v%bb(1,this%proj_v%m), n, gs_op_add)
228 call gs_h%gs_op_vector(this%proj_w%bb(1,this%proj_w%m), n, gs_op_add)
230 call bclst_u%apply_scalar(this%proj_u%bb(1,this%proj_u%m), n)
231 call bclst_v%apply_scalar(this%proj_v%bb(1,this%proj_v%m), n)
232 call bclst_w%apply_scalar(this%proj_w%bb(1,this%proj_w%m), n)