!======================================================================== ! BEARCLAW Boundary Embedded Adaptive Refinement Conservation LAW package !======================================================================== ! (c) Copyright Sorin Mitran, 2000 ! Department of Applied Mathematics ! University of Washington ! mitran@amath.washington.edu ! ----------------------------------------------------------------------- ! This code may be freely used for educational and research purposes. ! For any other use please contact the author. ! ----------------------------------------------------------------------- ! File: NodeInfoDef.f90 ! Purpose: 1) Definition of data structure associated with each node ! of the tree ! 2) Standard routines to act upon the data structure that ! carry out: ! (a) data structure initialization after allocation ! (b) data structure clean up prior to deallocation ! (c) reading the data structure from a file ! (d) writing the data structure to a file ! Comments: This module is problem specific and must be written by the ! user. For examples see the BEARCLAW documentation and also ! the test, examples and applications directories ! Application: 2D Advection test ! Contains: ! Revision History: Ver. 1.0 Oct. 2000 Sorin Mitran ! ----------------------------------------------------------------------- !***************** MODULE NodeInfoDef !***************** IMPLICIT NONE SAVE PRIVATE PUBLIC NodeInfoInit,NodeInfoKill,ReadNodeInfo,WriteNodeInfo, & ReadRootData,AllocUserFields,DeAllocUserFields INCLUDE 'NodeInfoGlobal.f90' TYPE, PUBLIC :: NodeInfo ! This must be the first component to ensure proper parallel communication INTEGER :: NodeInfoStart !------------------------------------------------------------------------ ! Required components. Do not modify! Dynamic memory allocation in BEARez !------------------------------------------------------------------------ INCLUDE 'NodeInfoTypeCommon.f90' !------------------------------------------------------------------------ ! Method specific components. May be adapted to particular time stepping ! routine used. Dynamic memory allocation in AllocSchemeFields !------------------------------------------------------------------------ INCLUDE 'NodeInfoTypeClassicBEAR.f90' !------------------------------------------------------------------------ ! Problem specific components. May be adapted to particular time stepping ! routine used. Dynamic memory allocation in NodeInfoInit routine below !------------------------------------------------------------------------ ! This must be the last component to ensure proper parallel communication INTEGER :: NodeInfoEnd END TYPE NodeInfo TYPE, PUBLIC :: FuncParam INCLUDE 'FuncParamTypeCommon.f90' END TYPE FuncParam !======= CONTAINS !======= SUBROUTINE ReadRootData(RootInfo) ! Interface declarations TYPE (NodeInfo) :: RootInfo END SUBROUTINE ReadRootData SUBROUTINE NodeInfoInit(Info) ! Interface declarations TYPE (NodeInfo) :: Info ! Carry out any special initialization. END SUBROUTINE NodeInfoInit SUBROUTINE AllocUserFields(Info,Parent) ! Interface declarations TYPE (NodeInfo) :: Info,Parent END SUBROUTINE AllocUserFields SUBROUTINE DeAllocUserFields(Info) ! Interface declarations TYPE (NodeInfo) :: Info ! Internal declarations END SUBROUTINE DeAllocUserFields SUBROUTINE NodeInfoKill(Info) TYPE (NodeInfo) :: Info ! Carry out any special clean up prior to releasing this node's memory ! Internal declarations END SUBROUTINE NodeInfoKill SUBROUTINE ReadNodeInfo(InUnit,Info) INTEGER, INTENT(IN) :: InUnit TYPE (NodeInfo) :: Info ! Routine called in restart from checkpoint file ! Read any problem/method specific components of NodeInfo that are required ! upon restart. The general NodeInfo components are handled automatically ! by BEAR ! Internal declarations END SUBROUTINE ReadNodeInfo SUBROUTINE WriteNodeInfo(OutUnit,Info) INTEGER, INTENT(IN) :: OutUnit TYPE (NodeInfo) :: Info ! Routine called in save to checkpoint file ! Write any problem/method specific components of NodeInfo that are required ! to restart. The general NodeInfo components are handled automatically ! by BEAR ! Internal declarations END SUBROUTINE WriteNodeInfo !********************* END MODULE NodeInfoDef !*********************