boundcond_alt
Module
Description
$Id: boundcond.f90 23136 2015-02-27 01:08:36Z mreinhardt@nordita.org $
Module for boundary conditions. Extracted from (no)mpicomm, since all non-periodic (external) boundary conditions require the same code for serial and parallel runs.
Quick access
- Variables:
average_xy,bc_a1s_z,bc_a2r_x,bc_aa_pot,bc_aa_pot2,bc_aa_pot3,bc_aa_pot_1d,bc_aa_pot_field_extrapol,bc_adi_flux_z,bc_antis_x,bc_aper_y,bc_c1_x,bc_c1_z,bc_cdz,bc_copy_x,bc_copy_y,bc_copy_y_noinflow,bc_copy_z,bc_copy_z_noinflow,bc_cpc_x,bc_cpp_x,bc_cpz_x,bc_csymderset_y,bc_ct_z,bc_ctz,bc_d1s_x,bc_d1s_y,bc_d1s_z,bc_db_x,bc_db_z,bc_del2zero,bc_dr0_x,bc_expother_x,bc_expother_y,bc_expother_z,bc_extrap0_2_0,bc_extrap0_2_1,bc_extrap0_2_2,bc_extrap_2_1,bc_extrap_2_2,bc_file_x,bc_fix_x,bc_force_aa_time,bc_force_axy_sin_cos,bc_force_ux_time,bc_force_uxy_sin_cos,bc_force_x,bc_force_z,bc_freeze_var_x,bc_freeze_var_y,bc_freeze_var_z,bc_frozen_in_bb,bc_ghost_slope_x,bc_hs_z,bc_hse_z,bc_inflow_inwards_deriv_z,bc_inflow_x,bc_inflow_z,bc_inflow_zero_deriv_z,bc_inlet_outlet_cyl,bc_lntt_flux_x,bc_lntt_flux_z,bc_n1s_x,bc_n1s_z,bc_one_x,bc_one_y,bc_one_z,bc_onesided_x,bc_onesided_x_old,bc_onesided_y,bc_onesided_z,bc_onesided_z_orig,bc_outflow_outwards_deriv_z,bc_outflow_x,bc_outflow_x_e1,bc_outflow_y,bc_outflow_z,bc_outflow_zero_deriv_z,bc_overshoot_x,bc_overshoot_z,bc_pencil,bc_pencil_scalar,bc_pencil_vector,bc_pp_hds_z_iso,bc_pper_y,bc_set_der_x,bc_set_der_y,bc_set_der_z,bc_set_div_z,bc_set_jet_x,bc_set_jethat_x,bc_set_nfr_x,bc_set_nfr_y,bc_set_nr1_x,bc_set_pfc_x,bc_set_pfc_y,bc_set_sa2_x,bc_set_sfree_x,bc_set_sfree_y,bc_set_spder_x,bc_set_sr1_x,bc_set_val_x,bc_set_val_y,bc_set_val_z,bc_sf_x,bc_sf_y,bc_sf_z,bc_shear_x,bc_shear_y,bc_shear_z,bc_slope_x,bc_spr_x,bc_spt_y,bc_ss_flux_x,bc_st,bc_st2,bc_steady_z,bc_stratified_y,bc_stratified_z,bc_sts,bc_sym_x,bc_sym_x_ydep,bc_sym_x_ydep2,bc_sym_y,bc_symderset_x,bc_symderset_y,bc_symset0der_x,bc_symset0der_y,bc_symset0der_z,bc_symset0der_z_v2,bc_symset_x,bc_symset_y,bc_van3rd_y,bc_van3rd_z,bc_van_x,bc_van_y,bc_van_z,bc_win_z,bc_wind_density_x,bc_wind_z,bc_yy_y,bc_yy_z,bc_zero_x,bc_zero_y,bc_zero_z,bcx_extrap_2_1,bcx_extrap_2_2,bcx_extrap_2_3,bcx_extrap_frac_2,bcx_extrap_linear,bcx_extrap_powerlaw,bcy_extrap_2_1,bcy_extrap_2_2,bcy_extrap_2_3,bcz_extrapol,bcz_extrapol_damped,bcz_extrapol_fixed,bcz_extrapol_mean,bcz_hydrostatic_rho,bcz_hydrostatic_temp,check_boundconds_x,check_boundconds_y,check_boundconds_z,check_consistency_of_lperi,get_slice_data,heatflux_boundcond_x,is_vec,jdone,nt_slices,potentdiv,potential_field,set_from_slice_x,set_from_slice_y,set_from_slice_z,slc_dat_xy,slc_dat_xy2,slc_dat_xz,slc_dat_xz2,slc_dat_yz,slc_dat_yz2,sz_slc_chunk,tayler_expansion,update_ghosts,update_ghosts_all,update_ghosts_range,uu_driver,warning_lperi,zero_ghosts,zero_ghosts_all,zero_ghosts_range- Routines:
bc_per_x(),bc_per_y(),bc_per_z(),boundconds(),boundconds_x(),boundconds_x_c(),boundconds_y(),boundconds_y_c(),boundconds_z(),boundconds_z_c(),copy_bcs(),finalize_boundcond(),initialize_boundcond(),jet_x(),set_consistent_density_boundary(),set_consistent_vel_boundary(),set_periodic_boundcond_on_aux(),update_ghosts()
Needed modules
Variables
- boundcond/average_xy [private]
- boundcond/bc_a2r_x [private]
- boundcond/bc_aa_pot [private]
- boundcond/bc_aa_pot2 [private]
- boundcond/bc_aa_pot3 [private]
- boundcond/bc_aa_pot_1d [private]
- boundcond/bc_aa_pot_field_extrapol [private]
- boundcond/bc_adi_flux_z [private]
- boundcond/bc_antis_x [private]
- boundcond/bc_aper_y [private]
- boundcond/bc_cdz [private]
- boundcond/bc_copy_x [private]
- boundcond/bc_copy_y [private]
- boundcond/bc_copy_y_noinflow [private]
- boundcond/bc_copy_z [private]
- boundcond/bc_cpc_x [private]
- boundcond/bc_cpp_x [private]
- boundcond/bc_cpz_x [private]
- boundcond/bc_csymderset_y [private]
- boundcond/bc_ctz [private]
- boundcond/bc_db_x [private]
- boundcond/bc_db_z [private]
- boundcond/bc_del2zero [private]
- boundcond/bc_dr0_x [private]
- boundcond/bc_extrap0_2_0 [private]
- boundcond/bc_extrap0_2_1 [private]
- boundcond/bc_extrap0_2_2 [private]
- boundcond/bc_extrap_2_1 [private]
- boundcond/bc_extrap_2_2 [private]
- boundcond/bc_file_x [private]
- boundcond/bc_fix_x [private]
- boundcond/bc_force_aa_time [private]
- boundcond/bc_force_axy_sin_cos [private]
- boundcond/bc_force_ux_time [private]
- boundcond/bc_force_uxy_sin_cos [private]
- boundcond/bc_force_x [private]
- boundcond/bc_force_z [private]
- boundcond/bc_freeze_var_x [private]
- boundcond/bc_freeze_var_y [private]
- boundcond/bc_freeze_var_z [private]
- boundcond/bc_frozen_in_bb [private]
- boundcond/bc_inflow_inwards_deriv_z [private]
- boundcond/bc_inflow_z [private]
- boundcond/bc_inflow_zero_deriv_z [private]
- boundcond/bc_inlet_outlet_cyl [private]
- boundcond/bc_lntt_flux_x [private]
- boundcond/bc_lntt_flux_z [private]
- boundcond/bc_one_x [private]
- boundcond/bc_one_y [private]
- boundcond/bc_one_z [private]
- boundcond/bc_onesided_x [private]
- boundcond/bc_onesided_x_old [private]
- boundcond/bc_onesided_y [private]
- boundcond/bc_onesided_z [private]
- boundcond/bc_onesided_z_orig [private]
- boundcond/bc_outflow_outwards_deriv_z [private]
- boundcond/bc_outflow_x [private]
- boundcond/bc_outflow_x_e1 [private]
- boundcond/bc_outflow_y [private]
- boundcond/bc_outflow_z [private]
- boundcond/bc_outflow_zero_deriv_z [private]
- boundcond/bc_overshoot_x [private]
- boundcond/bc_overshoot_z [private]
- boundcond/bc_pencil [public]
- boundcond/bc_pencil_scalar [private]
- boundcond/bc_pencil_vector [private]
- boundcond/bc_pp_hds_z_iso [private]
- boundcond/bc_pper_y [private]
- boundcond/bc_set_der_x [private]
- boundcond/bc_set_der_y [private]
- boundcond/bc_set_der_z [private]
- boundcond/bc_set_div_z [private]
- boundcond/bc_set_jet_x [private]
- boundcond/bc_set_jethat_x [private]
- boundcond/bc_set_nfr_x [private]
- boundcond/bc_set_nfr_y [private]
- boundcond/bc_set_pfc_x [private]
- boundcond/bc_set_pfc_y [private]
- boundcond/bc_set_sa2_x [private]
- boundcond/bc_set_sfree_x [private]
- boundcond/bc_set_sfree_y [private]
- boundcond/bc_set_spder_x [private]
- boundcond/bc_sf_z [private]
- boundcond/bc_slope_x [private]
- boundcond/bc_spr_x [private]
- boundcond/bc_spt_y [private]
- boundcond/bc_ss_flux_x [private]
- boundcond/bc_steady_z [private]
- boundcond/bc_stratified_y [private]
- boundcond/bc_sym_x [private]
- boundcond/bc_sym_y [private]
- boundcond/bc_sym_z [private]
- boundcond/bc_symderset_x [private]
- boundcond/bc_symderset_y [private]
- boundcond/bc_symset0der_x [private]
- boundcond/bc_symset0der_y [private]
- boundcond/bc_symset0der_z [private]
- boundcond/bc_symset0der_z_v2 [private]
- boundcond/bc_symset_x [private]
- boundcond/bc_symset_y [private]
- boundcond/bc_van3rd_y [private]
- boundcond/bc_van3rd_z [private]
- boundcond/bc_van_x [private]
- boundcond/bc_van_y [private]
- boundcond/bc_van_z [private]
- boundcond/bc_wind_z [private]
- boundcond/bc_zero_x [private]
- boundcond/bc_zero_y [private]
- boundcond/bc_zero_z [private]
- boundcond/bcx_extrap_2_1 [private]
- boundcond/bcx_extrap_2_2 [private]
- boundcond/bcx_extrap_2_3 [private]
- boundcond/bcy_extrap_2_1 [private]
- boundcond/bcy_extrap_2_2 [private]
- boundcond/bcy_extrap_2_3 [private]
- boundcond/bcz_extrapol [private]
- boundcond/bcz_extrapol_damped [private]
- boundcond/bcz_extrapol_fixed [private]
- boundcond/bcz_extrapol_mean [private]
- boundcond/bcz_hydrostatic_temp [private]
- boundcond/bot [integer,private/parameter/optional/default=1]
- boundcond/heatflux_boundcond_x [private]
- boundcond/potentdiv [private]
- boundcond/potential_field [private]
- boundcond/tayler_expansion [private]
- boundcond/top [integer,private/parameter/optional/default=2]
- boundcond/update_ghosts [public]
- boundcond/update_ghosts_all [private]
- boundcond/update_ghosts_range [private]
- boundcond/uu_driver [private]
- boundcond/zero_ghosts [public]
- boundcond/zero_ghosts_all [private]
- boundcond/zero_ghosts_range [private]
Subroutines and functions
- subroutine boundcond/boundconds(f[, ivar1_opt[, ivar2_opt]])
Apply boundary conditions in all three directions. Note that we _must_ call boundconds_{x,y,z} in this order, or edges and corners will not be OK.
10-oct-02/wolf: coded
- Parameters:
- Call to:
boundconds_x(),boundconds_y(),boundconds_z(),boundcond_shear(),fatal_error_local(),bc_per_x(),bc_ss_temp_x(),bc_ss_flux_turb_x(),bc_ss_flux_condturb_x(),bc_ss_flux_condturb_mean_x(),bc_ss_stemp_x(),bc_ss_a2stemp_x(),bc_lnrho_cfb_r_iso(),special_boundconds(),bc_per_y(),bc_ss_temp_y(),bc_ss_stemp_y(),bc_ss_a2stemp_y(),bc_per_z(),bc_ss_flux(),bc_ss_flux_turb(),bc_ss_flux_condturb_z(),bc_lnrho_hdss_z_iso(),bc_lnrho_temp_z(),bc_ss_temp_z(),bc_ss_temp2_z(),bc_ss_temp3_z(),fatal_error(),bc_lnrho_hds_z_iso(),bc_lnrho_pressure_z(),bc_ss_stemp_z(),bc_ss_a2stemp_z(),bc_ss_temp_old(),bc_ss_energy(),bc_stellar_surface(),warning(),stop_it(),jet_x(),communicate_xy_ghosts(),setup_extrapol_fact(),field_extrapol_z_parallel(),communicate_vect_field_ghosts(),heatflux_deriv_x(),fourier_transform_xy_xy(),vect_pot_extrapol_z_parallel(),fourier_transform_y_y()
- subroutine boundcond/boundconds_x(f[, ivar1_opt[, ivar2_opt]])
Boundary conditions in x, except for periodic part handled by communication. Remark: boundconds_x() needs to be called before communicating (because we communicate the x-ghost points), boundconds_[yz] after communication has finished (they need some of the data communicated for the edges (yz-‘corners’).
8-jul-02/axel: split up into different routines for x,y and z directions
11-nov-02/wolf: unified bot/top, now handled by loop 15-dec-06/wolf: Replaced “if (bcx1(1)==’she’) then” by “any” command
- Parameters:
- Use :
- Call to:
boundcond_shear(),fatal_error_local(),bc_per_x(),bc_ss_temp_x(),bc_ss_flux_turb_x(),bc_ss_flux_condturb_x(),bc_ss_flux_condturb_mean_x(),bc_ss_stemp_x(),bc_ss_a2stemp_x(),bc_lnrho_cfb_r_iso(),special_boundconds(),bc_per_y(),bc_ss_temp_y(),bc_ss_stemp_y(),bc_ss_a2stemp_y(),bc_per_z(),bc_ss_flux(),bc_ss_flux_turb(),bc_ss_flux_condturb_z(),bc_lnrho_hdss_z_iso(),bc_lnrho_temp_z(),bc_ss_temp_z(),bc_ss_temp2_z(),bc_ss_temp3_z(),fatal_error(),bc_lnrho_hds_z_iso(),bc_lnrho_pressure_z(),bc_ss_stemp_z(),bc_ss_a2stemp_z(),bc_ss_temp_old(),bc_ss_energy(),bc_stellar_surface(),warning(),stop_it(),jet_x(),communicate_xy_ghosts(),setup_extrapol_fact(),field_extrapol_z_parallel(),communicate_vect_field_ghosts(),heatflux_deriv_x(),fourier_transform_xy_xy(),vect_pot_extrapol_z_parallel(),fourier_transform_y_y(),boundconds_x()
- subroutine boundcond/boundconds_y(f[, ivar1_opt[, ivar2_opt]])
Boundary conditions in y, except for periodic part handled by communication. Remark: boundconds_x() needs to be called before communicating (because we communicate the x-ghost points), boundconds_[yz] after communication has finished (they need some of the data communicated for the edges (yz-‘corners’).
8-jul-02/axel: split up into different routines for x,y and z directions
11-nov-02/wolf: unified bot/top, now handled by loop
- Parameters:
- Use :
- Call to:
bc_per_y(),bc_ss_temp_y(),bc_ss_stemp_y(),bc_ss_a2stemp_y(),special_boundconds(),fatal_error_local(),bc_per_z(),bc_ss_flux(),bc_ss_flux_turb(),bc_ss_flux_condturb_z(),bc_lnrho_hdss_z_iso(),bc_lnrho_temp_z(),bc_ss_temp_z(),bc_ss_temp2_z(),bc_ss_temp3_z(),fatal_error(),bc_lnrho_hds_z_iso(),bc_lnrho_pressure_z(),bc_ss_stemp_z(),bc_ss_a2stemp_z(),bc_ss_temp_old(),bc_ss_energy(),bc_stellar_surface(),warning(),stop_it(),jet_x(),communicate_xy_ghosts(),setup_extrapol_fact(),field_extrapol_z_parallel(),communicate_vect_field_ghosts(),heatflux_deriv_x(),fourier_transform_xy_xy(),vect_pot_extrapol_z_parallel(),fourier_transform_y_y(),boundconds_x(),bc_per_x()
- subroutine boundcond/boundconds_z(f[, ivar1_opt[, ivar2_opt]])
Boundary conditions in z, except for periodic part handled by communication. Remark: boundconds_x() needs to be called before communicating (because we communicate the x-ghost points), boundconds_[yz] after communication has finished (they need some of the data communicated for the edges (yz-‘corners’).
8-jul-02/axel: split up into different routines for x,y and z directions
11-nov-02/wolf: unified bot/top, now handled by loop 02-apr-13/MR : added new boundary condition ‘fs’ = frozen boundary value
symmetry about boundary; added ‘fa’ for alternative reference to
already existing freezing condition (includes antisymmetry)
- Parameters:
- Use :
- Call to:
bc_per_z(),bc_ss_flux(),bc_ss_flux_turb(),bc_ss_flux_condturb_z(),bc_lnrho_hdss_z_iso(),bc_lnrho_temp_z(),bc_ss_temp_z(),bc_ss_temp2_z(),bc_ss_temp3_z(),fatal_error(),bc_lnrho_hds_z_iso(),bc_lnrho_pressure_z(),bc_ss_stemp_z(),bc_ss_a2stemp_z(),bc_ss_temp_old(),bc_ss_energy(),bc_stellar_surface(),special_boundconds(),fatal_error_local(),warning(),stop_it(),jet_x(),communicate_xy_ghosts(),setup_extrapol_fact(),field_extrapol_z_parallel(),communicate_vect_field_ghosts(),heatflux_deriv_x(),fourier_transform_xy_xy(),vect_pot_extrapol_z_parallel(),fourier_transform_y_y(),boundconds_x(),bc_per_x(),bc_per_y()
- subroutine boundcond/bc_per_x(f, topbot, j)
Periodic boundary condition
11-nov-02/wolf: coded
- Parameters:
- Call to:
fatal_error(),warning(),stop_it(),jet_x(),fatal_error_local(),communicate_xy_ghosts(),setup_extrapol_fact(),field_extrapol_z_parallel(),communicate_vect_field_ghosts(),heatflux_deriv_x(),fourier_transform_xy_xy(),vect_pot_extrapol_z_parallel(),fourier_transform_y_y(),boundconds_x(),bc_per_x(),bc_per_y(),bc_per_z()
- subroutine boundcond/bc_per_y(f, topbot, j)
Periodic boundary condition
11-nov-02/wolf: coded
- Parameters:
- Call to:
fatal_error(),warning(),stop_it(),jet_x(),fatal_error_local(),communicate_xy_ghosts(),setup_extrapol_fact(),field_extrapol_z_parallel(),communicate_vect_field_ghosts(),heatflux_deriv_x(),fourier_transform_xy_xy(),vect_pot_extrapol_z_parallel(),fourier_transform_y_y(),boundconds_x(),bc_per_x(),bc_per_y(),bc_per_z()
- subroutine boundcond/bc_per_z(f, topbot, j)
Periodic boundary condition
11-nov-02/wolf: coded
- Parameters:
- Call to:
fatal_error(),warning(),stop_it(),jet_x(),fatal_error_local(),communicate_xy_ghosts(),setup_extrapol_fact(),field_extrapol_z_parallel(),communicate_vect_field_ghosts(),heatflux_deriv_x(),fourier_transform_xy_xy(),vect_pot_extrapol_z_parallel(),fourier_transform_y_y(),boundconds_x(),bc_per_x(),bc_per_y(),bc_per_z()
- subroutine boundcond/jet_x(prof, vel, rad)
06-nov-2013/nils: Set jet profile
- Parameters:
- Use :
- Called from:
initialize_boundcond(),boundconds_x_c(),boundconds_y_c(),boundconds_z_c()- Call to:
warning(),stop_it(),fatal_error_local(),fatal_error(),communicate_xy_ghosts(),setup_extrapol_fact(),field_extrapol_z_parallel(),communicate_vect_field_ghosts(),heatflux_deriv_x(),fourier_transform_xy_xy(),vect_pot_extrapol_z_parallel(),fourier_transform_y_y(),boundconds_x(),bc_per_x(),bc_per_y(),bc_per_z()
- subroutine boundcond/finalize_boundcond(f)
Call finalization routines, i.e. freeing allocated memory.
15-aug-2011/Bourdin.KIS: adapted from finalize_modules
- Parameters:
- Use :
- Called from:
register_modules(),initialize_modules(),finalize_modules()- Call to:
fatal_error(),vect_pot_extrapol_z_parallel(),communicate_vect_field_ghosts(),fourier_transform_xy_xy(),fourier_transform_y_y(),warning(),stop_it(),boundconds_x(),bc_per_x(),bc_per_y(),bc_per_z()
- subroutine boundcond/set_consistent_density_boundary(f, dirn, boundtype, tb, rhob, lsuccess)
This subroutine checks, if the density paramters like type, topbot and boundary value are set consistently with eg. the initial condition.
26-jun-12/dhruba+joern: coded
- Parameters:
dirn [character,in] :: direction : ‘x’,’y’,’z’
boundtype [character,in] :: type of boundary condition : ‘set’,’a’,…
tb [character,in] :: top or bottom boundary : ‘top’,’bot’
rhob [real,in] :: value at the boundary : 4.04, 8.35, 10.1
lsuccess [logical,out] ::
switch, if it was successful : .true., .false.
At the moment only the x-direction is implemented
- Call to:
boundconds_x(),fatal_error(),bc_per_x(),bc_per_y(),bc_per_z()
- subroutine boundcond/set_consistent_vel_boundary(f, dirn, boundtype, tb, comp, lsuccess)
This subroutine checks, if the velocity paramters like type and topbot are set consistently with eg. the initial condition.
14-sep-12/joern: coded, adapted from subroutine set_consistent_density_boundary
- Parameters:
dirn [character,in] :: direction : ‘x’,’y’,’z’
boundtype [character,in] :: type of boundary condition : ‘set’,’a’,…
tb [character,in] :: top or bottom boundary : ‘top’,’bot’
comp [character,in] :: component of the velocity : ‘x’,’y’,’z’
lsuccess [logical,out] ::
switch, if it was successful : .true., .false.
At the moment only the x-direction is implemented
- Call to:
boundconds_x(),fatal_error(),bc_per_x(),bc_per_y(),bc_per_z()
- subroutine boundcond/set_periodic_boundcond_on_aux(f, ivar)
sets periodic boundary condition on auxiliar variables
- Parameters:
- Called from:
periodic_boundcond_on_aux(),register_particles_grad(),initialize_particles_grad(),pencil_criteria_par_grad(),set_particle_grad()- Call to: