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