Changes between Version 2 and Version 3 of UniformRegions


Ignore:
Timestamp:
05/04/11 16:31:29 (14 years ago)
Author:
Brandon Shroyer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • UniformRegions

    v2 v3  
    33= Uniform Regions =
    44
    5 As its name implies, the {{{UniformRegion}}} object defines a region where the hydrodynamic variables are constant.  The region itself is defined by a [wiki:Shape Shape] object passed in when the {{{UniformRegion}}} is created.  The {{{UniformRegion}}} can be used as a one-shot or it can be made ''persistent'', in which case it would be renewed before every step (i.e., by  a subroutine called in {{{beforeStep()}}}).
     5== Description ==
     6As its name implies, the {{{UniformRegion}}} object defines a region where the hydrodynamic variables are constant.  The region itself is defined by a [wiki:Shape Shape] object that is instantiated when {{{UniformRegion}}} is created.  The {{{UniformRegion}}} can be used as a one-shot or it can be made ''persistent'', in which case it would be renewed before every step (i.e., by  a subroutine called in {{{beforeStep()}}}).
    67
    78[[BR]]
    89
    9 == Object Definitions ==
    10 {{{UniformRegion}}}:
     10== Object API ==
     11[[BR]]
     12=== Definition ===
     13
    1114{{{
    12 TYPE(ShapeDef), POINTER :: Shape
    13 REAL(KIND=qPREC), DIMENSION(:), ALLOCATABLE :: q
    14 INTEGER :: SubSample = 1
    15 LOGICAL :: PersistInBoundaries = .false.
    16 LOGICAL :: PersistInternal = .false.
     15TYPE UniformRegion {
     16    TYPE(ShapeDef), POINTER :: Shape
     17    REAL(KIND=qPREC), DIMENSION(:), ALLOCATABLE :: q
     18    INTEGER :: SubSample = 1
     19    LOGICAL :: PersistInBoundaries = .false.
     20    LOGICAL :: PersistInternal = .false.
     21}
    1722}}}
    1823
     
    2631
    2732 * ''{{{PersistInternal}}}'': Indicates whether the uniform region is persistent.  Under this option, {{{beforeStep()}}} will enforce the uniform region within a grid's [GhostZone ghost regions] as well.  By default, this option is turned off.
     33[[BR]]
     34=== Methods ===
     35
     36 * ''{{{InitUniformRegions()}}}'':
     37
     38 *  ''{{{ CreateUniformRegion(UniformRegion)}}}'':
     39
     40 * ''{{{AddUniformRegionObjToList(UniformRegionObj)}}}'':
     41
     42 * ''{{{RemoveUniformRegionObjFromList(UniformRegionObj)}}}'':
     43
     44 * ''{{{DestroyUniformRegionObject(UniformRegionObj)}}}'':
     45
     46 * ''{{{UniformRegionGridInit(Info)}}}'':
     47
     48 * ''{{{UniformRegionBeforeStep(Info)}}}'':
     49
     50 * ''{{{PlaceUniformRegion(Info, UniformRegion, location)}}}'':
     51
    2852
    2953[[BR]]
    3054== How to Use this Object ==
    3155
    32 The uniform regions object contains a ShapeObject that defines where the uniform value {{{q}}} is to be applied.  The !SubSample defines how many sub cells in each direction are sampled.  If !PersistInBoundaries is true then anywhere the object overlaps with physical boundaries - the values are maintained during the simulation.
     56The uniform regions object contains a [ShapeObjects Shape object] that defines where the uniform value {{{q}}} is to be applied.  The !SubSample defines how many sub cells in each direction are sampled.  If !PersistInBoundaries is true then anywhere the object overlaps with physical boundaries - the values are maintained during the simulation.
    3357If !PersistInternal is true then the values are maintained wherever the object exists.
    3458
    3559{{{
    3660SUBROUTINE ProblemModuleInit()
    37   TYPE(UniformRegionDef), POINTER :: UniformRegion
     61  TYPE(UniformRegionDef), POINTER :: UniformRegion
     62
    3863  CALL CreateUniformRegion(UniformRegion)
     64
    3965  UniformRegion%q(1:NrHydroVars)=qout(1:NrHydroVars)
    4066  UniformRegion%q(1)=density
     67
    4168  CALL SetShapeType(UniformRegion%Shape, CIRCLE, radius)
    4269  CALL SetShapeOrientation(UniformRegion%Shape, psi, theta, phi)
    4370  SplitRegion%Shape%Position=position
     71
    4472  CALL SetShapeBounds(UniformRegion%Shape)
    4573END SUBROUTINE ProblemModuleInit
    4674}}}
    4775
    48 When you call CreateUniformRegion it adds the uniform region to a list and then automatically handles the initialization and the necessary boundary conditions.  There is nothing else you have to do.
     76When you call {{{CreateUniformRegion()}}} it instantiates all the pointer/allocatable attributes of a {{{UniformRegion}}} object and adds it to a global list of {{{UniformRegion}}} objects. The {{{UniformRegion%q}}} array is allocated with {{{NrHydroVars}}} elements.
     77
     78As of revision 566, the user must manually set the values for {{{UniformRegion%q}}} (see the example above).  Configuring the {{{UniformRegion%Shape}}} object is also the user's responsibility.
     79
     80