Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gmsh
dg
Commits
5e48e0a3
Commit
5e48e0a3
authored
Nov 18, 2021
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
automatically detect Gmsh API version + add support for version 4.9.0
parent
0d371042
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+7
-5
7 additions, 5 deletions
CMakeLists.txt
src/libgmshdg/physical_element.cpp
+7
-2
7 additions, 2 deletions
src/libgmshdg/physical_element.cpp
with
14 additions
and
7 deletions
CMakeLists.txt
+
7
−
5
View file @
5e48e0a3
...
...
@@ -52,6 +52,13 @@ else()
link_directories
(
${
GMSH_DIR
}
/lib
)
endif
()
endif
()
if
(
GMSH_INC
)
file
(
STRINGS
${
GMSH_INC
}
/gmsh.h GMSH_API_VERSION_STR REGEX
"#define GMSH_API_VERSION .*"
)
string
(
REGEX MATCH
"[\.0-9]+"
GMSH_API_VERSION
"
${
GMSH_API_VERSION_STR
}
"
)
if
(
GMSH_API_VERSION VERSION_LESS
"4.9.0"
)
add_definitions
(
-DUSE_INITIAL_4_8_4_API
)
endif
()
endif
()
find_package
(
SILO REQUIRED
)
if
(
SILO_FOUND
)
...
...
@@ -262,11 +269,6 @@ if (OPT_DEBUG_PRINT)
endif
()
######################################################################
## Handle 4.8.4 API breakage introduced in commit 91312e67
option
(
OPT_GMSH_484_BEFORE_SPLIT
"Use old version of getKeysForElements() (see 91312e67)"
OFF
)
if
(
OPT_GMSH_484_BEFORE_SPLIT
)
add_definitions
(
-DUSE_INITIAL_4_8_4_API
)
endif
()
option
(
OPT_DISABLE_TEXTURE_CACHE
"On ROCm 4.1 texture stuff is broken, disable it"
OFF
)
if
(
OPT_DISABLE_TEXTURE_CACHE
)
...
...
This diff is collapsed.
Click to expand it.
src/libgmshdg/physical_element.cpp
+
7
−
2
View file @
5e48e0a3
...
...
@@ -121,8 +121,13 @@ physical_elements_factory::physical_elements_factory(const entity_params& ep)
gmm
::
getElementsByType
(
elemType
,
cellTags
,
cellNodesTags
,
tag
);
gmm
::
getIntegrationPoints
(
elemType
,
quadrature_name
(
2
*
approx_order
),
cellIps
,
cellIws
);
gmm
::
getJacobians
(
elemType
,
cellIps
,
cellJacs
,
cellDets
,
cellPpts
,
tag
);
#ifdef USE_INITIAL_4_8_4_API
gmm
::
getBasisFunctionsOrientationForElements
(
elemType
,
basis_func_name
(
approx_order
),
cellOrientations
,
tag
);
#else
gmm
::
getBasisFunctionsOrientation
(
elemType
,
basis_func_name
(
approx_order
),
cellOrientations
,
tag
);
#endif
assert
(
cellOrientations
.
size
()
==
cellTags
.
size
());
gmm
::
getBarycenters
(
elemType
,
tag
,
false
,
false
,
barycenters
);
...
...
@@ -132,12 +137,12 @@ physical_elements_factory::physical_elements_factory(const entity_params& ep)
gmm
::
getKeysForElements
(
elemType
,
basis_func_name
(
approx_order
),
keypairs
,
coord
,
tag
,
false
);
#else
gmm
::
getKeys
ForElements
(
elemType
,
basis_func_name
(
approx_order
),
gmm
::
getKeys
(
elemType
,
basis_func_name
(
approx_order
),
tagKeys
,
entityKeys
,
coord
,
tag
,
false
);
assert
(
tagKeys
.
size
()
==
entityKeys
.
size
());
#endif
keys_per_elem
=
gmm
::
getNumberOfKeys
ForElements
(
elemType
,
basis_func_name
(
approx_order
));
keys_per_elem
=
gmm
::
getNumberOfKeys
(
elemType
,
basis_func_name
(
approx_order
));
#ifdef USE_INITIAL_4_8_4_API
assert
(
keys_per_elem
*
cellTags
.
size
()
==
keypairs
.
size
());
#else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment