Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-xt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ag-ohlberger
dune-community
dune-xt
Commits
09225e31
Commit
09225e31
authored
4 years ago
by
Dr. Felix Tobias Schindler
Browse files
Options
Downloads
Patches
Plain Diff
[P|gridprovider] add make_gmsh_grid
parent
9fc11766
No related branches found
No related tags found
1 merge request
!20
Update bindings
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
python/dune/xt/grid/CMakeLists.txt
+1
-0
1 addition, 0 deletions
python/dune/xt/grid/CMakeLists.txt
python/dune/xt/grid/__init__.py
+1
-0
1 addition, 0 deletions
python/dune/xt/grid/__init__.py
python/dune/xt/grid/gridprovider/gmsh.cc
+60
-0
60 additions, 0 deletions
python/dune/xt/grid/gridprovider/gmsh.cc
with
62 additions
and
0 deletions
python/dune/xt/grid/CMakeLists.txt
+
1
−
0
View file @
09225e31
...
...
@@ -26,6 +26,7 @@ dune_pybindxi_add_module(_grid_functors_boundary_detector EXCLUDE_FROM_ALL funct
dune_pybindxi_add_module
(
_grid_functors_interfaces EXCLUDE_FROM_ALL functors/interfaces.cc
)
# dune_pybindxi_add_module(_grid_functors_refinement EXCLUDE_FROM_ALL functors/refinement.cc)
dune_pybindxi_add_module
(
_grid_gridprovider_cube EXCLUDE_FROM_ALL gridprovider/cube.cc
)
dune_pybindxi_add_module
(
_grid_gridprovider_gmsh EXCLUDE_FROM_ALL gridprovider/gmsh.cc
)
dune_pybindxi_add_module
(
_grid_intersection EXCLUDE_FROM_ALL intersection.cc
)
dune_pybindxi_add_module
(
_grid_gridprovider_provider EXCLUDE_FROM_ALL gridprovider/provider.cc
)
dune_pybindxi_add_module
(
_grid_traits EXCLUDE_FROM_ALL traits.cc
)
...
...
This diff is collapsed.
Click to expand it.
python/dune/xt/grid/__init__.py
+
1
−
0
View file @
09225e31
...
...
@@ -30,6 +30,7 @@ for mod_name in (
'
_grid_functors_interfaces
'
,
# '_grid_functors_refinement',
'
_grid_gridprovider_cube
'
,
'
_grid_gridprovider_gmsh
'
,
'
_grid_gridprovider_provider
'
,
'
_grid_intersection
'
,
'
_grid_traits
'
,
...
...
This diff is collapsed.
Click to expand it.
python/dune/xt/grid/gridprovider/gmsh.cc
0 → 100644
+
60
−
0
View file @
09225e31
// This file is part of the dune-xt project:
// https://github.com/dune-community/dune-xt
// Copyright 2009-2018 dune-xt developers and contributors. All rights reserved.
// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
// or GPL-2.0+ (http://opensource.org/licenses/gpl-license)
// with "runtime exception" (http://www.dune-project.org/license.html)
// Authors:
// Felix Schindler (2020)
#include
"config.h"
#include
<dune/pybindxi/pybind11.h>
#include
<dune/pybindxi/stl.h>
#include
<dune/xt/grid/gridprovider/gmsh.hh>
#include
<python/dune/xt/common/bindings.hh>
#include
<python/dune/xt/common/fvector.hh>
#include
<python/dune/xt/grid/traits.hh>
using
namespace
Dune
;
using
namespace
Dune
::
XT
::
Grid
::
bindings
;
template
<
class
G
,
class
element_type
>
struct
make_gmsh_grid
{
static
const
constexpr
size_t
d
=
G
::
dimension
;
static
void
bind
(
pybind11
::
module
&
m
)
{
namespace
py
=
pybind11
;
using
namespace
pybind11
::
literals
;
m
.
def
(
"make_gmsh_grid"
,
[](
const
std
::
string
&
filename
,
const
Dimension
<
d
>&
,
const
element_type
&
)
{
return
XT
::
Grid
::
make_gmsh_grid
<
G
>
(
filename
);
},
"filename"
_a
,
"dim"
_a
,
"element_type"
_a
);
}
// ... bind(...)
};
// struct make_gmsh_grid
PYBIND11_MODULE
(
_grid_gridprovider_gmsh
,
m
)
{
namespace
py
=
pybind11
;
py
::
module
::
import
(
"dune.xt.common"
);
py
::
module
::
import
(
"dune.xt.grid._grid_gridprovider_provider"
);
py
::
module
::
import
(
"dune.xt.grid._grid_traits"
);
#if HAVE_DUNE_ALUGRID
make_gmsh_grid
<
ALU_2D_SIMPLEX_CONFORMING
,
Simplex
>::
bind
(
m
);
make_gmsh_grid
<
ALU_2D_CUBE
,
Cube
>::
bind
(
m
);
make_gmsh_grid
<
ALU_3D_SIMPLEX_CONFORMING
,
Simplex
>::
bind
(
m
);
make_gmsh_grid
<
ALU_3D_CUBE
,
Cube
>::
bind
(
m
);
#endif
}
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