| 1 |
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
| 2 |
// vi: set et ts=4 sw=2 sts=2: |
| 3 |
// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root |
| 4 |
// SPDX-License-Identifier: LGPL-2.1-or-later |
| 5 |
/*! \file ugm.h |
| 6 |
* \ingroup gm |
| 7 |
*/ |
| 8 |
|
| 9 |
|
| 10 |
/****************************************************************************/ |
| 11 |
/* */ |
| 12 |
/* File: ugm.h */ |
| 13 |
/* */ |
| 14 |
/* Purpose: unstructured grid manager header file */ |
| 15 |
/* internal interface in grid manager module */ |
| 16 |
/* */ |
| 17 |
/* Author: Peter Bastian */ |
| 18 |
/* Interdisziplinaeres Zentrum fuer Wissenschaftliches Rechnen */ |
| 19 |
/* Universitaet Heidelberg */ |
| 20 |
/* Im Neuenheimer Feld 368 */ |
| 21 |
/* 6900 Heidelberg */ |
| 22 |
/* internet: [email protected] */ |
| 23 |
/* */ |
| 24 |
/* History: 09.03.92 begin, ug version 2.0 */ |
| 25 |
/* 13.12.94 begin, ug version 3.0 */ |
| 26 |
/* */ |
| 27 |
/* Remarks: */ |
| 28 |
/* */ |
| 29 |
/****************************************************************************/ |
| 30 |
|
| 31 |
|
| 32 |
/****************************************************************************/ |
| 33 |
/* */ |
| 34 |
/* auto include mechanism and other include files */ |
| 35 |
/* */ |
| 36 |
/****************************************************************************/ |
| 37 |
|
| 38 |
#ifndef __UGM__ |
| 39 |
#define __UGM__ |
| 40 |
|
| 41 |
#include <dune/uggrid/low/namespace.h> |
| 42 |
#include <dune/uggrid/low/ugtypes.h> |
| 43 |
|
| 44 |
#include "gm.h" |
| 45 |
#include "dlmgr.h" |
| 46 |
|
| 47 |
START_UGDIM_NAMESPACE |
| 48 |
|
| 49 |
/****************************************************************************/ |
| 50 |
/* */ |
| 51 |
/* defines in the following order */ |
| 52 |
/* */ |
| 53 |
/* compile time constants defining static data size (i.e. arrays) */ |
| 54 |
/* other constants */ |
| 55 |
/* macros */ |
| 56 |
/* */ |
| 57 |
/****************************************************************************/ |
| 58 |
|
| 59 |
#define MAX_PAR_DIST 1.0E-6 /* max.dist between different parameter */ |
| 60 |
|
| 61 |
/****************************************************************************/ |
| 62 |
/* */ |
| 63 |
/* data structures exported by the corresponding source file */ |
| 64 |
/* */ |
| 65 |
/****************************************************************************/ |
| 66 |
|
| 67 |
|
| 68 |
/****************************************************************************/ |
| 69 |
/* */ |
| 70 |
/* definition of exported global variables */ |
| 71 |
/* */ |
| 72 |
/****************************************************************************/ |
| 73 |
|
| 74 |
/****************************************************************************/ |
| 75 |
/* */ |
| 76 |
/* function declarations */ |
| 77 |
/* */ |
| 78 |
/****************************************************************************/ |
| 79 |
|
| 80 |
/* init */ |
| 81 |
INT InitUGManager (void); |
| 82 |
INT ExitUGManager (); |
| 83 |
|
| 84 |
/* object handling */ |
| 85 |
GM_OBJECTS GetFreeOBJT (void); |
| 86 |
|
| 87 |
/* create basic objects */ |
| 88 |
/** \todo Commented out because no definitions exist for these declarations |
| 89 |
|
| 90 |
#if defined(UG_DIM_2) |
| 91 |
int GetElemLink (NODE *from, NODE *to, ELEMENT *theElement); |
| 92 |
ELEMENT *NbElem (const ELEMENT *theElement, int i); |
| 93 |
void Set_NbElem (ELEMENT *theElement, int i, ELEMENT *Neighbor); |
| 94 |
#endif |
| 95 |
*/ |
| 96 |
|
| 97 |
#ifdef ModelP |
| 98 |
EDGE * CreateEdge (GRID *theGrid, ELEMENT *theElement, INT i, bool with_vector); |
| 99 |
#endif |
| 100 |
ELEMENT * CreateElement (GRID *theGrid, INT tag, INT objtype, |
| 101 |
NODE **nodes, ELEMENT *Father, bool with_vector); |
| 102 |
INT CreateSonElementSide (GRID *theGrid, ELEMENT *theElement, |
| 103 |
INT side, ELEMENT *theSon, INT son_side); |
| 104 |
|
| 105 |
GRID *CreateNewLevel (MULTIGRID *theMG); |
| 106 |
|
| 107 |
/* dispose basic objects */ |
| 108 |
INT DisposeElement (GRID *theGrid, ELEMENT *theElement); |
| 109 |
INT DisposeTopLevel (MULTIGRID *theMG); |
| 110 |
INT DisposeNode (GRID *theGrid, NODE *theNode); |
| 111 |
|
| 112 |
/* miscellaneous */ |
| 113 |
INT FindNeighborElement (const ELEMENT *theElement, INT Side, ELEMENT **theNeighbor, INT *NeighborSide); |
| 114 |
INT CheckOrientation (INT n, VERTEX **vertices); |
| 115 |
INT CheckOrientationInGrid (GRID *theGrid); |
| 116 |
|
| 117 |
NODE *CreateSonNode (GRID *theGrid, NODE *FatherNode); |
| 118 |
NODE *CreateMidNode (GRID *theGrid, ELEMENT *theElement, VERTEX *theVertex, INT edge); |
| 119 |
NODE *GetCenterNode (const ELEMENT *theElement); |
| 120 |
NODE *CreateCenterNode (GRID *theGrid, ELEMENT *theElement, VERTEX *theVertex); |
| 121 |
|
| 122 |
#ifdef UG_DIM_3 |
| 123 |
NODE *CreateSideNode (GRID *theGrid, ELEMENT *theElement, VERTEX *theVertex, INT side); |
| 124 |
NODE *GetSideNode (const ELEMENT *theElement, INT side); |
| 125 |
#endif |
| 126 |
INT GetSideIDFromScratch (ELEMENT *theElement, NODE *theNode); |
| 127 |
NODE *GetMidNode (const ELEMENT *theElement, INT edge); |
| 128 |
INT GetNodeContext (const ELEMENT *theElement, NODE **theElementContext); |
| 129 |
void GetNbSideByNodes (ELEMENT *theNeighbor, INT *nbside, ELEMENT *theElement, INT side); |
| 130 |
|
| 131 |
|
| 132 |
void *GetMemoryForObject (MULTIGRID *mg, INT size, INT type); |
| 133 |
INT PutFreeObject (MULTIGRID *mg, void *object, INT size, GM_OBJECTS type); |
| 134 |
|
| 135 |
/* determination of node classes */ |
| 136 |
INT ClearNodeClasses (GRID *theGrid); |
| 137 |
INT SeedNodeClasses (ELEMENT *theElement); |
| 138 |
INT PropagateNodeClasses (GRID *theGrid); |
| 139 |
INT ClearNextNodeClasses (GRID *theGrid); |
| 140 |
INT SeedNextNodeClasses (ELEMENT *theElement); |
| 141 |
INT PropagateNextNodeClasses (GRID *theGrid); |
| 142 |
INT MaxNextNodeClass (const ELEMENT *theElement); |
| 143 |
INT MinNodeClass (const ELEMENT *theElement); |
| 144 |
INT MinNextNodeClass (const ELEMENT *theElement); |
| 145 |
|
| 146 |
END_UGDIM_NAMESPACE |
| 147 |
|
| 148 |
#endif |