This file is indexed.

/usr/include/nginterface.h is in libnglib-dev 4.9.13.dfsg-3ubuntu1.

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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
#ifndef NGINTERFACE
#define NGINTERFACE





/**************************************************************************/
/* File:   nginterface.h                                                  */
/* Author: Joachim Schoeberl                                              */
/* Date:   20. Nov. 99                                                    */
/**************************************************************************/

/*
  Application program interface to Netgen

*/

#ifdef WIN32
   #ifdef NGINTERFACE_EXPORTS
      #define DLL_HEADER   __declspec(dllexport)
   #else
      #define DLL_HEADER   __declspec(dllimport)
   #endif
#else
   #define DLL_HEADER 
#endif


// max number of nodes per element
#define NG_ELEMENT_MAXPOINTS 12

// max number of nodes per surface element
#define NG_SURFACE_ELEMENT_MAXPOINTS 8



// implemented element types:
enum NG_ELEMENT_TYPE { 
  NG_SEGM = 1, NG_SEGM3 = 2,
  NG_TRIG = 10, NG_QUAD=11, NG_TRIG6 = 12, NG_QUAD6 = 13,
  NG_TET = 20, NG_TET10 = 21, 
  NG_PYRAMID = 22, NG_PRISM = 23, NG_PRISM12 = 24,
  NG_HEX = 25
};

typedef double NG_POINT[3];  // coordinates
typedef int NG_EDGE[2];      // initial point, end point
typedef int NG_FACE[4];      // points, last one is 0 for trig


