/usr/include/gmsh/Context.h is in libgmsh-dev 2.8.5+dfsg-1.1+b1.
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 | // Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to the public mailing list <gmsh@geuz.org>.
#ifndef _CONTEXT_H_
#define _CONTEXT_H_
#include <vector>
#include <map>
#include <string>
#include "CGNSOptions.h"
#include "meshPartitionOptions.h"
#define NUM_SOLVERS 10
class GamePad;
// The interface-independent context.
struct contextMeshOptions {
int draw, changed, light, lightTwoSide, lightLines, pointType;
int points, lines, triangles, quadrangles, tetrahedra, hexahedra, prisms, pyramids;
int surfacesEdges, surfacesFaces, volumesEdges, volumesFaces, numSubEdges;
int pointsNum, linesNum, surfacesNum, volumesNum, qualityType, labelType;
int optimize, optimizeNetgen, optimizeLloyd, smoothCrossField, refineSteps, remove4triangles;
double normals, tangents, explode, angleSmoothNormals, allowSwapEdgeAngle;
double mshFileVersion, mshFilePartitioned, pointSize, lineWidth;
double qualityInf, qualitySup, radiusInf, radiusSup;
double scalingFactor, lcFactor, randFactor, lcIntegrationPrecision;
double lcMin, lcMax, toleranceEdgeLength, anisoMax, smoothRatio;
int lcFromPoints, lcFromCurvature, lcExtendFromBoundary;
int dual, voronoi, drawSkinOnly, colorCarousel, labelSampling;
int fileFormat, nbSmoothing, algo2d, algo3d, algoSubdivide;
int algoRecombine, recombineAll, recombine3DAll, flexibleTransfinite;
//-- for recombination test (amaury) --
int doRecombinationTest, recombinationTestStart;
int recombinationTestNoGreedyStrat, recombinationTestNewStrat;
int nProc, nbProc;
std::string recTestName;
//-------------------------------------
int remeshParam, remeshAlgo;
int order, secondOrderLinear, secondOrderIncomplete;
int secondOrderExperimental, meshOnlyVisible;
int minCircPoints, minCurvPoints;
int hoOptimize, hoNLayers, hoOptPrimSurfMesh;
double hoThresholdMin, hoThresholdMax, hoPoissonRatio;
int saveAll, saveTri, saveGroupsOfNodes, binary, bdfFieldFormat, saveParametric;
int smoothNormals, reverseAllNormals, zoneDefinition, clip;
int saveElementTagType;
int switchElementTags;
int multiplePasses;
int cgnsImportOrder;
std::map<int,int> algo2d_per_face;
std::map<int,int> curvature_control_per_face;
int bunin;
int ignorePartBound;
int NewtonConvergenceTestXYZ;
};
struct contextGeometryOptions {
int draw, light, lightTwoSide, points, lines, surfaces, volumes;
int pointsNum, linesNum, surfacesNum, volumesNum, labelType;
double pointSize, lineWidth, selectedPointSize, selectedLineWidth;
int pointType, lineType, surfaceType, numSubEdges;
int oldCircle, oldNewreg, oldRuledSurface;
int extrudeSplinePoints, extrudeReturnLateral;
double normals, tangents, scalingFactor;
int autoCoherence, highlightOrphans, clip, useTransform;
double tolerance, snap[3], transform[3][3], offset[3];
int occFixDegenerated, occFixSmallEdges, occFixSmallFaces;
int occSewFaces, occConnectFaces;
int copyMeshingMethod, copyDisplayAttributes, exactExtrusion;
int matchGeomAndMesh;
int hideCompounds, orientedPhysicals;
};
class CTX {
private:
static CTX *_instance;
public:
CTX();
~CTX();
static CTX *instance();
public:
// files on the command line and various file names
std::vector<std::string> files;
std::string bgmFileName, outputFileName, defaultFileName, tmpFileName;
std::string sessionFileName, optionsFileName, errorFileName;
std::string meshStatReportFileName;
std::string argv0;
// the home directory
std::string homeDir;
// file history
std::vector<std::string> recentFiles;
// create mesh statistics report (0: do nothing, 1: create, 2: append)
int createAppendMeshStatReport;
// should we launch a solver at startup?
int launchSolverAtStartup ;
// save session/option file on exit?
int sessionSave, optionsSave;
// ask confirmation when overwriting files?
int confirmOverwrite;
// forced display host:0.0 under X11
std::string display;
// FLTK theme
std::string guiTheme;
// print messages on to the terminal?
int terminal;
// number of graphical windows/tiles
int numWindows, numTiles;
// text editor command (with included '%s')
std::string editor;
// pattern of files to watch out for
std::string watchFilePattern;
// show tootips in the GUI?
int tooltips;
// position and size of various windows in the GUI
int glPosition[2], glSize[2], msgSize, menuPosition[2], menuSize[2], detachedMenu;
int optPosition[2], visPosition[2], hotPosition[2], clipPosition[2], manipPosition[2];
int statPosition[2], ctxPosition[2];
int pluginPosition[2], pluginSize[2], fieldPosition[2], fieldSize[2];
int fileChooserPosition[2], extraPosition[2], extraSize[2];
// use the system menu bar on Mac OS X?
int systemMenuBar;
// batch mode (-4: lua session, -3: server daemon, -2: check coherence, -1: write
// geo, 0: full gfx, 1: 1D mesh, 2: 2D mesh, 3: 3D mesh, 4: adapt
// mesh, 5: refine mesh)
int batch;
// batch operations to apply after meshing (1: partition mesh)
int batchAfterMesh;
// initial menu (0: automatic, 1: geom, 2: mesh, 3: solver, 4: post)
int initialContext;
// never popup dialogs in scripts (use default values instead)?
int noPopup;
// make all windows "non modal"?
int nonModalWindows;
// clipping plane distance factor
double clipFactor;
// display border factor (0 = model fits window size exactly)
double displayBorderFactor;
// do or do not use the trackball for rotations
int useTrackball, trackballHyperbolicSheet;
// gamepad controller
GamePad *gamepad;
// point around which to rotate the scene
double rotationCenter[3];
// rotate around the center of mass instead of rotationCenter[]
int rotationCenterCg;
// "overall" x, y and z min used for drawing and lc computation
double min[3], max[3];
// "center of mass" of the current geometry, used for graphics only
double cg[3];
// characteristic length for the whole problem (never used in mesh
// generation ->only for geo/post)
double lc;
// double buffer/antialias/stereo graphics?
int db, antialiasing, stereo, camera ;
bool fileread;
double eye_sep_ratio,focallength_ratio,camera_aperture;
// orthogonal projection?
int ortho;
// draw the bounding boxes and the rot center?
int drawBBox, drawRotationCenter;
// draw simplified model during user interaction?
int fastRedraw;
// small axes options
int smallAxes, smallAxesSize, smallAxesPos[2];
// large axes options
int axes, axesAutoPosition, axesMikado, axesForceValue;
double axesPosition[6], axesValue[6], axesTics[3];
std::string axesLabel[3], axesFormat[3];
// simple dynamic lock (should be a mutex)
int lock;
// enable alpha blending?
int alpha;
// mouse2 zoom coefficient
double zoomFactor;
// draw background gradient?
int bgGradient;
// draw background image?
std::string bgImageFileName;
double bgImagePosition[2], bgImageSize[2];
int bgImage3d, bgImagePage;
// fltk font size (and delta for palette windows)
int fontSize, deltaFontSize;
// font name, FLTK enum and size for opengl graphics
std::string glFont, glFontTitle, glFontEngine;
int glFontEnum, glFontEnumTitle, glFontSize, glFontSizeTitle;
// point/line widths
double pointSize, lineWidth;
// light options
int light[6];
double lightPosition[6][4], shine, shineExponent;
// clipping plane options
double clipPlane[6][4];
int clipWholeElements, clipOnlyDrawIntersectingVolume, clipOnlyVolume;
// polygon offset options
int polygonOffset, polygonOffsetAlways;
double polygonOffsetFactor, polygonOffsetUnits;
// color scheme
int colorScheme;
// number of subdivisions for gluQuadrics
int quadricSubdivisions;
// vector display type and options (for normals, etc.)
int vectorType;
double arrowRelHeadRadius, arrowRelStemRadius, arrowRelStemLength;
// records cpu times for 1-D, 2-D and 3-D mesh generation
double meshTimer[3];
// dynamic variable tracking if the bbox is currently imposed
int forcedBBox;
// enable selection/hover/picking using the mouse
int mouseSelection, mouseHoverMeshes, pickElements;
// disable some warnings for expert users?
int expertMode;
// dynamic: equal to 1 while gmsh is printing
int printing;
// hide all unselected entities?
int hideUnselected;
// temporary storage of rotation, translation, scale (until the GUI
// is ready)
double tmpRotation[3], tmpTranslation[3], tmpScale[3], tmpQuaternion[4];
// geometry options
contextGeometryOptions geom;
// mesh options
contextMeshOptions mesh;
// FIXME: putting these in the mesh struct (where they belong) causes
// an LNK1179 error ("duplicate COMDAT") with MSVC...
meshPartitionOptions partitionOptions;
CGNSOptions cgnsOptions;
// post processing options
struct{
int draw, link, horizontalScales;
int smooth, animCycle, animStep, combineTime, combineRemoveOrig;
int fileFormat, plugins, forceNodeData;
double animDelay;
}post;
// solver options
struct{
int plugins, listen;
double timeout;
std::string socketName;
std::string name[NUM_SOLVERS], executable[NUM_SOLVERS], remoteLogin[NUM_SOLVERS];
int autoSaveDatabase, autoArchiveOutputFiles, autoMesh, autoMergeFile;
int autoShowViews, autoShowLastStep, autoCheck, showInvisibleParameters;
}solver;
// print options
struct{
int fileFormat, epsQuality, epsCompress, epsPS3Shading;
int epsOcclusionCulling, epsBestRoot;
double epsLineWidthFactor, epsPointSizeFactor;
int jpegQuality, jpegSmoothing, geoLabels, geoOnlyPhysicals;
int text, texAsEquation;
int gifDither, gifSort, gifInterlace, gifTransparent;
int posElementary, posElement, posGamma, posEta, posRho, posDisto;
int compositeWindows, deleteTmpFiles, background;
int width, height;
double parameter, parameterFirst, parameterLast, parameterSteps;
int pgfTwoDim, pgfExportAxis, pgfHorizBar;
std::string parameterCommand;
} print;
// color options
struct{
unsigned int bg, bgGrad, fg, text, axes, smallAxes;
unsigned int ambientLight[6], diffuseLight[6], specularLight[6];
struct{
unsigned int point, line, surface, volume;
unsigned int selection, highlight[3], projection;
unsigned int tangents, normals;
} geom;
struct{
unsigned int vertex, vertexSup, line, triangle, quadrangle;
unsigned int tetrahedron, hexahedron, prism, pyramid;
unsigned int carousel[20];
unsigned int tangents, normals;
} mesh;
} color;
// is the machine big-endian?
int bigEndian;
// how RGBA values are packed and unpacked into/from an unsigned integer to be
// fed to glColor4ubv (depends on machine byte ordering!):
unsigned int packColor(int R, int G, int B, int A);
int unpackRed(unsigned int X);
int unpackGreen(unsigned int X);
int unpackBlue(unsigned int X);
int unpackAlpha(unsigned int X);
};
#endif
|