fluxes_generic.f90
Go to the documentation of this file.
1!#############################################################################
2!# #
3!# fosite - 3D hydrodynamical simulation program #
4!# module: fluxes_generic.f90 #
5!# #
6!# Copyright (C) 2016 Tobias Illenseer <tillense@astrophysik.uni-kiel.de> #
7!# Jannes Klee <jklee@astrophysik.uni-kiel.de> #
8!# #
9!# This program is free software; you can redistribute it and/or modify #
10!# it under the terms of the GNU General Public License as published by #
11!# the Free Software Foundation; either version 2 of the License, or (at #
12!# your option) any later version. #
13!# #
14!# This program is distributed in the hope that it will be useful, but #
15!# WITHOUT ANY WARRANTY; without even the implied warranty of #
16!# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or #
17!# NON INFRINGEMENT. See the GNU General Public License for more #
18!# details. #
19!# #
20!# You should have received a copy of the GNU General Public License #
21!# along with this program; if not, write to the Free Software #
22!# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #
23!# #
24!#############################################################################
25!----------------------------------------------------------------------------!
33!----------------------------------------------------------------------------!
39 USE common_dict
40 IMPLICIT NONE
41 PRIVATE
42 PUBLIC :: new_fluxes
43
44CONTAINS
45
46 SUBROUTINE new_fluxes(Fluxes,Mesh,Physics,config,IO)
47 IMPLICIT NONE
48 !------------------------------------------------------------------------!
49 CLASS(fluxes_base), ALLOCATABLE :: fluxes
50 CLASS(mesh_base), INTENT(IN) :: mesh
51 CLASS(physics_base), INTENT(IN) :: physics
52 TYPE(dict_typ), POINTER :: config, io
53 !------------------------------------------------------------------------!
54 INTEGER :: fluxtype
55 !------------------------------------------------------------------------!
56 CALL getattr(config,"fluxtype",fluxtype)
57 ! allocate data
58 SELECT CASE(fluxtype)
59 CASE(kt)
60 ALLOCATE(fluxes_kt::fluxes)
61 END SELECT
62
63 ! call initialization
64 SELECT TYPE(fluxes_child => fluxes)
65 TYPE IS (fluxes_kt)
66 CALL fluxes_child%InitFluxes_KT(mesh,physics,config,io)
67 END SELECT
68 END SUBROUTINE
69END MODULE fluxes_generic_mod
Dictionary for generic data types.
Definition: common_dict.f90:61
base module for numerical flux functions
Definition: fluxes_base.f90:39
integer, parameter, public kt
constructor for fluxes class
subroutine, public new_fluxes(Fluxes, Mesh, Physics, config, IO)
numerical fluxes module for midpoint quadrature rule
Definition: fluxes_kt.f90:40
basic mesh module
Definition: mesh_base.f90:72
Basic physics module.
mesh data structure
Definition: mesh_base.f90:122