64 REAL,
DIMENSION(:,:,:,:),
POINTER :: pot
68 procedure(updategravity_single),
DEFERRED :: updategravity_single
69 procedure(calcdiskheight_single),
DEFERRED :: calcdiskheight_single
76 SUBROUTINE updategravity_single(this,Mesh,Physics,Fluxes,pvar,time,dt)
80 CLASS(gravity_base),
INTENT(INOUT) :: this
81 CLASS(mesh_base),
INTENT(IN) :: Mesh
82 CLASS(physics_base),
INTENT(IN) :: Physics
83 CLASS(fluxes_base),
INTENT(IN) :: Fluxes
84 REAL,
INTENT(IN) :: time,dt
85 CLASS(marray_compound),
INTENT(INOUT) :: pvar
87 SUBROUTINE calcdiskheight_single(this,Mesh,Physics,pvar,bccsound,h_ext,height)
91 CLASS(gravity_base),
INTENT(INOUT) :: this
92 CLASS(mesh_base),
INTENT(IN) :: Mesh
93 CLASS(physics_base),
INTENT(IN) :: Physics
94 CLASS(marray_compound),
INTENT(INOUT) :: pvar
95 TYPE(marray_base),
INTENT(INOUT) :: bccsound,h_ext,height
100 CLASS(gravity_base),
INTENT(INOUT) :: this
122 SUBROUTINE initgravity(this,Mesh,Physics,gravity_name,config,IO)
125 CLASS(gravity_base),
INTENT(INOUT) :: this
126 CLASS(mesh_base),
INTENT(IN) :: Mesh
127 CLASS(physics_base),
INTENT(IN) :: Physics
128 CHARACTER(LEN=*),
INTENT(IN) :: gravity_name
129 TYPE(Dict_TYP),
POINTER :: config,IO
134 CALL getattr(config,
"gtype", gtype)
136 CALL this%InitLogging(gtype,gravity_name)
140 this%accel%data1d(:) = 0.0
141 CALL this%Info(
" GRAVITY--> gravity term: " // this%GetName())
144 SUBROUTINE setoutput(this,Mesh,Physics,config,IO)
147 CLASS(gravity_base),
INTENT(INOUT) :: this
148 CLASS(mesh_base),
INTENT(IN) :: Mesh
149 CLASS(physics_base),
INTENT(IN) :: Physics
150 TYPE(Dict_TYP),
POINTER :: config,IO
152 CHARACTER(LEN=1) :: xyz(3) = (/
"x",
"y",
"z"/)
153 INTEGER :: valwrite,k
155 CALL getattr(config,
"output/accel", valwrite, 1)
156 IF (valwrite .EQ. 1)
THEN 157 DO k=1,
SIZE(this%accel%data4d,4)
158 CALL setattr(io, (
"accel_" // xyz(k)),&
159 this%accel%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,k))
163 CALL getattr(config,
"output/potential", valwrite, 1)
164 IF (valwrite .EQ. 1) &
165 CALL setattr(io,
"potential",&
166 this%pot(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1))
174 INTEGER,
INTENT(IN) :: stype
179 IF (
ASSOCIATED(gp).EQV..false.)
EXIT 181 IF (gp%GetType().EQ.stype)
RETURN 189 CLASS(gravity_base) :: this
192 CALL this%accel%Destroy()
193 DEALLOCATE(this%accel)
subroutine finalize(this)
Destructor of common class.
derived class for compound of mesh arrays
base class for mesh arrays
subroutine finalize_base(this)
generic gravity terms module providing functionaly common to all gravity terms
subroutine setoutput(this, Mesh, Physics, config, IO)
integer, parameter, public pointmass_binary
named integer constants for flavour of state vectors
Dictionary for generic data types.
integer, parameter, public spectral
class(gravity_base) function, pointer getgravitypointer(list, stype)
subroutine initgravity(this, Mesh, Physics, gravity_name, config, IO)
base module for numerical flux functions
integer, parameter, public pointmass
integer, parameter, public sboxspectral