Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-istl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Patrick Jaap
dune-istl
Commits
3de7ca1a
Commit
3de7ca1a
authored
7 years ago
by
Matthew Collins
Browse files
Options
Downloads
Patches
Plain Diff
sunday push
parent
68794169
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+1
-0
1 addition, 0 deletions
CMakeLists.txt
matrixindexset.hh
+57
-0
57 additions, 0 deletions
matrixindexset.hh
with
58 additions
and
0 deletions
CMakeLists.txt
+
1
−
0
View file @
3de7ca1a
...
...
@@ -2,6 +2,7 @@ set(HEADERS
bcrsmatrix.hh
bvector.hh
iterator.hh
matrixindexset.hh
operators.hh
preconditioners.hh
slice.hh
...
...
This diff is collapsed.
Click to expand it.
matrixindexset.hh
0 → 100644
+
57
−
0
View file @
3de7ca1a
#ifndef DUNE_PYTHON_ISTL_BCRSMATRIX_HH
#define DUNE_PYTHON_ISTL_BCRSMATRIX_HH
#include
<memory>
#include
<stdexcept>
#include
<string>
#include
<tuple>
#include
<dune/common/fmatrix.hh>
#include
<dune/common/fvector.hh>
#if HAVE_DUNE_ISTL
#include
<dune/istl/matrixindexset.hh>
#endif // #if HAVE_DUNE_ISTL
#include
<dune/python/pybind11/pybind11.h>
#include
<dune/python/pybind11/stl.h>
namespace
Dune
{
namespace
Python
{
// registermatrixindexset
// ------------------
#if HAVE_DUNE_ISTL
template
<
class
MatrixIndexSet
,
class
...
options
>
void
registerMatrixIndexSet
(
pybind11
::
handle
scope
,
pybind11
::
class_
<
MatrixIndexSet
,
options
...
>
cls
)
{
typedef
std
::
size_t
size_type
;
// two different possible constructors
cls
.
def
(
pybind11
::
init
(
[]
()
{
return
new
MatrixIndexSet
();
}
)
);
cls
.
def
(
pybind11
::
init
(
[]
(
size_type
rows
,
size_type
cols
)
{
return
new
MatrixIndexSet
(
rows
,
cols
);
}
)
);
cls
.
def
(
"add"
,
[]
(
MatrixIndexSet
&
self
,
size_type
i
,
size_type
j
)
{
self
.
add
(
i
,
j
);
}
);
cls
.
def
(
"exportIdx<BCRSMatrix etc...>"
,
[]
(
MatrixIndexSet
&
self
)
{
}
);
}
template
<
class
MatrixIndexSet
>
pybind11
::
class_
<
MatrixIndexSet
>
registerMatrixIndexSet
(
pybind11
::
handle
scope
,
const
char
*
clsName
=
"MatrixIndexSet"
)
{
pybind11
::
class_
<
MatrixIndexSet
>
cls
(
scope
,
clsName
);
registerMatrixIndexSet
(
scope
,
cls
);
return
cls
;
}
#endif // #if HAVE_DUNE_ISTL
}
// namespace Python
}
// namespace Dune
#endif // #ifndef DUNE_PYTHON_ISTL_BCRSMATRIX_HH
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