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 !----------------------------------------------------------------------------!
39  USE mesh_base_mod
41  USE common_dict
42 
43 ! INTERFACE reconstruction_base
44 ! MODULE PROCEDURE new_reconstruction
45 ! END INTERFACE
46 
47 CONTAINS
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)
70  TYPE IS (reconstruction_constant)
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
integer, parameter, public linear
subroutine new_reconstruction(Reconstruction, Mesh, Physics, config, IO)
base module for reconstruction process
integer, parameter, public constant
Basic physics module.
Dictionary for generic data types.
Definition: common_dict.f90:61
basic module for constant (zero order) reconstruction
module for linear (first order) TVD reconstruction using slope limiters
constructor for reconstruction class