Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-gdt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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-gdt
Commits
ff976b97
Commit
ff976b97
authored
10 years ago
by
Dr. Felix Tobias Schindler
Browse files
Options
Downloads
Patches
Plain Diff
[spaces.fv.default] moved out of playground, refs
#15
parent
389079a2
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
dune/gdt/playground/spaces/fv/default.hh
+2
-146
2 additions, 146 deletions
dune/gdt/playground/spaces/fv/default.hh
dune/gdt/spaces/fv/default.hh
+150
-0
150 additions, 0 deletions
dune/gdt/spaces/fv/default.hh
with
152 additions
and
146 deletions
dune/gdt/playground/spaces/fv/default.hh
+
2
−
146
View file @
ff976b97
...
...
@@ -3,149 +3,5 @@
// Copyright holders: Felix Schindler
// License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
#ifndef DUNE_GDT_PLAYGROUND_SPACES_FV_DEFAULT_HH
#define DUNE_GDT_PLAYGROUND_SPACES_FV_DEFAULT_HH
#include
<dune/common/deprecated.hh>
#include
<dune/stuff/common/type_utils.hh>
#include
<dune/gdt/spaces/parallel.hh>
#include
<dune/gdt/basefunctionset/default/fv.hh>
#include
<dune/gdt/mapper/default/fv.hh>
#include
"../../../spaces/interface.hh"
namespace
Dune
{
namespace
GDT
{
namespace
Spaces
{
namespace
FV
{
// forward, to be used in the traits and to allow for specialization
template
<
class
GridViewImp
,
class
RangeFieldImp
,
int
rangeDim
,
int
rangeDimCols
=
1
>
class
Default
{
static_assert
(
Dune
::
AlwaysFalse
<
GridViewImp
>::
value
,
"Untested for these dimensions!"
);
};
/**
* \brief Traits class for Spaces::CG::FemBased.
*/
template
<
class
GridViewImp
,
class
RangeFieldImp
,
int
rangeDim
,
int
rangeDimCols
>
class
DefaultTraits
{
public:
typedef
Default
<
GridViewImp
,
RangeFieldImp
,
rangeDim
,
rangeDimCols
>
derived_type
;
static
const
int
polOrder
=
0
;
typedef
GridViewImp
GridViewType
;
typedef
typename
GridViewType
::
IndexSet
BackendType
;
typedef
typename
GridViewType
::
template
Codim
<
0
>
::
Entity
EntityType
;
typedef
RangeFieldImp
RangeFieldType
;
typedef
Mapper
::
FiniteVolume
<
GridViewType
,
rangeDim
,
rangeDimCols
>
MapperType
;
typedef
BaseFunctionSet
::
FiniteVolume
<
typename
GridViewType
::
template
Codim
<
0
>
::
Entity
,
typename
GridViewType
::
ctype
,
GridViewType
::
dimension
,
RangeFieldType
,
rangeDim
,
rangeDimCols
>
BaseFunctionSetType
;
static
const
Stuff
::
Grid
::
ChoosePartView
part_view_type
=
Stuff
::
Grid
::
ChoosePartView
::
view
;
static
const
bool
needs_grid_view
=
true
;
typedef
CommunicationChooser
<
GridViewType
>
CommunicationChooserType
;
typedef
typename
CommunicationChooserType
::
Type
CommunicatorType
;
};
// class DefaultTraits
template
<
class
GridViewImp
,
class
RangeFieldImp
,
int
rangeDim
>
class
Default
<
GridViewImp
,
RangeFieldImp
,
rangeDim
,
1
>
:
public
SpaceInterface
<
DefaultTraits
<
GridViewImp
,
RangeFieldImp
,
rangeDim
,
1
>
,
GridViewImp
::
dimension
,
rangeDim
,
1
>
{
typedef
Default
<
GridViewImp
,
RangeFieldImp
,
rangeDim
,
1
>
ThisType
;
typedef
SpaceInterface
<
DefaultTraits
<
GridViewImp
,
RangeFieldImp
,
rangeDim
,
1
>
,
GridViewImp
::
dimension
,
rangeDim
,
1
>
BaseType
;
public:
typedef
DefaultTraits
<
GridViewImp
,
RangeFieldImp
,
rangeDim
,
1
>
Traits
;
static
const
int
polOrder
=
Traits
::
polOrder
;
static
const
unsigned
int
dimDomain
=
BaseType
::
dimDomain
;
static
const
unsigned
int
dimRange
=
BaseType
::
dimRange
;
static
const
unsigned
int
dimRangeCols
=
BaseType
::
dimRangeCols
;
typedef
typename
Traits
::
GridViewType
GridViewType
;
typedef
typename
Traits
::
RangeFieldType
RangeFieldType
;
typedef
typename
Traits
::
BackendType
BackendType
;
typedef
typename
Traits
::
MapperType
MapperType
;
typedef
typename
Traits
::
EntityType
EntityType
;
typedef
typename
Traits
::
BaseFunctionSetType
BaseFunctionSetType
;
typedef
typename
Traits
::
CommunicationChooserType
CommunicationChooserType
;
typedef
typename
Traits
::
CommunicatorType
CommunicatorType
;
typedef
Dune
::
Stuff
::
LA
::
SparsityPatternDefault
PatternType
;
typedef
typename
GridViewType
::
ctype
DomainFieldType
;
Default
(
GridViewType
gv
)
:
grid_view_
(
gv
)
,
mapper_
(
grid_view_
)
,
communicator_
(
CommunicationChooserType
::
create
(
grid_view_
))
{
}
Default
(
const
ThisType
&
other
)
:
grid_view_
(
other
.
grid_view_
)
,
mapper_
(
other
.
mapper_
)
,
communicator_
(
CommunicationChooserType
::
create
(
grid_view_
))
{
}
Default
(
ThisType
&&
source
)
=
default
;
ThisType
&
operator
=
(
const
ThisType
&
other
)
=
delete
;
ThisType
&
operator
=
(
ThisType
&&
source
)
=
delete
;
const
GridViewType
&
grid_view
()
const
{
return
grid_view_
;
}
const
BackendType
&
backend
()
const
{
return
grid_view_
.
indexSet
();
}
const
MapperType
&
mapper
()
const
{
return
mapper_
;
}
BaseFunctionSetType
base_function_set
(
const
EntityType
&
entity
)
const
{
return
BaseFunctionSetType
(
entity
);
}
using
BaseType
::
compute_pattern
;
template
<
class
G
,
class
S
,
int
d
,
int
r
,
int
rC
>
PatternType
compute_pattern
(
const
GridView
<
G
>&
local_grid_view
,
const
SpaceInterface
<
S
,
d
,
r
,
rC
>&
ansatz_space
)
const
{
return
BaseType
::
compute_face_and_volume_pattern
(
local_grid_view
,
ansatz_space
);
}
CommunicatorType
&
communicator
()
const
{
// no need to prepare the communicator, since we are not pdelab based
return
*
communicator_
;
}
private
:
const
GridViewType
grid_view_
;
const
MapperType
mapper_
;
const
std
::
unique_ptr
<
CommunicatorType
>
communicator_
;
};
// class Default< ..., 1, 1 >
}
// namespace FV
}
// namespace Spaces
}
// namespace GDT
}
// namespace Dune
#endif // DUNE_GDT_PLAYGROUND_SPACES_FV_DEFAULT_HH
#warning This header is deprecated, include dune/gdt/spaces/fv/default.hh instead (17.01.2015)!
#include
<dune/gdt/spaces/fv/default.hh>
This diff is collapsed.
Click to expand it.
dune/gdt/spaces/fv/default.hh
0 → 100644
+
150
−
0
View file @
ff976b97
// This file is part of the dune-gdt project:
// http://users.dune-project.org/projects/dune-gdt
// Copyright holders: Felix Schindler
// License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
#ifndef DUNE_GDT_SPACES_FV_DEFAULT_HH
#define DUNE_GDT_SPACES_FV_DEFAULT_HH
#include
<dune/common/deprecated.hh>
#include
<dune/stuff/common/type_utils.hh>
#include
<dune/gdt/basefunctionset/default/fv.hh>
#include
<dune/gdt/mapper/default/fv.hh>
#include
<dune/gdt/spaces/interface.hh>
#include
<dune/gdt/spaces/parallel.hh>
namespace
Dune
{
namespace
GDT
{
namespace
Spaces
{
namespace
FV
{
// forward, to be used in the traits and to allow for specialization
template
<
class
GridViewImp
,
class
RangeFieldImp
,
int
rangeDim
,
int
rangeDimCols
=
1
>
class
Default
{
static_assert
(
Dune
::
AlwaysFalse
<
GridViewImp
>::
value
,
"Untested for these dimensions!"
);
};
/**
* \brief Traits class for Spaces::CG::FemBased.
*/
template
<
class
GridViewImp
,
class
RangeFieldImp
,
int
rangeDim
,
int
rangeDimCols
>
class
DefaultTraits
{
public:
typedef
Default
<
GridViewImp
,
RangeFieldImp
,
rangeDim
,
rangeDimCols
>
derived_type
;
static
const
int
polOrder
=
0
;
typedef
GridViewImp
GridViewType
;
typedef
typename
GridViewType
::
IndexSet
BackendType
;
typedef
typename
GridViewType
::
template
Codim
<
0
>
::
Entity
EntityType
;
typedef
RangeFieldImp
RangeFieldType
;
typedef
Mapper
::
FiniteVolume
<
GridViewType
,
rangeDim
,
rangeDimCols
>
MapperType
;
typedef
BaseFunctionSet
::
FiniteVolume
<
typename
GridViewType
::
template
Codim
<
0
>
::
Entity
,
typename
GridViewType
::
ctype
,
GridViewType
::
dimension
,
RangeFieldType
,
rangeDim
,
rangeDimCols
>
BaseFunctionSetType
;
static
const
Stuff
::
Grid
::
ChoosePartView
part_view_type
=
Stuff
::
Grid
::
ChoosePartView
::
view
;
static
const
bool
needs_grid_view
=
true
;
typedef
CommunicationChooser
<
GridViewType
>
CommunicationChooserType
;
typedef
typename
CommunicationChooserType
::
Type
CommunicatorType
;
};
// class DefaultTraits
template
<
class
GridViewImp
,
class
RangeFieldImp
,
int
rangeDim
>
class
Default
<
GridViewImp
,
RangeFieldImp
,
rangeDim
,
1
>
:
public
SpaceInterface
<
DefaultTraits
<
GridViewImp
,
RangeFieldImp
,
rangeDim
,
1
>
,
GridViewImp
::
dimension
,
rangeDim
,
1
>
{
typedef
Default
<
GridViewImp
,
RangeFieldImp
,
rangeDim
,
1
>
ThisType
;
typedef
SpaceInterface
<
DefaultTraits
<
GridViewImp
,
RangeFieldImp
,
rangeDim
,
1
>
,
GridViewImp
::
dimension
,
rangeDim
,
1
>
BaseType
;
public:
typedef
DefaultTraits
<
GridViewImp
,
RangeFieldImp
,
rangeDim
,
1
>
Traits
;
static
const
int
polOrder
=
Traits
::
polOrder
;
static
const
unsigned
int
dimDomain
=
BaseType
::
dimDomain
;
static
const
unsigned
int
dimRange
=
BaseType
::
dimRange
;
static
const
unsigned
int
dimRangeCols
=
BaseType
::
dimRangeCols
;
typedef
typename
Traits
::
GridViewType
GridViewType
;
typedef
typename
Traits
::
RangeFieldType
RangeFieldType
;
typedef
typename
Traits
::
BackendType
BackendType
;
typedef
typename
Traits
::
MapperType
MapperType
;
typedef
typename
Traits
::
EntityType
EntityType
;
typedef
typename
Traits
::
BaseFunctionSetType
BaseFunctionSetType
;
typedef
typename
Traits
::
CommunicationChooserType
CommunicationChooserType
;
typedef
typename
Traits
::
CommunicatorType
CommunicatorType
;
typedef
Dune
::
Stuff
::
LA
::
SparsityPatternDefault
PatternType
;
typedef
typename
GridViewType
::
ctype
DomainFieldType
;
Default
(
GridViewType
gv
)
:
grid_view_
(
gv
)
,
mapper_
(
grid_view_
)
,
communicator_
(
CommunicationChooserType
::
create
(
grid_view_
))
{
}
Default
(
const
ThisType
&
other
)
:
grid_view_
(
other
.
grid_view_
)
,
mapper_
(
other
.
mapper_
)
,
communicator_
(
CommunicationChooserType
::
create
(
grid_view_
))
{
}
Default
(
ThisType
&&
source
)
=
default
;
ThisType
&
operator
=
(
const
ThisType
&
other
)
=
delete
;
ThisType
&
operator
=
(
ThisType
&&
source
)
=
delete
;
const
GridViewType
&
grid_view
()
const
{
return
grid_view_
;
}
const
BackendType
&
backend
()
const
{
return
grid_view_
.
indexSet
();
}
const
MapperType
&
mapper
()
const
{
return
mapper_
;
}
BaseFunctionSetType
base_function_set
(
const
EntityType
&
entity
)
const
{
return
BaseFunctionSetType
(
entity
);
}
using
BaseType
::
compute_pattern
;
template
<
class
G
,
class
S
,
int
d
,
int
r
,
int
rC
>
PatternType
compute_pattern
(
const
GridView
<
G
>&
local_grid_view
,
const
SpaceInterface
<
S
,
d
,
r
,
rC
>&
ansatz_space
)
const
{
return
BaseType
::
compute_face_and_volume_pattern
(
local_grid_view
,
ansatz_space
);
}
CommunicatorType
&
communicator
()
const
{
// no need to prepare the communicator, since we are not pdelab based
return
*
communicator_
;
}
private
:
const
GridViewType
grid_view_
;
const
MapperType
mapper_
;
const
std
::
unique_ptr
<
CommunicatorType
>
communicator_
;
};
// class Default< ..., 1, 1 >
}
// namespace FV
}
// namespace Spaces
}
// namespace GDT
}
// namespace Dune
#endif // DUNE_GDT_SPACES_FV_DEFAULT_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