Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
C1Elements
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Porrmann, Maik
C1Elements
Commits
fa53c08a
Commit
fa53c08a
authored
3 years ago
by
Porrmann, Maik
Browse files
Options
Downloads
Patches
Plain Diff
Fill primary template with interface
parent
5bd61c25
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/functions/functionspacebases/hermitebasis.hh
+43
-2
43 additions, 2 deletions
dune/functions/functionspacebases/hermitebasis.hh
with
43 additions
and
2 deletions
dune/functions/functionspacebases/hermitebasis.hh
+
43
−
2
View file @
fa53c08a
...
...
@@ -28,6 +28,47 @@ namespace Dune
template
<
unsigned
int
dim
>
struct
HermiteTransformator
{
//TODO prepare this class to be used by a extended GlobalValuedFiniteElement class
// Add static method that creates Matrix with size corresponding to dim and sparsitypattern
// Add static method that fills this Matrix using geomety
// Adapt apply and applyJacobian accordingly
// So far this primary template is not used
template
<
typename
Values
,
typename
LocalCoordinate
,
typename
Geometry
>
static
auto
apply
(
Values
&
values
,
const
LocalCoordinate
&
xi
,
const
Geometry
&
geometry
)
{
}
template
<
typename
Gradients
,
typename
LocalCoordinate
,
typename
Geometry
>
static
auto
applyJacobian
(
Gradients
&
values
,
const
LocalCoordinate
&
xi
,
const
Geometry
geometry
)
{
}
template
<
class
Function
,
class
LocalCoordinate
,
class
Element
>
class
LocalValuedFunction
{
const
Function
&
f_
;
const
Element
&
element_
;
public:
LocalValuedFunction
(
const
Function
&
f
,
const
Element
&
e
)
:
f_
(
f
),
element_
(
e
)
{}
auto
operator
()(
const
LocalCoordinate
&
xi
)
const
{
auto
&&
f
=
Dune
::
Impl
::
makeFunctionWithCallOperator
<
LocalCoordinate
>
(
f_
);
return
f_
(
xi
);
// no transformation for functionvalues needed
}
friend
auto
derivative
(
LocalValuedFunction
const
&
t
)
{
// Assumption: derivative(t.f_) gives the global derivative evaluted in local coordinates, if interpolation into the globalValuedfiniteElement.
// I would like to do this
// return LocalValuedFunction<typename std::decay<decltype(derivative(t.f_))>::type, LocalCoordinate, Element>(derivative(t.f_), t.element_);
// But it leads to a DifferentiableFunction which causes a segmentation violation when calling asInterface() ....
return
derivative
(
t
.
f_
);
}
};
};
template
<
>
...
...
@@ -76,7 +117,7 @@ namespace Dune
auto
operator
()(
const
LocalCoordinate
&
xi
)
const
{
//
auto &&f = Dune::Impl::makeFunctionWithCallOperator<LocalCoordinate>(f_)
;
auto
&&
f
=
Dune
::
Impl
::
makeFunctionWithCallOperator
<
LocalCoordinate
>
(
f_
);
return
f_
(
xi
);
// no transformation for functionvalues needed
}
...
...
@@ -201,7 +242,7 @@ namespace Dune
if
(
not
e
.
type
().
isSimplex
())
DUNE_THROW
(
Dune
::
NotImplemented
,
"HermiteBasis can only be bound to simplex elements"
);
element_
=
&
e
;
// if constexpr (dim != 1)
finiteElement_
->
bind
(
*
localValuedFiniteElement_
,
*
element_
);
}
...
...
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