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
d257a120
Commit
d257a120
authored
9 years ago
by
Tobias Leibner
Browse files
Options
Downloads
Patches
Plain Diff
[operators.prolongations] add specialization for fv prolongation
parent
daccff3a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/gdt/operators/prolongations.hh
+34
-1
34 additions, 1 deletion
dune/gdt/operators/prolongations.hh
with
34 additions
and
1 deletion
dune/gdt/operators/prolongations.hh
+
34
−
1
View file @
d257a120
...
...
@@ -130,7 +130,7 @@ public:
inline
void
apply
(
const
ConstDiscreteFunction
<
Spaces
::
FV
::
DefaultProduct
<
GVS
,
RS
,
rS
,
rCS
>
,
VS
>&
source
,
DiscreteFunction
<
Spaces
::
FV
::
DefaultProduct
<
GVR
,
RR
,
rR
,
rCR
>
,
VR
>&
range
)
const
{
prolong_onto_
dg_fem_localfunctions_wrapper
(
source
,
range
);
prolong_onto_
fv
(
source
,
range
);
}
private
:
...
...
@@ -217,6 +217,39 @@ private:
}
// walk the grid
}
// ... prolong_onto_dg_fem_localfunctions_wrapper(...)
template
<
class
SourceFunctionType
,
class
RangeFunctionType
>
void
prolong_onto_fv
(
const
SourceFunctionType
&
source
,
RangeFunctionType
&
range
)
const
{
typedef
typename
RangeFunctionType
::
DomainType
DomainType
;
typedef
typename
RangeFunctionType
::
RangeType
RangeType
;
// create search in the source grid part
typedef
typename
SourceFunctionType
::
SpaceType
::
GridViewType
SourceGridViewType
;
typedef
Stuff
::
Grid
::
EntityInlevelSearch
<
SourceGridViewType
>
EntitySearch
;
EntitySearch
entity_search
(
source
.
space
().
grid_view
());
// walk the grid
RangeType
source_value
(
0
);
for
(
auto
&&
entity
:
elements
(
grid_view_
))
{
auto
local_range
=
range
.
local_discrete_function
(
entity
);
// get global quadrature points
std
::
vector
<
DomainType
>
quadrature_points
(
1
,
entity
.
geometry
().
center
());
// get source entities
const
auto
source_entity_ptr_unique_ptrs
=
entity_search
(
quadrature_points
);
assert
(
source_entity_ptr_unique_ptrs
.
size
()
>=
1
);
const
auto
&
source_entity_unique_ptr
=
source_entity_ptr_unique_ptrs
[
0
];
if
(
source_entity_unique_ptr
)
{
const
auto
source_entity
=
*
source_entity_unique_ptr
;
const
auto
local_source
=
source
.
local_function
(
source_entity
);
local_source
->
evaluate
(
source_entity
.
geometry
().
local
(
entity
.
geometry
().
center
()),
source_value
);
}
else
source_value
*=
0.0
;
// set local DoFs
auto
local_range_vector
=
local_range
->
vector
();
assert
(
local_range_vector
.
size
()
==
RangeFunctionType
::
dimRange
);
for
(
size_t
ii
=
0
;
ii
<
RangeFunctionType
::
dimRange
;
++
ii
)
local_range_vector
.
set
(
ii
,
source_value
[
ii
]);
}
// walk the grid
}
// ... prolong_onto_fv(...)
const
GridViewType
&
grid_view_
;
};
// class L2Prolongation
...
...
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