Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-geometry
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Core Modules
dune-geometry
Commits
1bc483e4
Commit
1bc483e4
authored
4 years ago
by
Gregor Corbin
Browse files
Options
Downloads
Patches
Plain Diff
added the right gauss radau quadrature rule
parent
cd63bcac
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!154
Feature: Gauss-Radau quadratures
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/geometry/quadraturerules.hh
+73
-0
73 additions, 0 deletions
dune/geometry/quadraturerules.hh
with
73 additions
and
0 deletions
dune/geometry/quadraturerules.hh
+
73
−
0
View file @
1bc483e4
...
...
@@ -600,6 +600,75 @@ namespace Dune {
namespace
Dune
{
//! \internal Helper template for the initialization of the quadrature rules
template
<
typename
ct
,
bool
fundamental
=
std
::
numeric_limits
<
ct
>
::
is_specialized
>
struct
GaussRadauRightQuadratureInitHelper
;
template
<
typename
ct
>
struct
GaussRadauRightQuadratureInitHelper
<
ct
,
true
>
{
static
void
init
(
int
p
,
std
::
vector
<
FieldVector
<
ct
,
1
>
>
&
_points
,
std
::
vector
<
ct
>
&
_weight
,
int
&
delivered_order
);
};
template
<
typename
ct
>
struct
GaussRadauRightQuadratureInitHelper
<
ct
,
false
>
{
static
void
init
(
int
p
,
std
::
vector
<
FieldVector
<
ct
,
1
>
>
&
_points
,
std
::
vector
<
ct
>
&
_weight
,
int
&
delivered_order
);
};
/** \brief Gauss-Radau quadrature, including the left endpoint of the interval
\ingroup Quadrature
*/
template
<
typename
ct
>
class
GaussRadauRightQuadratureRule1D
:
public
QuadratureRule
<
ct
,
1
>
{
public:
/** \brief The space dimension */
enum
{
dim
=
1
};
/** \brief The highest quadrature order available */
enum
{
highest_order
=
10
};
~
GaussRadauRightQuadratureRule1D
(){}
private
:
friend
class
QuadratureRuleFactory
<
ct
,
dim
>
;
GaussRadauRightQuadratureRule1D
(
int
p
)
:
QuadratureRule
<
ct
,
1
>
(
GeometryTypes
::
line
)
{
//! set up quadrature of given order in d dimensions
std
::
vector
<
FieldVector
<
ct
,
dim
>
>
_points
;
std
::
vector
<
ct
>
_weight
;
int
deliveredOrder_
;
GaussRadauLeftQuadratureInitHelper
<
ct
>::
init
(
p
,
_points
,
_weight
,
deliveredOrder_
);
this
->
delivered_order
=
deliveredOrder_
;
assert
(
_points
.
size
()
==
_weight
.
size
());
for
(
size_t
i
=
0
;
i
<
_points
.
size
();
i
++
)
this
->
push_back
(
QuadraturePoint
<
ct
,
dim
>
(
_points
[
i
],
_weight
[
i
]));
}
};
#ifndef DOXYGEN
extern
template
GaussRadauRightQuadratureRule1D
<
float
>
::
GaussRadauRightQuadratureRule1D
(
int
);
extern
template
GaussRadauRightQuadratureRule1D
<
double
>
::
GaussRadauRightQuadratureRule1D
(
int
);
#endif // !DOXYGEN
}
// namespace Dune
#define DUNE_INCLUDING_IMPLEMENTATION
#include
"quadraturerules/gaussradauright_imp.hh"
#include
"quadraturerules/tensorproductquadrature.hh"
...
...
@@ -849,6 +918,8 @@ namespace Dune {
return
JacobiNQuadratureRule1D
<
ctype
>::
maxOrder
();
case
QuadratureType
::
GaussRadauLeft
:
return
GaussRadauLeftQuadratureRule1D
<
ctype
>::
highest_order
;
case
QuadratureType
::
GaussRadauRight
:
return
GaussRadauRightQuadratureRule1D
<
ctype
>::
highest_order
;
default
:
DUNE_THROW
(
Exception
,
"Unknown QuadratureType"
);
}
...
...
@@ -872,6 +943,8 @@ namespace Dune {
return
JacobiNQuadratureRule1D
<
ctype
>
(
p
);
case
QuadratureType
::
GaussRadauLeft
:
return
GaussRadauLeftQuadratureRule1D
<
ctype
>
(
p
);
case
QuadratureType
::
GaussRadauRight
:
return
GaussRadauRightQuadratureRule1D
<
ctype
>
(
p
);
default
:
DUNE_THROW
(
Exception
,
"Unknown QuadratureType"
);
}
...
...
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