diff --git a/gm/gm.h b/gm/gm.h index 11f6c74eb6ac76be66ebdb89f6295770def7fcf2..903444017ead28b8718316a1e7e4b894220f628c 100644 --- a/gm/gm.h +++ b/gm/gm.h @@ -302,12 +302,6 @@ enum NodeType {CORNER_NODE, CENTER_NODE, LEVEL_0_NODE}; -/** @name Macros for the multigrid user data space management */ -/*@{*/ -#define OFFSET_IN_MGUD(id) (GetMGUDBlockDescriptor(id)->offset) -#define IS_MGUDBLOCK_DEF(id) (GetMGUDBlockDescriptor(id)!=NULL) -/*@}*/ - /* REMARK: TOPNODE no more available since 970411 because of problems in parallelisation to use it in serial version uncomment define @@ -1575,13 +1569,6 @@ struct multigrid { /** \brief pointer to the node element blocks */ union element ***ndelemptrarray; - /* user data */ - /** \brief general user data space */ - void *GenData; - - /** \brief user heap */ - NS_PREFIX HEAP *UserHeap; - /* i/o handling */ /** \brief 1 if multigrid saved */ INT saved; @@ -3005,9 +2992,6 @@ START_UGDIM_NAMESPACE #define MGNDELEMBLKENTRY(p,b,i) (*((*(((p)->ndelemptrarray)+b))+i)) /* . . . macros for the NodeElementsBlockArray */ #define MGNAME(p) ((p)->v.name) -#define MG_USER_HEAP(p) ((p)->UserHeap) -#define GEN_MGUD(p) ((p)->GenData) -#define GEN_MGUD_ADR(p,o) ((void *)(((char *)((p)->GenData))+(o))) #define VEC_DEF_IN_OBJ_OF_MG(p,tp) (MGFORMAT(p)->OTypeUsed[(tp)]>0) #define NELIST_DEF_IN_MG(p) (MGFORMAT(p)->nodeelementlist) #define NDATA_DEF_IN_MG(p) (MGFORMAT(p)->nodedata) diff --git a/gm/ugm.cc b/gm/ugm.cc index 2a1035136dccfc6ea4efd7f44476bdecf4377476..f558c27c319532dfd56e08c84d884716dbe503b4 100644 --- a/gm/ugm.cc +++ b/gm/ugm.cc @@ -128,9 +128,6 @@ INT ce_NO_DELETE_OVERLAP2 = -1; /** \brief General purpose text buffer */ static char buffer[4*256]; -/** \brief General user data space management */ -static VIRT_HEAP_MGMT *theGenMGUDM; - static INT theMGDirID; /* env var ID for the multigrids */ static INT theMGRootDirID; /* env dir ID for the multigrids */ @@ -3076,7 +3073,7 @@ MULTIGRID * NS_DIM_PREFIX GetNextMultigrid (const MULTIGRID *theMG) MULTIGRID * NS_DIM_PREFIX CreateMultiGrid (char *MultigridName, char *BndValProblem, const char *format, MEM heapSize, INT optimizedIE, INT insertMesh) { - HEAP *theHeap,*theUserHeap; + HEAP *theHeap; MULTIGRID *theMG; INT i,ds; BVP *theBVP; @@ -3137,41 +3134,9 @@ MULTIGRID * NS_DIM_PREFIX CreateMultiGrid (char *MultigridName, char *BndValProb theBVPDesc = MG_BVPD(theMG); /* 1: general user data space */ - if (!theGenMGUDM->locked) - CalcAndFixTotalSize(theGenMGUDM); - ds = theGenMGUDM->TotalSize; - if (ds!=0) - { - GEN_MGUD(theMG) = GetMem(theHeap,ds,FROM_BOTTOM); - if (GEN_MGUD(theMG)==NULL) - { - DisposeMultiGrid(theMG); - return(NULL); - } - /* clearing this heap provides the possibility of checking the - initialization */ - memset(GEN_MGUD(theMG),0,ds); - } - else - GEN_MGUD(theMG) = NULL; - + // As we are using this version only with DUNE, we will never have UG user data /* 2: user heap */ // As we are using this version only with DUNE, we will never need the user heap -#if 0 - ds = FMT_S_MG(theFormat); - if (ds!=0) - { - theUserHeap = NewHeap(SIMPLE_HEAP, ds, GetMem(theHeap,ds,FROM_BOTTOM)); - if (theUserHeap==NULL) - { - DisposeMultiGrid(theMG); - return(NULL); - } - MG_USER_HEAP(theMG) = theUserHeap; - } - else -#endif - MG_USER_HEAP(theMG) = NULL; /* fill multigrid structure */ theMG->status = 0; @@ -4272,9 +4237,6 @@ INT NS_DIM_PREFIX DisposeMultiGrid (MULTIGRID *theMG) DDD_IFRefreshAll(); #endif - /* dispose user data */ - DisposeMem(MGHEAP(theMG), GEN_MGUD(theMG)); - /** \todo Normally the MG-heap should be cleaned-up before freeing. DDD depends on storage in the heap, even if no DDD objects are allocated!! (due to free-lists, DDD type definitions @@ -9938,12 +9900,6 @@ INT NS_DIM_PREFIX InitUGManager () { INT i; - theGenMGUDM = (VIRT_HEAP_MGMT*)malloc(SIZEOF_VHM); - if (theGenMGUDM==NULL) - return (__LINE__); - - InitVirtualHeapManagement(theGenMGUDM,SIZE_UNKNOWN); - /* install the /Multigrids directory */ if (ChangeEnvDir("/")==NULL) { @@ -9968,8 +9924,6 @@ INT NS_DIM_PREFIX InitUGManager () INT NS_DIM_PREFIX ExitUGManager () { - free(theGenMGUDM); - return 0; } diff --git a/gm/ugm.h b/gm/ugm.h index 08708e5f73cd8ffe2814e734944ab878334d9159..6b41e5ae8b28453b2d14a59cd2ff52940b8e5b47 100644 --- a/gm/ugm.h +++ b/gm/ugm.h @@ -127,7 +127,6 @@ INT FindNeighborElement (const ELEMENT *theElement, INT Side, EL bool PointInElement (const DOUBLE*, const ELEMENT *theElement); INT PointOnSide (const DOUBLE *global, const ELEMENT *theElement, INT side); DOUBLE DistanceFromSide (const DOUBLE *global, const ELEMENT *theElement, INT side); -NS_PREFIX VIRT_HEAP_MGMT *GetGenMGUDM (void); INT CheckOrientation (INT n, VERTEX **vertices); INT CheckOrientationInGrid (GRID *theGrid);