Select Git revision
gmsh.h 109.16 KiB
// Gmsh - Copyright (C) 1997-2019 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
#ifndef GMSH_H
#define GMSH_H
// This file defines the Gmsh C++ API (v4.4).
//
// Do not edit it directly: it is automatically generated by `api/gen.py'.
//
// By design, the Gmsh C++ API is purely functional, and only uses elementary
// types from the standard library. See `demos/api' for examples.
#if defined(_MSC_VER) && !defined(_USE_MATH_DEFINES)
#define _USE_MATH_DEFINES
#endif
#include <cmath>
#include <vector>
#include <string>
#include <utility>
#define GMSH_API_VERSION "4.4"
#define GMSH_API_VERSION_MAJOR 4
#define GMSH_API_VERSION_MINOR 4
#if defined(GMSH_DLL)
#if defined(GMSH_DLL_EXPORT)
#define GMSH_API __declspec(dllexport)
#else
#define GMSH_API __declspec(dllimport)
#endif
#else
#define GMSH_API
#endif
namespace gmsh {
// A geometrical entity in the Gmsh API is represented by two integers: its
// dimension (dim = 0, 1, 2 or 3) and its tag (its unique, strictly positive
// identifier). When dealing with multiple geometrical entities of possibly
// different dimensions, the entities are packed as a vector of (dim, tag)
// integer pairs.
typedef std::vector<std::pair<int, int> > vectorpair;
}
namespace gmsh { // Top-level functions
// Initialize Gmsh. This must be called before any call to the other functions in
// the API. If `argc' and `argv' (or just `argv' in Python or Julia) are
// provided, they will be handled in the same way as the command line arguments
// in the Gmsh app. If `readConfigFiles' is set, read system Gmsh configuration
// files (gmshrc and gmsh-options).
GMSH_API void initialize(int argc = 0, char ** argv = 0,
const bool readConfigFiles = true);
// Finalize Gmsh. This must be called when you are done using the Gmsh API.
GMSH_API void finalize();
// Open a file. Equivalent to the `File->Open' menu in the Gmsh app. Handling of
// the file depends on its extension and/or its contents: opening a file with
// model data will create a new model.
GMSH_API void open(const std::string & fileName);
// Merge a file. Equivalent to the `File->Merge' menu in the Gmsh app. Handling
// of the file depends on its extension and/or its contents. Merging a file with
// model data will add the data to the current model.