#ifdef __cplusplus
extern "C" {
#endif
  
  // load geomtry from file 
  DLL_HEADER void Ng_LoadGeometry (const char * filename);
  
  // load netgen mesh
  DLL_HEADER void Ng_LoadMesh (const char * filename);

  // load netgen mesh
  DLL_HEADER void Ng_LoadMeshFromString (const char * mesh_as_string);

  // space dimension (2 or 3)
  DLL_HEADER int Ng_GetDimension ();

  // number of mesh points
  DLL_HEADER int Ng_GetNP ();
  
  // number of mesh vertices (differs from GetNP for 2nd order elements)
  DLL_HEADER int Ng_GetNV ();
  
  // number of mesh elements
  DLL_HEADER int Ng_GetNE ();
  
  // number of surface triangles
  DLL_HEADER int Ng_GetNSE ();
  
  // Get Point coordintes, index from 1 .. np
  DLL_HEADER void Ng_GetPoint (int pi, double * p);
  
  // Get Element Points
  DLL_HEADER NG_ELEMENT_TYPE Ng_GetElement (int ei, int * epi, int * np = 0);

  // Get Element Type
  DLL_HEADER NG_ELEMENT_TYPE Ng_GetElementType (int ei);

  // Get sub-domain of element ei
  DLL_HEADER int Ng_GetElementIndex (int ei);

  DLL_HEADER void Ng_SetElementIndex(const int ei, const int index);

  // Get Material of element ei
  DLL_HEADER char * Ng_GetElementMaterial (int ei);

  // Get Material of domain dom
  DLL_HEADER char * Ng_GetDomainMaterial (int dom);
  
  // Get User Data
  DLL_HEADER int Ng_GetUserDataSize (char * id);
  DLL_HEADER void Ng_GetUserData (char * id, double * data);

  // Get Surface Element Points
  DLL_HEADER NG_ELEMENT_TYPE Ng_GetSurfaceElement (int ei, int * epi, int * np = 0);

  // Get Surface Element Type
  DLL_HEADER NG_ELEMENT_TYPE Ng_GetSurfaceElementType (int ei);

  // Get Surface Element Index
  DLL_HEADER int Ng_GetSurfaceElementIndex (int ei);

  // Get Surface Element Surface Number
  DLL_HEADER int Ng_GetSurfaceElementSurfaceNumber (int ei);
  
  // Get Surface Element Number
  DLL_HEADER int Ng_GetSurfaceElementFDNumber (int ei);

  // Get BCName for Surface Element  
  DLL_HEADER char * Ng_GetSurfaceElementBCName (int ei);
  //void Ng_GetSurfaceElementBCName (int ei, char * name);

  // Get BCName for bc-number
  DLL_HEADER char * Ng_GetBCNumBCName (int bcnr);
  //void Ng_GetBCNumBCName (int bcnr, char * name);

  // Get normal vector of surface element node
  DLL_HEADER void Ng_GetNormalVector (int sei, int locpi, double * nv);     
  

  DLL_HEADER void Ng_SetPointSearchStartElement(int el);
  
  // Find element of point, returns local coordinates
  DLL_HEADER int Ng_FindElementOfPoint (double * p, double * lami,
                                        int build_searchtrees = 0, 
                                        const int * const indices = NULL, const int numind = 0);
  
  // Find surface element of point, returns local coordinates
  DLL_HEADER int Ng_FindSurfaceElementOfPoint (double * p, double * lami,
                                               int build_searchtrees = 0, 
                                               const int * const indices = NULL, const int numind = 0);
  

  // is elment ei curved ?
  DLL_HEADER int Ng_IsElementCurved (int ei);
  // is elment sei curved ?
  DLL_HEADER int Ng_IsSurfaceElementCurved (int sei);

  /// Curved Elemens:
  /// xi..local coordinates
  /// x ..global coordinates
  /// dxdxi...D x D Jacobian matrix (row major storage)
  DLL_HEADER void Ng_GetElementTransformation (int ei, const double * xi, 
                                               double * x, double * dxdxi);

  
  /// buffer must be at least 100 doubles, alignment of double
  DLL_HEADER void Ng_GetBufferedElementTransformation (int ei, const double * xi, 
                                                       double * x, double * dxdxi,
                                                       void * buffer, int buffervalid);
  


  /// Curved Elemens:
  /// xi..local coordinates
  /// x ..global coordinates
  /// dxdxi...D x D-1 Jacobian matrix (row major storage)
  /// curved ...is element curved ?
  DLL_HEADER void Ng_GetSurfaceElementTransformation (int sei, const double * xi, 
                                                      double * x, double * dxdxi);
  
  /// Curved Elemens:
  /// xi..local coordinates
  /// sxi..step xi
  /// x ..global coordinates
  /// dxdxi...D x D Jacobian matrix (row major storage)
  DLL_HEADER void Ng_GetMultiElementTransformation (int ei, int n,
                                                    const double * xi, size_t sxi,
                                                    double * x, size_t sx,
                                                    double * dxdxi, size_t sdxdxi);

  
  
  DLL_HEADER int Ng_GetSegmentIndex (int elnr);
  DLL_HEADER NG_ELEMENT_TYPE Ng_GetSegment (int elnr, int * epi, int * np = 0);




  // Mark element for refinement
  DLL_HEADER void Ng_SetRefinementFlag (int ei, int flag);
  DLL_HEADER void Ng_SetSurfaceRefinementFlag (int sei, int flag);

  // Do local refinement
  enum NG_REFINEMENT_TYPE { NG_REFINE_H = 0, NG_REFINE_P = 1, NG_REFINE_HP = 2 };
  DLL_HEADER void Ng_Refine (NG_REFINEMENT_TYPE reftype);

  // Use second order elements
  DLL_HEADER void Ng_SecondOrder ();
  DLL_HEADER void Ng_HighOrder (int order, bool rational = false);
  //void Ng_HPRefinement (int levels, double parameter = 0.125);
  DLL_HEADER void Ng_HPRefinement (int levels, double parameter = 0.125,
                                   bool setorders = true,bool ref_level = false);
  // void Ng_HPRefinement (int levels);
  // void Ng_HPRefinement (int levels, double parameter);


  // Topology and coordinate information of master element:

  DLL_HEADER int Ng_ME_GetNVertices (NG_ELEMENT_TYPE et);
  DLL_HEADER int Ng_ME_GetNEdges (NG_ELEMENT_TYPE et);
  DLL_HEADER int Ng_ME_GetNFaces (NG_ELEMENT_TYPE et);

  DLL_HEADER const NG_POINT * Ng_ME_GetVertices (NG_ELEMENT_TYPE et);
  DLL_HEADER const NG_EDGE * Ng_ME_GetEdges (NG_ELEMENT_TYPE et);
  DLL_HEADER const NG_FACE * Ng_ME_GetFaces (NG_ELEMENT_TYPE et);

  DLL_HEADER int Ng_GetNEdges();
  DLL_HEADER int Ng_GetNFaces();

  
  DLL_HEADER int Ng_GetElement_Edges (int elnr, int * edges, int * orient = 0);
  DLL_HEADER int Ng_GetElement_Faces (int elnr, int * faces, int * orient = 0);

  DLL_HEADER int Ng_GetSurfaceElement_Edges (int selnr, int * edges, int * orient = 0);
  DLL_HEADER int Ng_GetSurfaceElement_Face (int selnr, int * orient = 0);

  DLL_HEADER void Ng_GetSurfaceElementNeighbouringDomains(const int selnr, int & in, int & out);
       
  DLL_HEADER int Ng_GetFace_Vertices (int fnr, int * vert);
  DLL_HEADER void Ng_GetEdge_Vertices (int ednr, int * vert);
  DLL_HEADER int Ng_GetFace_Edges (int fnr, int * edge);

  DLL_HEADER int Ng_GetNVertexElements (int vnr);
  DLL_HEADER void Ng_GetVertexElements (int vnr, int * els);

  DLL_HEADER int Ng_GetElementOrder (int enr);
  DLL_HEADER void Ng_GetElementOrders (int enr, int * ox, int * oy, int * oz);

  DLL_HEADER void Ng_SetElementOrder (int enr, int order);
  DLL_HEADER void Ng_SetElementOrders (int enr, int ox, int oy, int oz);

  DLL_HEADER int Ng_GetSurfaceElementOrder (int enr);
  DLL_HEADER void Ng_GetSurfaceElementOrders (int enr, int * ox, int * oy);

  DLL_HEADER void Ng_SetSurfaceElementOrder (int enr, int order);
  DLL_HEADER void Ng_SetSurfaceElementOrders (int enr, int ox, int oy);

  // Multilevel functions:

  // number of levels:
  DLL_HEADER int Ng_GetNLevels ();
  // get two parent nodes (indeed vertices !) of node ni
  DLL_HEADER void Ng_GetParentNodes (int ni, int * parents);

  // get parent element (first child has always same number)
  DLL_HEADER int Ng_GetParentElement (int ei);

  // get parent surface element (first child has always same number)
  DLL_HEADER int Ng_GetParentSElement (int ei);

  // representant of anisotropic cluster
  DLL_HEADER int Ng_GetClusterRepVertex (int vi);
  DLL_HEADER int Ng_GetClusterRepEdge (int edi);
  DLL_HEADER int Ng_GetClusterRepFace (int fai);
  DLL_HEADER int Ng_GetClusterRepElement (int eli);


  void Ng_SurfaceElementTransformation (int eli, double x, double y, 
					double * p3d, double * jacobian);

#ifdef PARALLEL
  // Is Element ei an element of this processor ??
  bool Ng_IsGhostEl (int ei);

  void Ng_SetGhostEl(const int ei, const bool aisghost );

  bool Ng_IsGhostSEl (int ei);

  void Ng_SetGhostSEl(const int ei, const bool aisghost );

  bool Ng_IsGhostVert ( int pnum );
  bool Ng_IsGhostEdge ( int ednum );
  bool Ng_IsGhostFace ( int fanum );

  bool Ng_IsExchangeEl ( int elnum );
  bool Ng_IsExchangeSEl ( int selnr );

  void Ng_UpdateOverlap ();
  int Ng_Overlap();
/*   void Ng_SetGhostVert ( const int pnum, const bool aisghost ); */
/*   void Ng_SetGhostEdge ( const int ednum, const bool aisghost ); */
/*   void Ng_SetGhostFace ( const int fanum, const bool aisghost ); */

#endif
  
  namespace netgen {
  // #include "../visualization/soldata.hpp"
    class SolutionData;
  }

  enum Ng_SolutionType
  { NG_SOLUTION_NODAL = 1, 
    NG_SOLUTION_ELEMENT = 2, 
    NG_SOLUTION_SURFACE_ELEMENT = 3, 
    NG_SOLUTION_NONCONTINUOUS = 4,
    NG_SOLUTION_SURFACE_NONCONTINUOUS = 5,
    NG_SOLUTION_VIRTUAL_FUNCTION = 6,
    NG_SOLUTION_MARKED_ELEMENTS = 10,
    NG_SOLUTION_ELEMENT_ORDER = 11
  };
  
  struct Ng_SolutionData
  {
    const char * name; // name of gridfunction
    double * data;    // solution values
    int components;   // relevant (double) components in solution vector
    int dist;         // # doubles per entry alignment! 
    int iscomplex;    // complex vector ? 
    bool draw_surface;
    bool draw_volume;
    int order;        // order of elements, only partially supported 
    Ng_SolutionType soltype;  // type of solution function
    netgen::SolutionData * solclass;
  };
  
  // initialize solution data with default arguments
  DLL_HEADER void Ng_InitSolutionData (Ng_SolutionData * soldata);
  // set solution data
  DLL_HEADER void Ng_SetSolutionData (Ng_SolutionData * soldata);
  /// delete gridfunctions
  DLL_HEADER void Ng_ClearSolutionData();
  // redraw 
  DLL_HEADER void Ng_Redraw();
  //
  DLL_HEADER void Ng_SetVisualizationParameter (const char * name, 
                                                const char * value);
  

  // number of periodic vertices  
  DLL_HEADER int Ng_GetNPeriodicVertices (int idnr);
  // pairs should be an integer array of 2*npairs
  DLL_HEADER void Ng_GetPeriodicVertices (int idnr, int * pairs); 

  // number of periodic edges  
  DLL_HEADER int Ng_GetNPeriodicEdges (int idnr);
  // pairs should be an integer array of 2*npairs
  DLL_HEADER void Ng_GetPeriodicEdges (int idnr, int * pairs); 

  DLL_HEADER void RunParallel ( void * (*fun)(void *), void * in);

  DLL_HEADER void Ng_PushStatus (const char * str);
  DLL_HEADER void Ng_PopStatus ();
  DLL_HEADER void Ng_SetThreadPercentage (double percent);
  DLL_HEADER void Ng_GetStatus (char ** str, double & percent);

  DLL_HEADER void Ng_SetTerminate(void);
  DLL_HEADER void Ng_UnSetTerminate(void);
  DLL_HEADER int Ng_ShouldTerminate(void);
  DLL_HEADER void Ng_SetRunning(int flag);
  DLL_HEADER int Ng_IsRunning();
  
  //// added by Roman Stainko ....
  DLL_HEADER int Ng_GetVertex_Elements( int vnr, int* elems);
  DLL_HEADER int Ng_GetVertex_SurfaceElements( int vnr, int* elems );
  DLL_HEADER int Ng_GetVertex_NElements( int vnr );
  DLL_HEADER int Ng_GetVertex_NSurfaceElements( int vnr );


#ifdef SOCKETS
  int Ng_SocketClientOpen( const int port, const char * host );
  void Ng_SocketClientWrite( const char * write, char ** reply);
  void Ng_SocketClientClose ( void );
  void Ng_SocketClientGetServerHost ( const int number, char ** host );
  void Ng_SocketClientGetServerPort ( const int number, int * port );
  void Ng_SocketClientGetServerClientID ( const int number, int * id );
#endif

  DLL_HEADER void Ng_InitPointCurve(double red, double green, double blue);
  DLL_HEADER void Ng_AddPointCurvePoint(const double * point);


#ifdef PARALLEL
  void Ng_SetElementPartition ( int elnr, int part );
  int  Ng_GetElementPartition ( int elnr );
#endif

  DLL_HEADER void Ng_SaveMesh ( const char * meshfile );
  DLL_HEADER void Ng_Bisect ( const char * refinementfile );

  // if qualityloss is not equal to NULL at input, a (1-based) list of qualitylosses (due to projection)
  // is saved in *qualityloss, its size is the return value
  DLL_HEADER int Ng_Bisect_WithInfo ( const char * refinementfile, double ** qualityloss);
#ifdef __cplusplus
}
#endif

#endif






/*
  The new node interface ...
  it is 0-based !
 */

extern "C" {
  
  /*
    number of nodes of type nt
    nt = 0 is Vertex
    nt = 1 is Edge
    nt = 2 is Face
    nt = 3 is Cell
   */
  DLL_HEADER int Ng_GetNNodes (int nt);

  /*
    closure nodes of node (nt, nodenr):
    nodeset is bit-coded, bit 0 includes Vertices, bit 1 edges, etc
    E.g., nodeset = 6 includes edge and face nodes
    nodes consists of pairs of integers (nodetype, nodenr) 
    return value is number of nodes
   */
  DLL_HEADER int Ng_GetClosureNodes (int nt, int nodenr, int nodeset, int * nodes);

  
  /*
    number of dim-dimensional elements 
    dim = 3 ... volume elements
    dim = 2 ... surface elements
    dim = 1 ... segments
    dim = 0 ... not available
  */
  DLL_HEADER int Ng_GetNElements (int dim);

  /*
    closure nodes of dim-dimensional element elmentnr:
    nodeset is bit-coded, bit 0 includes Vertices, bit 1 edges, etc
    E.g., nodeset = 6 includes edge and face nodes
    nodes consists of pairs of integers (nodetype, nodenr) 
    return value is number of nodes
   */
  DLL_HEADER int Ng_GetElementClosureNodes (int dim, int elementnr, int nodeset, int * nodes);


  struct Ng_Tcl_Interp;
  typedef int (Ng_Tcl_CmdProc) (Ng_Tcl_Interp *interp, int argc, const char *argv[]);

  DLL_HEADER void Ng_Tcl_CreateCommand (Ng_Tcl_Interp * interp, 
                                        const char * cmdName, Ng_Tcl_CmdProc * proc);

  void Ng_Tcl_SetResult (Ng_Tcl_Interp * interp, const char * result);
}





#ifdef __cplusplus
#include <iostream>
namespace netgen 
{
  DLL_HEADER extern std::ostream * testout;
  DLL_HEADER extern int printmessage_importance;
}

#endif