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
0953636d
Commit
0953636d
authored
6 years ago
by
Dr. Felix Tobias Schindler
Browse files
Options
Downloads
Patches
Plain Diff
[interpolations.default] use global basis instead of local FE
parent
96db5d69
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/interpolations/default.hh
+7
-7
7 additions, 7 deletions
dune/gdt/interpolations/default.hh
with
7 additions
and
7 deletions
dune/gdt/interpolations/default.hh
+
7
−
7
View file @
0953636d
...
...
@@ -34,7 +34,7 @@ namespace GDT {
/**
* \brief Interpolates a localizable function within a given space [most general variant].
*
* Simply uses
the
interpolat
ion
() of the target spaces
finite_element
().
* Simply uses interpolat
e
() of the target spaces
global basis
().
*
*
* \note This does not clear target.dofs().vector(). Thus, if interpolation_grid_view only covers a part of the domain
...
...
@@ -43,6 +43,8 @@ namespace GDT {
* \note This might not be optimal for all spaces. For instance, the polynomial order of source is not taken into
* account for local L^2-projection based interpolation. This is a limitation in dune-localfunctions and we need
* to completely replace the interpolation of the respective local finite element.
*
* \note This might not be correct for all spaces, in particular if source is not continuous.
*/
template
<
class
GV
,
size_t
r
,
size_t
rC
,
class
R
,
class
V
,
class
IGV
>
std
::
enable_if_t
<
std
::
is_same
<
XT
::
Grid
::
extract_entity_t
<
GV
>
,
typename
IGV
::
Grid
::
template
Codim
<
0
>
::
Entity
>::
value
,
...
...
@@ -56,15 +58,13 @@ default_interpolation(const XT::Functions::GridFunctionInterface<XT::Grid::extra
"Use the correct one from interpolations/raviart-thomas.hh instead!"
);
auto
local_dof_vector
=
target
.
dofs
().
localize
();
auto
local_source
=
source
.
local_function
();
std
::
vector
<
R
>
local_dofs
(
target
.
space
().
mapper
().
max_
local
_s
ize
()
)
;
auto
target_basis
=
target
.
space
().
basis
().
localize
();
for
(
auto
&&
element
:
elements
(
interpolation_grid_view
))
{
local_source
->
bind
(
element
);
local_dof_vector
.
bind
(
element
);
const
auto
&
fe
=
target
.
space
().
finite_element
(
element
.
geometry
().
type
());
fe
.
interpolation
().
interpolate
(
[
&
](
const
auto
&
xx
)
{
return
local_source
->
evaluate
(
xx
);
},
local_source
->
order
(),
local_dofs
);
for
(
size_t
ii
=
0
;
ii
<
local_dof_vector
.
size
();
++
ii
)
local_dof_vector
[
ii
]
=
local_dofs
[
ii
];
target_basis
->
bind
(
element
);
target_basis
->
interpolate
(
[
&
](
const
auto
&
xx
)
{
return
local_source
->
evaluate
(
xx
);
},
local_source
->
order
(),
local_dof_vector
);
}
}
// ... default_interpolation(...)
...
...
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