| 1 |
// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root |
| 2 |
// SPDX-License-Identifier: LGPL-2.1-or-later |
| 3 |
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
| 4 |
// vi: set et ts=4 sw=2 sts=2: |
| 5 |
/****************************************************************************/ |
| 6 |
/* */ |
| 7 |
/* File: dlmgr.c */ |
| 8 |
/* */ |
| 9 |
/* Purpose: functions for dynamic linked list management */ |
| 10 |
/* */ |
| 11 |
/* Author: Stefan Lang */ |
| 12 |
/* Institut fuer Computeranwendungen III */ |
| 13 |
/* Universitaet Stuttgart */ |
| 14 |
/* Pfaffenwaldring 27 */ |
| 15 |
/* 70550 Stuttgart */ |
| 16 |
/* email: [email protected] */ |
| 17 |
/* phone: 0049-(0)711-685-7003 */ |
| 18 |
/* fax : 0049-(0)711-685-7000 */ |
| 19 |
/* */ |
| 20 |
/* History: 961216 sl start of dynamic list management */ |
| 21 |
/* */ |
| 22 |
/* Remarks: */ |
| 23 |
/* Management of dynamic linked lists, which consist of */ |
| 24 |
/* several parts. An object can be mapped to a part of the list */ |
| 25 |
/* by its priority using PRIO2LISTPART(). */ |
| 26 |
/* The formulation on object basis allows for management of */ |
| 27 |
/* elements, nodes, vectors and vertices. */ |
| 28 |
/* A list has the form: */ |
| 29 |
/* p0first-p0last->p1first-p1last->...->pnfirst..pnlast */ |
| 30 |
/* where each part p0,p1,..,pn is limited by two pointers, */ |
| 31 |
/* pxfirst and pxlast, x=0..n. The part numbers are ordered */ |
| 32 |
/* increasingly and connected in a manner that one can run */ |
| 33 |
/* through the whole list in increasing order (SUCC) but only */ |
| 34 |
/* through one listpart in decreasing order (PRED). */ |
| 35 |
/* Linking/Unlinking of objects in a list part is done in a */ |
| 36 |
/* way that preserves these conventions. */ |
| 37 |
/* */ |
| 38 |
/****************************************************************************/ |
| 39 |
|
| 40 |
#include <config.h> |
| 41 |
#include <cstdio> |
| 42 |
|
| 43 |
#include "dlmgr.h" |
| 44 |
#include "gm.h" |
| 45 |
#include "refine.h" |
| 46 |
|
| 47 |
#ifdef ModelP |
| 48 |
#include <dune/uggrid/parallel/dddif/parallel.h> |
| 49 |
#endif |
| 50 |
|
| 51 |
|
| 52 |
USING_UG_NAMESPACES |
| 53 |
using namespace PPIF; |
| 54 |
|
| 55 |
/* element */ |
| 56 |
#define OTYPE ELEMENT |
| 57 |
#define PRED PREDE |
| 58 |
#define SUCC SUCCE |
| 59 |
#include "dlmgr.t" |
| 60 |
|
| 61 |
/* node */ |
| 62 |
#define OTYPE NODE |
| 63 |
#define PRED PREDN |
| 64 |
#define SUCC SUCCN |
| 65 |
#include "dlmgr.t" |
| 66 |
|
| 67 |
/* vertex */ |
| 68 |
#define OTYPE VERTEX |
| 69 |
#define PRED PREDV |
| 70 |
#define SUCC SUCCV |
| 71 |
#include "dlmgr.t" |
| 72 |
|
| 73 |
/* vector */ |
| 74 |
#define OTYPE VECTOR |
| 75 |
#define PRED PREDVC |
| 76 |
#define SUCC SUCCVC |
| 77 |
#include "dlmgr.t" |
| 78 |
#undef OTYPE |
| 79 |
#undef PRED |
| 80 |
#undef SUCC |