*********************** PROGRAM IPARS *********************** start ----- | | ------------------------------------ | platform specific initialization | ------------------------------------ | | ----------- |---| SETPRCS | | ----------- | --------------------------------- | get file names and open files | --------------------------------- | | ---------- |---| OPENIO | | ---------- | ------------------------ | initialize utilities | ------------------------ | | --------- |---| IUTIL | | --------- | | ---------- |---| TIMSET | | ---------- | | ------------- |---| TIMON 1,7 | | ------------- | | ------------------------------------ | read and distribute initial data | ------------------------------------ | | ---------- |---| SETNBG | | ---------- | | ---------- |---| READER | | ---------- | | ----------- |---| SNDABUF | | ----------- | ------------------------ | process initial data | ------------------------ | | ----------- |---| GETIDAT | | -------------------------------------------------- | EXCHANGE INTERFACE DATA with neighboring nodes | -------------------------------------------------- | | --------- |---| COMMI | | --------- | --------------------------------- | initialize various parameters | --------------------------------- | | ---------- |---| IVPARM | | ---------- | ---------------------- | input restart data | ---------------------- | | ------------ |---| TIMOFF 7 | | ------------ | | ------------------------------------------------ | read, distribute, and process transient data | ------------------------------------------------ | | ----------- |---| NEXTIME | | ----------- | |--<-------------| time step loop | | ---------- |---| READER | | ---------- | | ----------- |---| SNDABUF | | ----------- | | ----------- ---------- |---| GETTDAT |----| GETTIMD | --- GET_VISPARAMS | ----------- ---------- | | ---------- | |----| yTDATA | | ---------- | | ----------- |---| NEXTIME | | ----------- | ------------------------------ | select next time step size | ------------------------------ | | ----------- |---| SETSTEP | | ----------- | ---------------------- | make one time step | ---------------------- | | --------- |---| ySTEP | | --------- | ---------------------------- | output standard hardcopy | ---------------------------- | | ---------- ----------- |---| STDOUT |----| ySTDOUT | | ---------- ----------- | ----------------------- | output restart data | ----------------------- | ----------------------------- | output visualization data | -- VISOUT ---yVIS_TECOUTPUT ---------------------------- | | |------------>---| time step loop | ------------- | terminate | ------------- | | ---------- |---| STDOUT | | ---------- | | ---------- |---| TIMOUT | | ---------- | | ----------- |---| KILLPRC | | ----------- | ------- end ----------------------------------------------------------------------- ----------- | GETIDAT | ----------- get scalar (non-grid array) data -> GETSCAL get title, model type, setunits, timeend, debug level -> get model specific scalar data -> MISDAT -> xISDAT decide which divide routine to use (get METHOD) get the models associated with the blocks (in non-MMODEL) default is the (unique) model -> SETBLKS (MMODEL) read model to block assignments and modify the default setting -> (MMODEL) MSETBLKS send the block/model info to C structures set the CurrentModel to the MODEL (MMODEL) set the model to ALL -> SETMODEL -> C_SETMODEL process geometry data -> SETGEOM read NX, ... block geometry info -> (MMODEL) check if the # blocks is the same as the mm_nblks, -> mcheckblks set the active model type to be ALL -> c_setactive define aerial grid -> MAKEMAP divide the grid between processors -> DIVIDE -> DEFGRD get DX, ... XYZ create grid element arrays -> CREATE allocate XC,.. ROCK, POR, XPERM, ... TCOFX... DEPTHG *** (MORTAR) allocate BC_TYPE *** -> ALCBEA (BC_TYPE) allocate model specific grid arrays -> MARRAY -> xARRAY get relative perms and capillary pressure -> GETROCK -> read porosity POR, premeabilities XPERM,... read rel. perm. data and capillary pressures (tables) and (VISUAL) prepare these for visualization -> (VISUAL) VIS_SETTAB initialize the linear solver -> (LSOR) LSORI -> (TICAMA) LSOLI get well data -> IWELLS get model specific well data -> MWDATA get model specific grid arrays -> MIADAT read mutliblock data and initialize some multiblock structures -> (MORTAR) MACE_INIT get the number of interface variables and fluxes -> Ipars_GetNvars read input -> GetInput get number of blocks and mortars -> f_mace_GetNumbers get mb_delta and flux factors -> f_GetCriteria get Newton, GMRES info : determines size of work areas -> f_mace_GetGMRESInfo -> f_mace_GetInoutbc -> f_mace_GetNewtInfo -> f_get_MBoutlevel -> f_mace_GetMGInfo allocate blocks, mortar info, read data about mortars -> f_mace_GetMortarInfo set up local mortar structures -> SetUpLocalInfo mark faces as mortar faces by setting flags bc_mortar -> MARKFACE -> bc_mortar = 1 for the face if there is a mortar for each face/block (old version : set BC_TYPE arrays) (new version) : check consistency of data ? for each block create mortar grids, -> f_mace_SetMortarGrid -> f_mace_InjectMortarGrid initialize projection matrices -> f_mace_InitProj allocate workspace -> AllocateWorkspace(N_vars,restart); -> AllocateNewtonStep(N_vars); and compute projection matrices -> f_mace_CompProjMat set up communicators -> SetupMortarCommunicators -> (VISUAL) VIS_INIT set defaults in Fortran code for some parameters, read input set defaults in C structures, zero some data -> VISUAL_INIT read values of vis_scl, vis_vec etc. and VISOUT, PERMOUT etc. -> GET_VISPARAMS read values -> GETVAL read variable names (scalars and vectors) and translate them -> GET_VISVARS read visualization name of the array -> GETVALS translate to get the IPARS name and offsets written in -> ?VIS_TRANSL lookup the variable pointer in name array -> VIS_ARYNUM read VIS_FLAG, VIS_FNAME, VIS_FSTYLE and process them if new values then pass them to the C structures -> VIS_OFF_SET -> VIS_NAME_SET -> VIS_FNAME_SET -> (VISUAL) TABLE_OUT check for undefined data -> UNDEF =================================================================== --------- IVPARM --------- (VISUAL) visualize the values of permeabilities, if requested -> (VISUAL) PERMOUT call driver routine if requested in data file -> VISOUT convert permeability in XPERM,... to transmissability in TCOFX,... -> TRANC1 get model specific various parameters, initialize primary variables -> MIVDAT (MORTAR) initialize mortar spaces: boundary arrays as well as mortar structures -> (MORTAR) MORTAR_INIT allocate BC_TYPE arrays and set them to values of BC_MORTAR -> MBFACE compute depth and transmissabilities for bdary arrays -> MB_DEPTH1 -> MB_TRANC1 allocate and initialize mortar structures -> Mortar_Setup allocate mortar structures and zero their values allocate faces (boundary layers) in Fortran code and store pointers to them in C++ structures -> SET_faces allocate BC_PRIM, BC_FLUX, and BC_PRIMPC structures -> MBALLOC for all 3 (x 2) faces of a block, if this block (or any part of it) is allocated on this processor, then allocate all faces here -> ALCBEA store pointers to them in C code -> SETFACES copy initial guess from subdomain values to faces -> Ipars_GetBC -> ?GETBC compute the initial guess as arithmetic average of values in mortars -> Ipars_to_Mortars (PRIMARIES) project initial guess from faces to mortars -> f_mace_ProjectToMortar do all necessary gather/send/postrecv operations -> lmf.GatherProjection -> lmf.SendProjection -> lmf.PostProjectionRecv compute arithmetic average or difference -> f_mace_UpdateProjection (VISUAL) visualize grid arrays at initialization, if requested -> (VISUAL) VISINITOUT call driver routine if requested in data file -> VISOUT ======================== old setbctype -> mace_SetBCType get the pointers to all faces BC_TYPE for this block mark this face for this block -> F_MACE_SETBCTYPE ======================== VISOUT register variables to be used in callwork -> PNTVAR model specific initialization -> ?VIS_TECINIT pass time and nstep values to C code -> VIS_TIME call model specific vis output routine -> ?VIS_TECOUTPUT process the variables : compute velocities etc. , do parallel updates if necessary with template 2 call the driver visualization output routine -> vis_output pack the work array and call the main C work routine for driver visualization output -> vis_tecoutput unpack the work routine parameters and all the unnamed parameters on the variable length param list print info about the output -> update_Visinf call the appropriate to flag vis routine -> (flag = 1) vis_struct -> (flag = 2) vis_const_unstruct -> (flag = 3) vis_full_unstruct ============================================================== step routine in the case of MultiBlock ---------------- MORTAR_STEP ---------------- iterate until convergence in mortar space -> EVAL_F project values from mortars to ipars faces -> Mortars_to_Ipars map values from faces to subdomain primary variables -> ?BCINI_EX choose appropriate parameters to pass depending on the value of N_PRIM_CHOICE for given model -> yBCINI execute the step routine with current boundary condition from mortars -> ?STEP Newton _ loop --> PROP --> (MB) HBC_PROP_EX ->HBC_PROP --> TRAN3 --> WELSUMS --> HWELL --> MAXRESID --> TICAMA --> UPSOL --> (MB) HBC_FLUX -> HBC_PROP -> HDENS_COMP -> HBCFLUX_COMP -> HBCFLUX_COPY compute velocities across boundary -> HFLUXCOMP copy normal mass fluxes to face structures -> HFLUXCOPY project values in faces to mortars -> Ipars_to_Mortars