mesh_generic.f90
Go to the documentation of this file.
1 !#############################################################################
2 !# #
3 !# fosite - 3D hydrodynamical simulation program #
4 !# module: mesh_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 !----------------------------------------------------------------------------!
35  USE mesh_base_mod
37  USE common_dict
38 
39 CONTAINS
40 
41  SUBROUTINE new_mesh(Mesh,config,IO)
42  IMPLICIT NONE
43  !------------------------------------------------------------------------!
44  CLASS(mesh_base), ALLOCATABLE :: Mesh
45  TYPE(DICT_TYP), POINTER :: config, IO
46  !------------------------------------------------------------------------!
47  INTEGER :: meshtype
48  !------------------------------------------------------------------------!
49  CALL getattr(config,"meshtype",meshtype)
50 
51  ! allocate data
52  SELECT CASE(meshtype)
53  CASE(midpoint)
54  ALLOCATE(mesh_midpoint::mesh)
55  END SELECT
56 
57  ! call initialization
58  SELECT TYPE(mesh_child => mesh)
59  TYPE IS (mesh_midpoint)
60  CALL mesh_child%InitMesh_midpoint(config,io)
61  END SELECT
62  END SUBROUTINE
63 END MODULE mesh_generic_mod
constructor for mesh class
mesh module for midpoint quadrature rule
subroutine new_mesh(Mesh, config, IO)
Dictionary for generic data types.
Definition: common_dict.f90:61