38 pnpn_prs_res_factory, pnpn_vel_res_factory, &
39 pnpn_prs_res_stress_factory, pnpn_vel_res_stress_factory
42 rhs_maker_ext_fctry, rhs_maker_oifs_fctry
53 use json_module,
only : json_file
75 type(
field_t) :: p_res, u_res, v_res, w_res
80 class(
ax_t),
allocatable :: ax_vel
82 class(
ax_t),
allocatable :: ax_prs
146 type(
mesh_t),
target,
intent(inout) :: msh
147 integer,
intent(inout) :: lx
148 type(json_file),
target,
intent(inout) :: params
149 type(
user_t),
target,
intent(in) :: user
151 character(len=15),
parameter :: scheme =
'Modular (Pn/Pn)'
157 call this%scheme_init(msh, lx, params, .true., .true., scheme, user)
159 if (this%variable_material_properties .eqv. .true.)
then
161 call ax_helm_factory(this%Ax_vel, full_formulation = .true.)
164 call pnpn_prs_res_stress_factory(this%prs_res)
167 call pnpn_vel_res_stress_factory(this%vel_res)
170 call ax_helm_factory(this%Ax_vel, full_formulation = .false.)
173 call pnpn_prs_res_factory(this%prs_res)
176 call pnpn_vel_res_factory(this%vel_res)
180 call ax_helm_factory(this%Ax_prs, full_formulation = .false.)
184 call rhs_maker_sumab_fctry(this%sumab)
187 call rhs_maker_ext_fctry(this%makeabf)
190 call rhs_maker_bdf_fctry(this%makebdf)
193 call rhs_maker_oifs_fctry(this%makeoifs)
196 associate(xh_lx => this%Xh%lx, xh_ly => this%Xh%ly, xh_lz => this%Xh%lz, &
197 dm_xh => this%dm_Xh, nelv => this%msh%nelv)
199 call this%p_res%init(dm_xh,
"p_res")
200 call this%u_res%init(dm_xh,
"u_res")
201 call this%v_res%init(dm_xh,
"v_res")
202 call this%w_res%init(dm_xh,
"w_res")
203 call this%abx1%init(dm_xh,
"abx1")
204 call this%aby1%init(dm_xh,
"aby1")
205 call this%abz1%init(dm_xh,
"abz1")
206 call this%abx2%init(dm_xh,
"abx2")
207 call this%aby2%init(dm_xh,
"aby2")
208 call this%abz2%init(dm_xh,
"abz2")
209 call this%advx%init(dm_xh,
"advx")
210 call this%advy%init(dm_xh,
"advy")
211 call this%advz%init(dm_xh,
"advz")
222 call this%du%init(dm_xh,
'du')
223 call this%dv%init(dm_xh,
'dv')
224 call this%dw%init(dm_xh,
'dw')
225 call this%dp%init(dm_xh,
'dp')
230 call this%bc_prs_surface%init_base(this%c_Xh)
231 call this%bc_prs_surface%mark_zone(msh%inlet)
232 call this%bc_prs_surface%mark_zones_from_list(msh%labeled_zones,&
236 call this%bc_prs_surface%mark_zones_from_list(msh%labeled_zones,&
237 'd_vel_u', this%bc_labels)
238 call this%bc_prs_surface%mark_zones_from_list(msh%labeled_zones,&
239 'd_vel_v', this%bc_labels)
240 call this%bc_prs_surface%mark_zones_from_list(msh%labeled_zones,&
241 'd_vel_w', this%bc_labels)
242 call this%bc_prs_surface%finalize()
244 call this%bc_sym_surface%init_base(this%c_Xh)
245 call this%bc_sym_surface%mark_zone(msh%sympln)
246 call this%bc_sym_surface%mark_zones_from_list(msh%labeled_zones,&
247 'sym', this%bc_labels)
249 call this%bc_sym_surface%finalize()
251 call this%bc_vel_res_non_normal%init_base(this%c_Xh)
252 call this%bc_vel_res_non_normal%mark_zone(msh%outlet_normal)
253 call this%bc_vel_res_non_normal%mark_zones_from_list(msh%labeled_zones,&
254 'on', this%bc_labels)
255 call this%bc_vel_res_non_normal%mark_zones_from_list(msh%labeled_zones,&
258 call this%bc_vel_res_non_normal%finalize()
259 call this%bc_vel_res_non_normal%init(this%c_Xh)
261 call this%bc_field_dirichlet_p%init_base(this%c_Xh)
262 call this%bc_field_dirichlet_p%mark_zones_from_list(msh%labeled_zones, &
263 'on+dong', this%bc_labels)
264 call this%bc_field_dirichlet_p%mark_zones_from_list(msh%labeled_zones, &
265 'o+dong', this%bc_labels)
266 call this%bc_field_dirichlet_p%mark_zones_from_list(msh%labeled_zones, &
267 'd_pres', this%bc_labels)
268 call this%bc_field_dirichlet_p%finalize()
269 call this%bc_field_dirichlet_p%set_g(0.0_rp)
271 call bc_list_add(this%bclst_dp, this%bc_field_dirichlet_p)
275 call this%bc_field_dirichlet_u%init_base(this%c_Xh)
276 call this%bc_field_dirichlet_u%mark_zones_from_list( &
277 msh%labeled_zones,
'd_vel_u', this%bc_labels)
278 call this%bc_field_dirichlet_u%finalize()
279 call this%bc_field_dirichlet_u%set_g(0.0_rp)
281 call this%bc_field_dirichlet_v%init_base(this%c_Xh)
282 call this%bc_field_dirichlet_v%mark_zones_from_list(msh%labeled_zones, &
285 call this%bc_field_dirichlet_v%finalize()
286 call this%bc_field_dirichlet_v%set_g(0.0_rp)
288 call this%bc_field_dirichlet_w%init_base(this%c_Xh)
289 call this%bc_field_dirichlet_w%mark_zones_from_list(msh%labeled_zones, &
292 call this%bc_field_dirichlet_w%finalize()
293 call this%bc_field_dirichlet_w%set_g(0.0_rp)
295 call this%bc_vel_res%init_base(this%c_Xh)
296 call this%bc_vel_res%mark_zone(msh%inlet)
297 call this%bc_vel_res%mark_zone(msh%wall)
298 call this%bc_vel_res%mark_zones_from_list(msh%labeled_zones, &
300 call this%bc_vel_res%mark_zones_from_list(msh%labeled_zones, &
302 call this%bc_vel_res%finalize()
303 call this%bc_vel_res%set_g(0.0_rp)
305 call bc_list_add(this%bclst_vel_res, this%bc_vel_res)
306 call bc_list_add(this%bclst_vel_res, this%bc_vel_res_non_normal)
308 call bc_list_add(this%bclst_vel_res, this%bc_sh%symmetry)
309 call bc_list_add(this%bclst_vel_res, this%bc_wallmodel%symmetry)
314 call bc_list_add(this%bclst_du, this%bc_sh%symmetry%bc_x)
315 call bc_list_add(this%bclst_du, this%bc_wallmodel%symmetry%bc_x)
316 call bc_list_add(this%bclst_du, this%bc_vel_res_non_normal%bc_x)
318 call bc_list_add(this%bclst_du, this%bc_field_dirichlet_u)
322 call bc_list_add(this%bclst_dv, this%bc_sh%symmetry%bc_y)
323 call bc_list_add(this%bclst_dv, this%bc_wallmodel%symmetry%bc_y)
324 call bc_list_add(this%bclst_dv, this%bc_vel_res_non_normal%bc_y)
326 call bc_list_add(this%bclst_dv, this%bc_field_dirichlet_v)
330 call bc_list_add(this%bclst_dw, this%bc_sh%symmetry%bc_z)
331 call bc_list_add(this%bclst_dw, this%bc_wallmodel%symmetry%bc_z)
332 call bc_list_add(this%bclst_dw, this%bc_vel_res_non_normal%bc_z)
334 call bc_list_add(this%bclst_dw, this%bc_field_dirichlet_w)
338 if (this%variable_material_properties .and. &
339 this%vel_projection_dim .gt. 0)
then
340 call neko_error(
"Velocity projection not available for full stress &
345 call this%proj_prs%init(this%dm_Xh%size(), this%pr_projection_dim, &
346 this%pr_projection_activ_step)
348 call this%proj_u%init(this%dm_Xh%size(), this%vel_projection_dim, &
349 this%vel_projection_activ_step)
350 call this%proj_v%init(this%dm_Xh%size(), this%vel_projection_dim, &
351 this%vel_projection_activ_step)
352 call this%proj_w%init(this%dm_Xh%size(), this%vel_projection_dim, &
353 this%vel_projection_activ_step)
357 call this%chkp%add_lag(this%ulag, this%vlag, this%wlag)
364 call advection_factory(this%adv, params, this%c_Xh, &
365 this%ulag, this%vlag, this%wlag, &
369 if (params%valid_path(
'case.fluid.flow_rate_force'))
then
370 call this%vol_flow%init(this%dm_Xh, params)
377 real(kind=rp) :: dtlag(10), tlag(10)
378 type(field_t) :: u_temp, v_temp, w_temp
381 n = this%u%dof%size()
382 if (
allocated(this%chkp%previous_mesh%elements) .or. &
383 this%chkp%previous_Xh%lx .ne. this%Xh%lx)
then
384 call col2(this%u%x, this%c_Xh%mult, this%u%dof%size())
385 call col2(this%v%x, this%c_Xh%mult, this%u%dof%size())
386 call col2(this%w%x, this%c_Xh%mult, this%u%dof%size())
387 call col2(this%p%x, this%c_Xh%mult, this%u%dof%size())
388 do i = 1, this%ulag%size()
389 call col2(this%ulag%lf(i)%x, this%c_Xh%mult, this%u%dof%size())
390 call col2(this%vlag%lf(i)%x, this%c_Xh%mult, this%u%dof%size())
391 call col2(this%wlag%lf(i)%x, this%c_Xh%mult, this%u%dof%size())
395 if (neko_bcknd_device .eq. 1)
then
396 associate(u => this%u, v => this%v, w => this%w, &
397 ulag => this%ulag, vlag => this%vlag, wlag => this%wlag,&
399 call device_memcpy(u%x, u%x_d, u%dof%size(), &
400 host_to_device, sync = .false.)
401 call device_memcpy(v%x, v%x_d, v%dof%size(), &
402 host_to_device, sync = .false.)
403 call device_memcpy(w%x, w%x_d, w%dof%size(), &
404 host_to_device, sync = .false.)
405 call device_memcpy(p%x, p%x_d, p%dof%size(), &
406 host_to_device, sync = .false.)
407 call device_memcpy(ulag%lf(1)%x, ulag%lf(1)%x_d, &
408 u%dof%size(), host_to_device, sync = .false.)
409 call device_memcpy(ulag%lf(2)%x, ulag%lf(2)%x_d, &
410 u%dof%size(), host_to_device, sync = .false.)
412 call device_memcpy(vlag%lf(1)%x, vlag%lf(1)%x_d, &
413 v%dof%size(), host_to_device, sync = .false.)
414 call device_memcpy(vlag%lf(2)%x, vlag%lf(2)%x_d, &
415 v%dof%size(), host_to_device, sync = .false.)
417 call device_memcpy(wlag%lf(1)%x, wlag%lf(1)%x_d, &
418 w%dof%size(), host_to_device, sync = .false.)
419 call device_memcpy(wlag%lf(2)%x, wlag%lf(2)%x_d, &
420 w%dof%size(), host_to_device, sync = .false.)
421 call device_memcpy(this%abx1%x, this%abx1%x_d, &
422 w%dof%size(), host_to_device, sync = .false.)
423 call device_memcpy(this%abx2%x, this%abx2%x_d, &
424 w%dof%size(), host_to_device, sync = .false.)
425 call device_memcpy(this%aby1%x, this%aby1%x_d, &
426 w%dof%size(), host_to_device, sync = .false.)
427 call device_memcpy(this%aby2%x, this%aby2%x_d, &
428 w%dof%size(), host_to_device, sync = .false.)
429 call device_memcpy(this%abz1%x, this%abz1%x_d, &
430 w%dof%size(), host_to_device, sync = .false.)
431 call device_memcpy(this%abz2%x, this%abz2%x_d, &
432 w%dof%size(), host_to_device, sync = .false.)
433 call device_memcpy(this%advx%x, this%advx%x_d, &
434 w%dof%size(), host_to_device, sync = .false.)
435 call device_memcpy(this%advy%x, this%advy%x_d, &
436 w%dof%size(), host_to_device, sync = .false.)
437 call device_memcpy(this%advz%x, this%advz%x_d, &
438 w%dof%size(), host_to_device, sync = .false.)
445 if (
allocated(this%chkp%previous_mesh%elements) &
446 .or. this%chkp%previous_Xh%lx .ne. this%Xh%lx)
then
447 call this%gs_Xh%op(this%u, gs_op_add)
448 call this%gs_Xh%op(this%v, gs_op_add)
449 call this%gs_Xh%op(this%w, gs_op_add)
450 call this%gs_Xh%op(this%p, gs_op_add)
452 do i = 1, this%ulag%size()
453 call this%gs_Xh%op(this%ulag%lf(i), gs_op_add)
454 call this%gs_Xh%op(this%vlag%lf(i), gs_op_add)
455 call this%gs_Xh%op(this%wlag%lf(i), gs_op_add)
520 call this%scheme_free()
522 call this%bc_prs_surface%free()
523 call this%bc_sym_surface%free()
524 call bc_list_free(this%bclst_vel_res)
525 call bc_list_free(this%bclst_dp)
526 call this%proj_prs%free()
527 call this%proj_u%free()
528 call this%proj_v%free()
529 call this%proj_w%free()
531 call this%p_res%free()
532 call this%u_res%free()
533 call this%v_res%free()
534 call this%w_res%free()
541 call this%abx1%free()
542 call this%aby1%free()
543 call this%abz1%free()
545 call this%abx2%free()
546 call this%aby2%free()
547 call this%abz2%free()
549 call this%advx%free()
550 call this%advy%free()
551 call this%advz%free()
553 if (
allocated(this%Ax_vel))
then
554 deallocate(this%Ax_vel)
557 if (
allocated(this%Ax_prs))
then
558 deallocate(this%Ax_prs)
561 if (
allocated(this%prs_res))
then
562 deallocate(this%prs_res)
565 if (
allocated(this%vel_res))
then
566 deallocate(this%vel_res)
569 if (
allocated(this%sumab))
then
570 deallocate(this%sumab)
573 if (
allocated(this%makeabf))
then
574 deallocate(this%makeabf)
577 if (
allocated(this%makebdf))
then
578 deallocate(this%makebdf)
581 if (
allocated(this%makeoifs))
then
582 deallocate(this%makeoifs)
585 call this%vol_flow%free()
597 real(kind=rp),
intent(inout) :: t
598 integer,
intent(inout) :: tstep
599 real(kind=rp),
intent(in) :: dt
600 type(time_scheme_controller_t),
intent(inout) :: ext_bdf
601 type(time_step_controller_t),
intent(in) :: dt_controller
605 type(ksp_monitor_t) :: ksp_results(4)
607 type(field_t),
pointer :: u_e, v_e, w_e
609 integer :: temp_indices(3)
611 if (this%freeze)
return
613 n = this%dm_Xh%size()
615 call profiler_start_region(
'Fluid', 1)
616 associate(u => this%u, v => this%v, w => this%w, p => this%p, &
617 du => this%du, dv => this%dv, dw => this%dw, dp => this%dp, &
618 u_res => this%u_res, v_res => this%v_res, w_res => this%w_res, &
619 p_res => this%p_res, ax_vel => this%Ax_vel, ax_prs => this%Ax_prs, &
621 c_xh => this%c_Xh, dm_xh => this%dm_Xh, gs_xh => this%gs_Xh, &
622 ulag => this%ulag, vlag => this%vlag, wlag => this%wlag, &
623 msh => this%msh, prs_res => this%prs_res, &
624 source_term => this%source_term, vel_res => this%vel_res, &
625 sumab => this%sumab, makeoifs => this%makeoifs, &
626 makeabf => this%makeabf, makebdf => this%makebdf, &
627 vel_projection_dim => this%vel_projection_dim, &
628 pr_projection_dim => this%pr_projection_dim, &
629 rho => this%rho, mu => this%mu, oifs => this%oifs, &
630 rho_field => this%rho_field, mu_field => this%mu_field, &
631 f_x => this%f_x, f_y => this%f_y, f_z => this%f_z, &
632 if_variable_dt => dt_controller%if_variable_dt, &
633 dt_last_change => dt_controller%dt_last_change)
636 call this%scratch%request_field(u_e, temp_indices(1))
637 call this%scratch%request_field(v_e, temp_indices(2))
638 call this%scratch%request_field(w_e, temp_indices(3))
639 call sumab%compute_fluid(u_e, v_e, w_e, u, v, w, &
640 ulag, vlag, wlag, ext_bdf%advection_coeffs, ext_bdf%nadv)
643 call this%source_term%compute(t, tstep)
646 call bc_list_apply_vector(this%bclst_vel_neumann, f_x%x, f_y%x, f_z%x, &
647 this%dm_Xh%size(), t, tstep)
650 if (this%if_gradient_jump_penalty .eqv. .true.)
then
651 call this%gradient_jump_penalty_u%compute(u, v, w, u)
652 call this%gradient_jump_penalty_v%compute(u, v, w, v)
653 call this%gradient_jump_penalty_w%compute(u, v, w, w)
654 call this%gradient_jump_penalty_u%perform(f_x)
655 call this%gradient_jump_penalty_v%perform(f_y)
656 call this%gradient_jump_penalty_w%perform(f_z)
661 call this%adv%compute(u, v, w, &
662 this%advx, this%advy, this%advz, &
663 xh, this%c_Xh, dm_xh%size(), dt)
669 call makeabf%compute_fluid(this%abx1, this%aby1, this%abz1,&
670 this%abx2, this%aby2, this%abz2, &
671 f_x%x, f_y%x, f_z%x, &
672 rho, ext_bdf%advection_coeffs, n)
675 call makeoifs%compute_fluid(this%advx%x, this%advy%x, this%advz%x, &
676 f_x%x, f_y%x, f_z%x, &
680 call this%adv%compute(u, v, w, &
682 xh, this%c_Xh, dm_xh%size())
688 call makeabf%compute_fluid(this%abx1, this%aby1, this%abz1,&
689 this%abx2, this%aby2, this%abz2, &
690 f_x%x, f_y%x, f_z%x, &
691 rho, ext_bdf%advection_coeffs, n)
694 call makebdf%compute_fluid(ulag, vlag, wlag, f_x%x, f_y%x, f_z%x, &
695 u, v, w, c_xh%B, rho, dt, &
696 ext_bdf%diffusion_coeffs, ext_bdf%ndiff, n)
706 call this%user_field_bc_vel%update(this%user_field_bc_vel%field_list, &
707 this%user_field_bc_vel%bc_list, this%c_Xh, t, tstep,
"fluid")
709 call this%bc_apply_vel(t, tstep)
710 call this%bc_apply_prs(t, tstep)
713 call this%update_material_properties()
716 call profiler_start_region(
'Pressure_residual', 18)
717 call prs_res%compute(p, p_res,&
722 this%bc_prs_surface, this%bc_sym_surface,&
723 ax_prs, ext_bdf%diffusion_coeffs(1), dt, &
726 call gs_xh%op(p_res, gs_op_add)
727 call bc_list_apply_scalar(this%bclst_dp, p_res%x, p%dof%size(), t, tstep)
728 call profiler_end_region(
'Pressure_residual', 18)
730 call this%proj_prs%pre_solving(p_res%x, tstep, c_xh, n, dt_controller, &
733 call this%pc_prs%update()
734 call profiler_start_region(
'Pressure_solve', 3)
736 this%ksp_prs%solve(ax_prs, dp, p_res%x, n, c_xh, this%bclst_dp, gs_xh)
738 call profiler_end_region(
'Pressure_solve', 3)
740 call this%proj_prs%post_solving(dp%x, ax_prs, c_xh, &
741 this%bclst_dp, gs_xh, n, tstep, dt_controller)
743 call field_add2(p, dp, n)
746 call profiler_start_region(
'Velocity_residual', 19)
747 call vel_res%compute(ax_vel, u, v, w, &
748 u_res, v_res, w_res, &
752 mu_field, rho_field, ext_bdf%diffusion_coeffs(1), &
755 call gs_xh%op(u_res, gs_op_add)
756 call gs_xh%op(v_res, gs_op_add)
757 call gs_xh%op(w_res, gs_op_add)
759 call bc_list_apply_vector(this%bclst_vel_res,&
760 u_res%x, v_res%x, w_res%x, dm_xh%size(),&
765 if (neko_bcknd_device .eq. 1)
then
766 call this%bc_field_dirichlet_u%apply_scalar_dev(u_res%x_d, t, tstep)
767 call this%bc_field_dirichlet_v%apply_scalar_dev(v_res%x_d, t, tstep)
768 call this%bc_field_dirichlet_w%apply_scalar_dev(w_res%x_d, t, tstep)
770 call this%bc_field_dirichlet_u%apply_scalar(u_res%x, n, t, tstep)
771 call this%bc_field_dirichlet_v%apply_scalar(v_res%x, n, t, tstep)
772 call this%bc_field_dirichlet_w%apply_scalar(w_res%x, n, t, tstep)
775 call profiler_end_region(
'Velocity_residual', 19)
777 call this%proj_u%pre_solving(u_res%x, tstep, c_xh, n, dt_controller)
778 call this%proj_v%pre_solving(v_res%x, tstep, c_xh, n, dt_controller)
779 call this%proj_w%pre_solving(w_res%x, tstep, c_xh, n, dt_controller)
781 call this%pc_vel%update()
783 call profiler_start_region(
"Velocity_solve", 4)
784 ksp_results(2:4) = this%ksp_vel%solve_coupled(ax_vel, du, dv, dw, &
785 u_res%x, v_res%x, w_res%x, n, c_xh, &
786 this%bclst_du, this%bclst_dv, this%bclst_dw, gs_xh, &
787 this%ksp_vel%max_iter)
788 call profiler_end_region(
"Velocity_solve", 4)
790 call this%proj_u%post_solving(du%x, ax_vel, c_xh, &
791 this%bclst_du, gs_xh, n, tstep, dt_controller)
792 call this%proj_v%post_solving(dv%x, ax_vel, c_xh, &
793 this%bclst_dv, gs_xh, n, tstep, dt_controller)
794 call this%proj_w%post_solving(dw%x, ax_vel, c_xh, &
795 this%bclst_dw, gs_xh, n, tstep, dt_controller)
797 if (neko_bcknd_device .eq. 1)
then
798 call device_opadd2cm(u%x_d, v%x_d, w%x_d, &
799 du%x_d, dv%x_d, dw%x_d, 1.0_rp, n, msh%gdim)
801 call opadd2cm(u%x, v%x, w%x, du%x, dv%x, dw%x, 1.0_rp, n, msh%gdim)
804 if (this%forced_flow_rate)
then
805 call this%vol_flow%adjust( u, v, w, p, u_res, v_res, w_res, p_res, &
806 c_xh, gs_xh, ext_bdf, rho, mu, dt, &
807 this%bclst_dp, this%bclst_du, this%bclst_dv, &
808 this%bclst_dw, this%bclst_vel_res, ax_vel, ax_prs, this%ksp_prs, &
809 this%ksp_vel, this%pc_prs, this%pc_vel, this%ksp_prs%max_iter, &
810 this%ksp_vel%max_iter)
813 call fluid_step_info(tstep, t, dt, ksp_results)
815 call this%scratch%relinquish_field(temp_indices)
818 call profiler_end_region(
'Fluid', 1)
Copy data between host and device (or device and device)
Retrieves a parameter by name or assigns a provided default value. In the latter case also adds the m...
Retrieves a parameter by name or throws an error.
Subroutines to add advection terms to the RHS of a transport equation.
Defines a Matrix-vector product.
Defines a boundary condition.
subroutine, public bc_list_add(bclst, bc)
Add a condition to a list of boundary conditions.
subroutine, public bc_list_apply_vector(bclst, x, y, z, n, t, tstep)
Apply a list of boundary conditions to a vector field.
subroutine, public bc_list_init(bclst, size)
Constructor for a list of boundary conditions.
subroutine, public bc_list_free(bclst)
Destructor for a list of boundary conditions.
subroutine, public bc_list_apply_scalar(bclst, x, n, t, tstep)
Apply a list of boundary conditions to a scalar field.
subroutine, public device_opadd2cm(a1_d, a2_d, a3_d, b1_d, b2_d, b3_d, c, n, gdim)
subroutine, public device_opcolv(a1_d, a2_d, a3_d, c_d, gdim, n)
Device abstraction, common interface for various accelerators.
integer, parameter, public host_to_device
Defines a dirichlet boundary condition.
Dirichlet condition applied in the facet normal direction.
subroutine, public field_add2(a, b, n)
Vector addition .
subroutine, public field_copy(a, b, n)
Copy a vector .
Auxiliary routines for fluid solvers.
subroutine, public fluid_step_info(step, t, dt, ksp_results)
Prints for prs, velx, vely, velz the following: Number of iterations, start residual,...
Modular version of the Classic Nek5000 Pn/Pn formulation for fluids.
subroutine fluid_pnpn_init(this, msh, lx, params, user, time_scheme)
subroutine fluid_pnpn_step(this, t, tstep, dt, ext_bdf, dt_controller)
Advance fluid simulation in time.
subroutine fluid_pnpn_free(this)
subroutine fluid_pnpn_restart(this, dtlag, tlag)
Defines Gather-scatter operations.
integer, parameter, public gs_op_add
Utilities for retrieving parameters from the case files.
Implements the base abstract type for Krylov solvers plus helper types.
real(kind=rp) function, public glsum(a, n)
Sum a vector of length n.
subroutine, public col2(a, b, n)
Vector multiplication .
Collection of vector field operations operating on and . Note that in general the indices and ....
subroutine, public opcolv(a1, a2, a3, c, gdim, n)
subroutine, public opadd2cm(a1, a2, a3, b1, b2, b3, c, n, gdim)
integer, parameter neko_bcknd_device
Dirichlet condition on axis aligned plane in the non normal direction.
integer, parameter, public rp
Global precision used in computations.
Defines Pressure and velocity residuals in the Pn-Pn formulation.
subroutine, public profiler_start_region(name, region_id)
Started a named (name) profiler region.
subroutine, public profiler_end_region(name, region_id)
End the most recently started profiler region.
Project x onto X, the space of old solutions and back again.
Routines to generate the right-hand sides for the convection-diffusion equation. Employs the EXT/BDF ...
Implements the source_term_t type and a wrapper source_term_wrapper_t.
Compound scheme for the advection and diffusion operators in a transport equation.
Base class for time integration schemes.
Implements type time_step_controller.
Interfaces for user interaction with NEKO.
Base abstract type for computing the advection operator.
Base type for a matrix-vector product providing .
A list of boundary conditions.
Generic Dirichlet boundary condition on .
Dirichlet condition in facet normal direction.
Base type of all fluid formulations.
Type for storing initial and final residuals in a Krylov solver.
Dirichlet condition in non normal direction of a plane.
Abstract type to compute pressure residual.
Abstract type to compute velocity residual.
Abstract type to add contributions to F from lagged BD terms.
Abstract type to sum up contributions to kth order extrapolation scheme.
Abstract type to add contributions of kth order OIFS scheme.
Abstract type to compute extrapolated velocity field for the pressure equation.
Implements the logic to compute the time coefficients for the advection and diffusion operators in a ...
Provides a tool to set time step dt.