Prepares operators used by CDIFS. This subroutine also initializes the HYPRE solvers and builds any required operator with the specified boundary conditions.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cdifs_obj), | intent(inout) | :: | this |
CDIFS solver |
subroutine cdifs_obj_PrepareSolverOperators(this) !> Prepares operators used by CDIFS. ! This subroutine also initializes the HYPRE solvers and builds any ! required operator with the specified boundary conditions. use leapBC implicit none class(cdifs_obj), intent(inout) :: this !! CDIFS solver ! Work variables integer :: scheme_order character(str64) :: hypre_solver integer :: hypre_max_it real(wp) :: hypre_res_tol ! Get information from input call this%parser%Get("Scheme order", scheme_order, default=2 ) call this%parser%Get("HYPRE Solver", hypre_solver, default="IJ-AMG-NONE") call this%parser%Get("HYPRE Max Iter", hypre_max_it, default=30 ) call this%parser%Get("HYPRE Convergence Tol", hypre_res_tol, default=1.0e-10_wp ) ! Initialize basic differential operators call this%op%Initialize(this%block,this%parallel,order=scheme_order) ! Initialize HYPRE and select solver type call this%hypre%Initialize(this%block,this%parallel) call this%hypre%SelectSolver(hypre_solver,MaxTol=hypre_res_tol,MaxIt=hypre_max_it) if (this%use_RP .or. this%use_IB) then ! Get solver parameters call this%parser%Get("VF Solver", hypre_solver, default="IJ-AMG-NONE") call this%parser%Get("VF Max Iter", hypre_max_it, default=30 ) call this%parser%Get("VF Convergence Tol", hypre_res_tol, default=1.0e-10_wp ) ! Initialize volume fraction solver call this%VFSolver%Initialize(this%block,this%parallel) call this%VFSolver%SelectSolver(hypre_solver,MaxTol=hypre_res_tol,MaxIt=hypre_max_it) end if ! Build the operators call cdifs_obj_PrepareSolverOperatorsPGRAD(this) call cdifs_obj_PrepareSolverOperatorsDIV (this) call cdifs_obj_PrepareSolverOperatorsVLAP (this) call cdifs_obj_PrepareSolverOperatorsPLAP (this) if (this%use_RP .or. this%use_IB) then call cdifs_obj_PrepareSolverOperatorsVFLAP(this) end if return end subroutine cdifs_obj_PrepareSolverOperators