Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
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
amdis
amdis-core
Commits
ea26a4b9
Commit
ea26a4b9
authored
6 years ago
by
Praetorius, Simon
Browse files
Options
Downloads
Patches
Plain Diff
Make FactoryParametrization compatible to dune 2.7
parent
2c7ee1ed
No related branches found
No related tags found
1 merge request
!40
Make FactoryParametrization compatible to dune 2.7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/FactoryParametrization.hpp
+8
-8
8 additions, 8 deletions
examples/FactoryParametrization.hpp
with
8 additions
and
8 deletions
examples/FactoryParametrization.hpp
+
8
−
8
View file @
ea26a4b9
...
...
@@ -28,7 +28,6 @@ namespace AMDiS
namespace
Dune
{
/// \brief A factory class for \ref SimpleGrid.
template
<
class
Grid
,
class
Projection
>
class
GridFactory
<
AMDiS
::
Parametrization
<
Grid
,
Projection
>>
...
...
@@ -50,8 +49,7 @@ namespace Dune
public:
/// Default constructor
GridFactory
()
{}
GridFactory
()
=
default
;
/// Insert a vertex into the coarse grid
virtual
void
insertVertex
(
GlobalCoordinate
const
&
pos
)
override
...
...
@@ -73,7 +71,7 @@ namespace Dune
for
(
std
::
size_t
i
=
0
;
i
<
vertices
.
size
();
++
i
)
corners
[
i
]
=
coordinates
[
vertices
[
i
]];
factory
.
insertElement
(
type
,
vertices
,
std
::
shared
_ptr
<
Projection
Base
>
(
new
Projection
(
std
::
move
(
corners
))
)
);
factory
.
insertElement
(
type
,
vertices
,
std
::
make_
shared
<
Projection
>
(
std
::
move
(
corners
))
);
}
virtual
void
insertBoundarySegment
(
std
::
vector
<
unsigned
int
>
const
&
/*vertices*/
)
override
...
...
@@ -82,22 +80,24 @@ namespace Dune
}
/// Finalize grid creation and hand over the grid.
Grid
*
create
()
std
::
unique_ptr
<
Grid
>
create
()
{
return
factory
.
createGrid
();
return
std
::
unique_ptr
<
Grid
>
(
factory
.
createGrid
()
)
;
}
#if DUNE_VERSION_GT(DUNE_GRID,2,6)
virtual
ToUniquePtr
<
GridWrapper
>
createGrid
()
override
#else
virtual
GridWrapper
*
createGrid
()
override
#endif
{
AMDiS
::
warning
(
"Should not be created. Use non-virtual method `create()` instead, to create the underlying grid!"
);
return
nullptr
;
}
private
:
// buffers for the mesh data
std
::
vector
<
GlobalCoordinate
>
coordinates
;
GridFactory
<
Grid
>
factory
;
};
...
...
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