Changes between Version 1 and Version 2 of LayoutObjects


Ignore:
Timestamp:
04/23/12 14:31:46 (13 years ago)
Author:
Jonathan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • LayoutObjects

    v1 v2  
    3333}}}
    3434
     35 * We can also store the layout for later use...  (iE we could store a 512^3^ fixed grid run as a layout and then in another simulation load it in to a level 2 region)
     36
     37For example we could save the level 0 fixed grid 512^3^ as a layout inside of 1 simulation (during BeforeGlobalStep(0))
     38{{{
     39 CALL CreateLayout(GmGlobal, layout)
     40 layout%level = 0
     41 mB=layout%mB(MPI_ID,:,:)
     42 ALLOCATE(data(mB(1,1):mB(1,2), mB(2,1):mB(2,2),mB(3,1):mB(3,2),4))
     43 CALL LoadFieldIntoLayout(layout, data, FieldID)
     44 CALL StoreLayout(layout, data, 'ISO512')
     45}}}
     46
     47and then load it into another simulation where the base grid is 128, and the finest level 3 grid is 1024 cells across - and we want to load the data into the middle of the domain on level 3
     48
     49{{{
     50CALL CreateLayout(GmGlobal, layout)
     51CALL LoadLayout(layout, data, 'ISO512')
     52layout%level = 2
     53layout%mB(:,1:nDim,:)=layout%mB(:,1:nDim,:)+256 !Shift everything by 256 level 3 cells = 1/4 of the grid
     54CALL UnloadFieldFromLayout(layout, data, FieldID, lHydroPeriodic, levels(n)%gmbc(1))
     55CALL DestroyLayout(layout)
     56DEALLOCATE(data)
     57
     58
     59}}}
     60
    3561 * For more information on the Field sub-object's properties see ProcessingFields
     62