Scrambler  1
Template/problem.f90
Go to the documentation of this file.
00001 !#########################################################################
00002 !               
00003 !    Copyright (C) 2003-2012 Department of Physics and Astronomy,
00004 !                            University of Rochester,
00005 !                            Rochester, NY
00006 !
00007 !    problem.f90 of module Template is part of AstroBEAR.
00008 !
00009 !    AstroBEAR is free software: you can redistribute it and/or modify    
00010 !    it under the terms of the GNU General Public License as published by 
00011 !    the Free Software Foundation, either version 3 of the License, or    
00012 !    (at your option) any later version.
00013 !
00014 !    AstroBEAR is distributed in the hope that it will be useful, 
00015 !    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 !    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 !    GNU General Public License for more details.
00018 !
00019 !    You should have received a copy of the GNU General Public License
00020 !    along with AstroBEAR.  If not, see <http://www.gnu.org/licenses/>.
00021 !
00022 !#########################################################################
00025 
00028 
00032 
00035 MODULE Problem
00036   USE GlobalDeclarations
00037   USE DataDeclarations
00038   USE Clumps
00039   USE Ambients
00040   USE Winds
00041   IMPLICIT NONE
00042   SAVE
00043   PUBLIC ProblemModuleInit, ProblemGridInit, ProblemBeforeStep, &
00044          ProblemAfterStep, ProblemSetErrFlag, ProblemBeforeGlobalStep
00045   PRIVATE 
00046   REAL(KIND=qPREC) :: rho, radius, velocity
00047 
00048 CONTAINS
00049 
00050   SUBROUTINE ProblemModuleInit()
00051     TYPE(AmbientDef), POINTER :: Ambient
00052     TYPE(ClumpDef), POINTER :: Clump
00053     TYPE(WindDef), POINTER :: Wind
00054     NAMELIST/ProblemData/ rho, radius, velocity
00055     OPEN(UNIT=PROBLEM_DATA_HANDLE, FILE='problem.data', STATUS="OLD")
00056     READ(PROBLEM_DATA_HANDLE,NML=ProblemData)
00057     CLOSE(PROBLEM_DATA_HANDLE)
00058 
00059 
00060     CALL CreateAmbient(Ambient)
00061 
00062     CALL CreateClump(Clump)
00063     Clump%density=rho
00064     Clump%radius=radius
00065     CALL UpdateClump(Clump)
00066 
00067     CALL CreateWind(Wind)
00068     Wind%velocity=velocity
00069     CALL UpdateWind(Wind)
00070 
00071   END SUBROUTINE
00072   
00073   SUBROUTINE ProblemGridInit(Info)
00074     TYPE(InfoDef) :: Info
00075   END SUBROUTINE
00076  
00077   SUBROUTINE ProblemBeforeStep(Info)
00078     TYPE(InfoDef) :: Info
00079   END SUBROUTINE ProblemBeforeStep
00080 
00081   SUBROUTINE ProblemAfterStep(Info)
00082     TYPE(InfoDef) :: Info
00083   END SUBROUTINE ProblemAfterStep
00084 
00085   SUBROUTINE ProblemSetErrFlag(Info)
00086     TYPE(InfoDef) :: Info
00087   END SUBROUTINE ProblemSetErrFlag
00088 
00089   SUBROUTINE ProblemBeforeGlobalStep(n)
00090      INTEGER :: n
00091   END SUBROUTINE ProblemBeforeGlobalStep
00092 
00093 END MODULE
 All Classes Files Functions Variables