Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
amdis
amdis-core
Commits
f5779842
Commit
f5779842
authored
Apr 25, 2019
by
Praetorius, Simon
Browse files
Merge branch 'issue/order_member_function' into 'master'
allow order() as memberfunction of gridfunctions See merge request
!34
parents
73513f33
5f9f4be6
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/amdis/gridfunctions/ConstantGridFunction.hpp
View file @
f5779842
...
...
@@ -78,13 +78,6 @@ namespace AMDiS
return
lf
.
derivative
();
}
/// \relates ConstantLocalFunction
template
<
class
R
,
class
D
,
class
LC
,
class
T
>
int
order
(
ConstantLocalFunction
<
R
(
D
),
LC
,
T
>
const
&
lf
)
{
return
0
;
}
/// \brief Gridfunction returning a constant value.
/**
...
...
src/amdis/gridfunctions/DiscreteFunction.inc.hpp
View file @
f5779842
...
...
@@ -59,10 +59,10 @@ public:
}
/// \brief The \ref polynomialDegree() of the LocalFunctions
friend
int
order
(
LocalFunction
const
&
self
)
int
order
(
)
const
{
assert
(
self
.
bound_
);
return
polynomialDegree
(
*
self
.
subTree_
);
assert
(
bound_
);
return
polynomialDegree
(
*
subTree_
);
}
/// \brief Return the bound element
...
...
@@ -129,10 +129,10 @@ public:
/// Evaluate Gradient at bound element in local coordinates
Range
operator
()(
Domain
const
&
x
)
const
;
friend
int
order
(
GradientLocalFunction
const
&
self
)
int
order
(
)
const
{
assert
(
self
.
bound_
);
return
std
::
max
(
0
,
polynomialDegree
(
*
self
.
subTree_
)
-
1
);
assert
(
bound_
);
return
std
::
max
(
0
,
polynomialDegree
(
*
subTree_
)
-
1
);
}
/// Return the bound element
...
...
src/amdis/gridfunctions/GridFunctionConcepts.hpp
View file @
f5779842
...
...
@@ -136,6 +136,15 @@ namespace AMDiS
}
// polynomial order of local functions
template
<
class
LocalFunction
,
class
=
void_t
<
decltype
(
std
::
declval
<
LocalFunction
>().
order
())
>
>
int
order
(
LocalFunction
const
&
lf
)
{
return
lf
.
order
();
}
#ifndef DOXYGEN
template
<
class
PreGridFct
,
class
=
void
>
struct
GridFunctionCreator
...
...
src/amdis/utility/QuadratureFactory.hpp
View file @
f5779842
...
...
@@ -40,7 +40,7 @@ namespace AMDiS
template
<
class
LF
>
using
HasLocalFunctionOrder
=
decltype
(
order
(
std
::
declval
<
LF
>
())
);
using
HasLocalFunctionOrder
=
decltype
(
AMDiS
::
order
(
std
::
declval
<
LF
>
())
);
/// \brief Factory for quadrature rule, that calculates the coefficient order from
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment