96 stringx, stringy, stringz)
98 integer,
intent(inout) :: n
99 real(kind=
rp),
intent(inout),
dimension(n) :: b_u, b_v, b_w
100 integer,
intent(in) :: tstep
101 class(
coef_t),
intent(inout) :: coef
103 character(len=*),
optional :: stringx, stringy, stringz
105 call this%proj_u%pre_solving(b_u, tstep, coef, n, dt_controller, stringx)
106 call this%proj_v%pre_solving(b_v, tstep, coef, n, dt_controller, stringy)
107 call this%proj_w%pre_solving(b_w, tstep, coef, n, dt_controller, stringz)
113 gs_h, n, tstep, dt_controller)
115 integer,
intent(inout) :: n
116 class(
ax_t),
intent(inout) :: Ax
117 class(
coef_t),
intent(inout) :: coef
119 type(
gs_t),
intent(inout) :: gs_h
120 real(kind=
rp),
intent(inout),
dimension(n) :: x_u, x_v, x_w
121 integer,
intent(in) :: tstep
126 if (tstep .gt. this%activ_step .and. this%L .gt. 0)
then
127 if ((.not. dt_controller%is_variable_dt) .or. &
128 (dt_controller%dt_last_change .gt. this%activ_step - 1))
then
129 call this%project_back(x_u, x_v, x_w, ax, coef, bc_projector, gs_h, n)
136 Ax, coef, bc_projector, gs_h, n)
138 integer,
intent(inout) :: n
139 class(
ax_t),
intent(inout) :: Ax
140 class(
coef_t),
intent(inout) :: coef
142 type(
gs_t),
intent(inout) :: gs_h
143 real(kind=
rp),
intent(inout),
dimension(n) :: x_u, x_v, x_w
144 type(c_ptr) :: x_u_d, x_v_d, x_w_d
152 if (this%proj_u%m .gt. 0)
then
155 if (this%proj_v%m .gt. 0)
then
158 if (this%proj_w%m .gt. 0)
then
162 if (this%proj_u%m .eq. this%proj_u%L)
then
165 this%proj_u%m = min(this%proj_u%m + 1, this%proj_u%L)
167 if (this%proj_v%m .eq. this%proj_v%L)
then
170 this%proj_v%m = min(this%proj_v%m + 1, this%proj_v%L)
172 if (this%proj_w%m .eq. this%proj_w%L)
then
175 this%proj_w%m = min(this%proj_w%m + 1, this%proj_w%L)
178 call device_copy(this%proj_u%xx_d(this%proj_u%m), &
180 call device_copy(this%proj_v%xx_d(this%proj_v%m), &
182 call device_copy(this%proj_w%xx_d(this%proj_w%m), &
186 if (this%proj_u%m .gt. 0)
then
187 call add2(x_u, this%proj_u%xbar, n)
189 if (this%proj_v%m .gt. 0)
then
190 call add2(x_v, this%proj_v%xbar, n)
192 if (this%proj_w%m .gt. 0)
then
193 call add2(x_w, this%proj_w%xbar, n)
196 if (this%proj_u%m .eq. this%proj_u%L)
then
199 this%proj_u%m = min(this%proj_u%m + 1, this%proj_u%L)
201 if (this%proj_v%m .eq. this%proj_v%L)
then
204 this%proj_v%m = min(this%proj_v%m + 1, this%proj_v%L)
206 if (this%proj_w%m .eq. this%proj_w%L)
then
209 this%proj_w%m = min(this%proj_w%m + 1, this%proj_w%L)
212 call copy(this%proj_u%xx(1, this%proj_u%m), x_u, n)
213 call copy(this%proj_v%xx(1, this%proj_v%m), x_v, n)
214 call copy(this%proj_w%xx(1, this%proj_w%m), x_w, n)
217 call ax%compute_vector(this%proj_u%bb(1, this%proj_u%m), &
218 this%proj_v%bb(1, this%proj_v%m), &
219 this%proj_w%bb(1, this%proj_w%m), x_u, x_v, x_w, &
220 coef, coef%msh, coef%Xh)
222 call gs_h%gs_op_vector(this%proj_u%bb(1, this%proj_u%m), n, gs_op_add)
223 call gs_h%gs_op_vector(this%proj_v%bb(1, this%proj_v%m), n, gs_op_add)
224 call gs_h%gs_op_vector(this%proj_w%bb(1, this%proj_w%m), n, gs_op_add)
226 call bc_projector%apply(this%proj_u%bb(1, this%proj_u%m), &
227 this%proj_v%bb(1, this%proj_v%m), this%proj_w%bb(1, this%proj_w%m), n)