boundary_axis.f90
Go to the documentation of this file.
1!#############################################################################
2!# #
3!# fosite - 3D hydrodynamical simulation program #
4!# module: boundary_axis.f90 #
5!# #
6!# Copyright (C) 2006-2018 #
7!# Tobias Illenseer <tillense@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
26!----------------------------------------------------------------------------!
34!----------------------------------------------------------------------------!
41 USE common_dict
42 IMPLICIT NONE
43 !--------------------------------------------------------------------------!
44 PRIVATE
46 CONTAINS
47 PROCEDURE :: initboundary_axis
48 END TYPE
49 CHARACTER(LEN=32), PARAMETER :: boundcond_name = "axis"
50 !--------------------------------------------------------------------------!
51 PUBLIC :: &
53 !--------------------------------------------------------------------------!
54
55CONTAINS
56
58 SUBROUTINE initboundary_axis(this,Mesh,Physics,dir,config)
59 IMPLICIT NONE
60 !------------------------------------------------------------------------!
61 CLASS(boundary_axis), INTENT(INOUT) :: this
62 CLASS(physics_base), INTENT(IN) :: Physics
63 CLASS(mesh_base), INTENT(IN) :: Mesh
64 TYPE(dict_typ), POINTER, INTENT(IN) :: config
65 INTEGER :: dir
66 !------------------------------------------------------------------------!
67 INTEGER :: err
68 !------------------------------------------------------------------------!
69 CALL this%InitBoundary(mesh,physics,axis,boundcond_name,dir,config)
70
71 ALLOCATE(this%reflX(physics%vnum), &
72 this%reflY(physics%vnum), &
73 this%reflZ(physics%vnum), &
74 stat=err)
75 IF (err.NE.0) THEN
76 CALL this%Error("InitBoundary_axis", "Unable to allocate memory.")
77 END IF
78 ! this tells us which vars get the opposite sign/vanish at cell faces;
79 ! e.g. vertical velocities (depends on the underlying physics)
80 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
81 ! IMPORTANT:
82 ! I don't know if this works for all geometries and all physics
83 ! along all coordinate directions;
84 ! check the underlying physics/geometry modules
85 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
86 CALL physics%AxisMasks(mesh,this%reflX,this%reflY,this%reflZ)
87 END SUBROUTINE initboundary_axis
88
89END MODULE boundary_axis_mod
Boundary module for axis boundaries.
character(len=32), parameter boundcond_name
subroutine initboundary_axis(this, Mesh, Physics, dir, config)
Constructor for the axis boundary condition.
integer, parameter axis
axis
Boundary module for reflecting boundaries.
Dictionary for generic data types.
Definition: common_dict.f90:61
derived class for compound of mesh arrays
basic mesh module
Definition: mesh_base.f90:72
Basic physics module.
mesh data structure
Definition: mesh_base.f90:122