/usr/include/ug/disctools.h is in libdune-uggrid-dev 2.5.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
/****************************************************************************/
/* */
/* File: disctools.h */
/* */
/* Purpose: tools for assembling (header file) */
/* */
/* Author: Christian Wieners */
/* Institut fuer Computeranwendungen III */
/* Universitaet Stuttgart */
/* Pfaffenwaldring 27 */
/* 70569 Stuttgart */
/* email: ug@ica3.uni-stuttgart.de */
/* */
/* History: Nov 27 95 */
/* */
/* Remarks: */
/* */
/****************************************************************************/
/****************************************************************************/
/* */
/* auto include mechanism and other include files */
/* */
/****************************************************************************/
#ifndef __DISCTOOLS__
#define __DISCTOOLS__
#include "ugtypes.h"
#include "gm.h"
#include "np.h"
#include "namespace.h"
START_UGDIM_NAMESPACE
/****************************************************************************/
/* */
/* defines in the following order */
/* */
/* compile time constants defining static data size (i.e. arrays) */
/* other constants */
/* macros */
/* */
/****************************************************************************/
#ifdef __TWODIM__
#define MAX_NODAL_VECTORS 9
#define MAX_NODAL_VALUES 20
#define MAX_BND_VECTORS 4
#endif
#ifdef __THREEDIM__
#define MAX_NODAL_VECTORS 20
#define MAX_NODAL_VALUES 68
#define MAX_BND_VECTORS 8
#endif
#define MAXVD 25
#define MAXMD 5
#define MVMD_NVD(p) ((p)->nvd)
#define MVMD_NMD(p) ((p)->nmd)
#define MVMD_VD(p,j) ((p)->vdlist[j])
#define MVMD_MD(p,j) ((p)->mdlist[j])
#define MVMD_TYPES(p) ((p)->types)
#define MVMD_TYPE(p,i) (MVMD_TYPES(p)[i])
#define MVMD_DATATYPES(p) ((p)->datatypes)
#define MVMD_OBJTYPES(p) ((p)->objtypes)
#define MVMD_VDSUBSEQ(p,i) ((p)->vdsubseq[i])
#define MVMD_MDSUBSEQ(p,i) ((p)->mdsubseq[i])
#define MVMD_M_OF_1_ONLY(p) ((p)->MatOfFirstVecOnly)
/****************************************************************************/
/* */
/* data structures exported by the corresponding source file */
/* */
/****************************************************************************/
typedef struct {
/* to be filled before call of PrepareElementMultipleVMPtrs */
INT nvd;
const VECDATA_DESC *vdlist[MAXVD];
INT nmd;
const MATDATA_DESC *mdlist[MAXMD];
/* filled by PrepareElementMultipleVMPtrs */
SHORT types[NVECTYPES];
INT datatypes;
INT objtypes;
INT vdsubseq[MAXVD];
INT mdsubseq[MAXMD];
INT MatOfFirstVecOnly; /* default false, may be changed after call */
/* of PrepareElementMultipleVMPtrs */
} MVM_DESC;
/****************************************************************************/
/* */
/* definition of exported global variables */
/* */
/****************************************************************************/
/****************************************************************************/
/* */
/* function declarations */
/* */
/****************************************************************************/
CoeffProcPtr MG_GetCoeffFct (const MULTIGRID *theMG, INT n);
UserProcPtr MG_GetUserFct (MULTIGRID *theMG, INT n);
INT GetElementVertices (ELEMENT *theElement, DOUBLE **x);
INT GetAllVectorsOfElementOfType(ELEMENT *theElement, VECTOR **vec,
const VECDATA_DESC *theVD);
INT GetAllVectorsOfElementsideOfType (ELEMENT *theElement, INT side,
VECTOR **vec,
const VECDATA_DESC *theVD);
INT GetElementsideIndices (ELEMENT *theElement, INT side,
const VECDATA_DESC *theTVD, INT *index);
/* getting (pointers to) data corresponding to a (fixed, s.b.) set of XXXDATA_DESCs */
INT GetElementVPtrs (ELEMENT *theElement, const VECDATA_DESC *theTVD,
DOUBLE **vptr);
INT GetElementVValues (ELEMENT *theElement,
const VECDATA_DESC *theVD, DOUBLE *value);
INT AddElementVValues (ELEMENT *theElement,
const VECDATA_DESC *theVD, DOUBLE *value);
INT GetVlistVValues (INT cnt, VECTOR **theVec,
const VECDATA_DESC *theVD, DOUBLE *value);
INT AddVlistVValues (INT cnt, VECTOR **theVec,
const VECDATA_DESC *theVD, DOUBLE *value);
INT SetVlistVValues (INT cnt, VECTOR **theVec,
const VECDATA_DESC *theVD, DOUBLE *value);
INT GetElementVPtrsVecskip (ELEMENT *theElement, const VECDATA_DESC *theTVD,
DOUBLE **vptr, INT *vecskip);
INT GetElementNewVPtrs (ELEMENT *theElement, const VECDATA_DESC *theVD,
DOUBLE **vptr, INT *newField);
INT GetElementMPtrs (ELEMENT *theElement,
const MATDATA_DESC *theTMD, DOUBLE **mptr);
INT GetVlistMValues (INT cnt, VECTOR **theVec,
const MATDATA_DESC *theMD, DOUBLE *value);
INT AddVlistMValues (GRID *theGrid, INT cnt, VECTOR **theVec,
const MATDATA_DESC *theMD, DOUBLE *value);
INT SetVlistMValues (GRID *theGrid, INT cnt, VECTOR **theVec,
const MATDATA_DESC *theMD, DOUBLE *value);
INT GetElementVMPtrs (ELEMENT *theElement,
const VECDATA_DESC *theTVD, const MATDATA_DESC *theTMD,
DOUBLE **vptr, DOUBLE **mptr);
INT GetElementVVMPtrs (ELEMENT *theElement, const VECDATA_DESC *theTVD1,
const VECDATA_DESC *theTVD2, const MATDATA_DESC *theTMD,
DOUBLE **vptr1, DOUBLE **vptr2, DOUBLE **mptr,
INT *vecskip);
/* getting pointers to data corresponding to a variable set of XXXDATA_DESCs */
/* CAUTION: these fcts. follow other conventions than GetElementVVMPtrs... */
INT PrepareElementMultipleVMPtrs (MVM_DESC *mvmd);
INT GetElementMultipleVMPtrs (ELEMENT *elem, const MVM_DESC *mvmd,
DOUBLE **vptrlist[MAXVD],
DOUBLE **mptrlist[MAXMD],
INT *vecskip, INT *vtype, INT nvec[MAXVD]);
INT PrepareBndVecMultipleVMPtrs (GRID *theGrid, MVM_DESC *mvmd);
INT GetBndVecMultipleVMPtrs (const MVM_DESC *mvmd,
INT *cnt,
VECTOR *VecList[],
DOUBLE **vptrlist[MAXVD],
DOUBLE **mptrlist[MAXMD],
INT *vecskip, INT *vtype, INT nvec[MAXVD]);
INT ResetBndVecMultipleVMPtrs (void);
INT FinishBndVecMultipleVMPtrs (void);
/* skip flags */
INT ComputePartVecskip (const VECDATA_DESC *vd, const VECDATA_DESC *vds, INT typeskip[NVECTYPES], INT co_typeskip[NVECTYPES]);
INT ClearPartVecskipFlags (GRID *theGrid, const INT typeskip[NVECTYPES]);
INT ClearVecskipFlags (GRID *theGrid, const VECDATA_DESC *theVD);
INT GetElementDirichletFlags (ELEMENT *theElement, const VECDATA_DESC *theVD,
INT *vecskip);
INT SetElementDirichletFlags (ELEMENT *theElement, const VECDATA_DESC *theVD,
INT *vecskip);
INT GetVlistVecskip (INT cnt, VECTOR **theVec,
const VECDATA_DESC *theVD, INT *vecskip);
INT SetVlistVecskip (INT cnt, VECTOR **theVec,
const VECDATA_DESC *theVD, INT *vecskip);
/* modifications in Dirichlet dofs */
INT ModifyDirichletMatrix (GRID *theGrid, const MATDATA_DESC *Mat);
INT ModifyDirichletDefect (GRID *theGrid, const VECDATA_DESC *Def);
INT ClearDirichletValues (GRID *theGrid, VECDATA_DESC *x);
INT AssembleDirichletBoundary (GRID *theGrid, const MATDATA_DESC *Mat,
const VECDATA_DESC *Sol, const VECDATA_DESC *Rhs);
INT AssembleTotalDirichletBoundary (GRID *theGrid, const MATDATA_DESC *Mat,
const VECDATA_DESC *Sol, const VECDATA_DESC *Rhs);
/* display data */
INT ConvertMatrix (GRID *theGrid, NS_PREFIX HEAP *theHeap, INT MarkKey,
MATDATA_DESC *A, INT symmetric,
int *pn, int **pia, int **pja, double **pa);
INT PrintVector (GRID *g, const VECDATA_DESC *X, INT vclass, INT vnclass);
INT PrintVectorListX (const VECTOR *vlist[], const VECDATA_DESC *X, INT vclass, INT vnclass, PrintfProcPtr Printf);
INT PrintVectorX (const GRID *g, const VECDATA_DESC *X, INT vclass, INT vnclass, PrintfProcPtr Printf);
INT PrintSVector (MULTIGRID *mg, VECDATA_DESC *X);
INT PrintMatrix (GRID *g, MATDATA_DESC *Mat, INT vclass, INT vnclass);
INT PrintTMatrix (GRID *g, MATDATA_DESC *Mat, INT vclass, INT vnclass);
INT PrintDiagMatrix (GRID *g, MATDATA_DESC *Mat, INT vclass, INT vnclass);
INT PrintIMatrix (GRID *g, VECDATA_DESC *V, INT vclass, INT vnclass);
END_UGDIM_NAMESPACE
#endif
|