50 SUBROUTINE new_sources(this,Mesh,Fluxes,Physics,config,IO)
53 CLASS(sources_base),
POINTER :: this
54 CLASS(mesh_base) :: Mesh
55 CLASS(fluxes_base) :: Fluxes
56 CLASS(physics_base) :: Physics
57 TYPE(DICT_TYP),
POINTER :: config, IO
59 CLASS(sources_base),
POINTER :: newsrc => null(), tmpsrc => null()
60 TYPE(Dict_TYP),
POINTER :: dir,src,IOsrc,gsrc => null(),gdir => null()
61 INTEGER :: update_disk_height = 0
64 IF (.NOT.physics%Initialized().OR..NOT.mesh%Initialized()) &
65 CALL this%Error(
"InitSources",
"physics and/or mesh module uninitialized")
68 DO WHILE(
ASSOCIATED(dir))
72 CALL getattr(src,
"stype", stype)
93 CALL this%Error(
"new_sources",
"Unknown source type")
97 IF (
ASSOCIATED(newsrc))
THEN 98 SELECT TYPE(obj => newsrc)
100 CALL obj%InitSources_c_accel(mesh,physics,fluxes,src,iosrc)
102 CALL obj%InitSources_diskcooling(mesh,physics,fluxes,src,iosrc)
103 IF (obj%cooling%GetType().EQ.
gray) update_disk_height = 1
105 CALL obj%InitSources_rotframe(mesh,physics,fluxes,src,iosrc)
107 CALL obj%InitSources_shearbox(mesh,physics,fluxes,src,iosrc)
109 CALL obj%InitSources_viscosity(mesh,physics,fluxes,src,iosrc)
110 IF (obj%viscosity%GetType().EQ.
alpha_alt) update_disk_height = 1
113 IF (.NOT.
ASSOCIATED(this))
THEN 126 IF(
ASSOCIATED(iosrc))
CALL setattr(io,
getkey(dir), iosrc)
133 IF(
ASSOCIATED(gsrc))
THEN 141 CALL setattr(gsrc,
"update_disk_height", update_disk_height)
142 SELECT TYPE(obj => newsrc)
144 CALL obj%InitSources_gravity(mesh,physics,fluxes,gsrc,iosrc)
147 IF(
ASSOCIATED(iosrc))
CALL setattr(io,
getkey(gdir), iosrc)
155 CLASS(sources_base),
POINTER :: this
157 CLASS(sources_base),
POINTER :: srcptr
160 IF (
ASSOCIATED(this))
THEN 161 CALL this%Finalize_base()
164 IF (.NOT.
ASSOCIATED(srcptr))
EXIT 166 CALL srcptr%Finalize()
integer, parameter, public disk_cooling
integer, parameter, public gray
generic source terms module providing functionaly common to all source terms
source terms module for constant acceleration
integer, parameter, public alpha_alt
subroutine new_sources(this, Mesh, Fluxes, Physics, config, IO)
type(dict_typ) function, pointer, public getchild(root)
Get the pointer to a direct child of the pointer 'root'.
computes momentum and energy sources due to shear stresses
logical function, public haschild(root)
Check if the node 'root' has one or more children.
function, public getkey(root)
Get the key of pointer 'root'.
integer, parameter, public rotating_frame
generic gravity terms module providing functionaly common to all gravity terms
constructor for sources class
integer, parameter, public gravity
integer, parameter, public viscosity
Source terms module for fictious forces in a shearingsheet.
type(dict_typ) function, pointer, public getnext(root)
Get the pointer to the next child.
source terms module for inertial forces caused by a rotating grid
subroutine destroy_sources(this)
Dictionary for generic data types.
integer, parameter, public shearbox
base module for numerical flux functions
integer, parameter, public c_accel
source terms module for cooling of geometrically thin accretion disks