v0.13.1
Loading...
Searching...
No Matches
UnknownInterface.cpp
Go to the documentation of this file.
1/** \file UnknownInterface.cpp
2 * \brief Unknown interfce implementation
3 */
4
5
6
7namespace MoFEM {
8
11 version =
12 Version(MoFEM_VERSION_MAJOR, MoFEM_VERSION_MINOR, MoFEM_VERSION_BUILD);
14}
15
17 Version &version) {
19 const EntityHandle root_meshset = 0;
20 const int def_version[] = {-1, -1, -1};
21 Tag th;
22 rval = moab.tag_get_handle("MOFEM_VERSION", 3, MB_TYPE_INTEGER, th,
23 MB_TAG_CREAT | MB_TAG_MESH, &def_version);
24 int *version_ptr;
25 if (rval == MB_ALREADY_ALLOCATED) {
26 const void *tag_data[1];
27 CHKERR moab.tag_get_by_ptr(th, &root_meshset, 1, tag_data);
28 version_ptr = (int *)tag_data[0];
29 } else {
30 const void *tag_data[1];
31 CHKERR moab.tag_get_by_ptr(th, &root_meshset, 1, tag_data);
32 version_ptr = (int *)tag_data[0];
33 version_ptr[0] = MoFEM_VERSION_MAJOR;
34 version_ptr[1] = MoFEM_VERSION_MINOR;
35 version_ptr[2] = MoFEM_VERSION_BUILD;
36 }
37 version = Version(version_ptr);
39}
40
42 Version version) {
44 const EntityHandle root_meshset = 0;
45 const int def_version[] = {-1, -1, -1};
46 Tag th;
47 rval = moab.tag_get_handle("MOFEM_VERSION", 3, MB_TYPE_INTEGER, th,
48 MB_TAG_CREAT | MB_TAG_MESH, &def_version);
49 int *version_ptr;
50 const void *tag_data[1];
51 CHKERR moab.tag_get_by_ptr(th, &root_meshset, 1, tag_data);
52 version_ptr = (int *)tag_data[0];
53 version_ptr[0] = version.majorVersion;
54 version_ptr[1] = version.minorVersion;
55 version_ptr[2] = version.buildVersion;
57}
58
61 version =
62 Version(MoFEM_VERSION_MAJOR, MoFEM_VERSION_MINOR, MoFEM_VERSION_BUILD);
64}
65
66} // namespace MoFEM
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define CHKERR
Inline error check.
Definition: definitions.h:535
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:74
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
static MoFEMErrorCode getLibVersion(Version &version)
Get library version.
static MoFEMErrorCode setFileVersion(moab::Interface &moab, Version version=Version(MoFEM_VERSION_MAJOR, MoFEM_VERSION_MINOR, MoFEM_VERSION_BUILD))
Get database major version.
static MoFEMErrorCode getInterfaceVersion(Version &version)
Get database major version.
static MoFEMErrorCode getFileVersion(moab::Interface &moab, Version &version)
Get database major version.