Changes between Version 4 and Version 5 of LayoutObjects


Ignore:
Timestamp:
01/11/16 15:56:11 (9 years ago)
Author:
Jonathan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • LayoutObjects

    v4 v5  
    5959 The only caveat is that we must use the same number of processors for the saving and the loading.  But once we reload and dump a chombo file - we could restart the simulation with a different number of processors.
    6060
     61You can also read and write layouts to chombo files using
     62
     63{{{
     64  CALL CreateLayout(GmGlobal, layout)
     65  layout%level = 0
     66  mB=layout%mB(MPI_ID,:,:)
     67  ALLOCATE(data(mB(1,1):mB(1,2), mB(2,1):mB(2,2),mB(3,1):mB(3,2),4))
     68  CALL LoadFieldIntoLayout(layout, data, FieldID)
     69  CALL StoreLayoutAsChombo(layout, data, FieldID, name)
     70}}}
     71
     72and
     73
     74{{{
     75  CALL CreateLayout(GmGlobal, layout)
     76  layout%level = 0
     77  mB=layout%mB(MPI_ID,:,:)
     78  ALLOCATE(data(mB(1,1):mB(1,2), mB(2,1):mB(2,2),mB(3,1):mB(3,2),4)) 
     79  CALL LoadLayoutFromChombo(layout, data, name)
     80  CALL UnloadFieldFromLayout(layout, data, FieldID, lHydroPeriodic, levels(n)%gmbc)
     81}}}
     82
     83
     84
     85
    6186 * For more information on the Field sub-object's properties see ProcessingFields
    6287
    63