Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Timo Koch
dune-common
Commits
bff0fcf9
Commit
bff0fcf9
authored
19 years ago
by
Christian Engwer
Browse files
Options
Downloads
Patches
Plain Diff
get DGFunction working :-)
[[Imported from SVN: r3787]]
parent
4a7239f0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
disc/functions/dgfunction.hh
+18
-8
18 additions, 8 deletions
disc/functions/dgfunction.hh
with
18 additions
and
8 deletions
disc/functions/dgfunction.hh
+
18
−
8
View file @
bff0fcf9
...
...
@@ -32,8 +32,8 @@ namespace Dune {
template
<
class
G
,
class
RT
,
class
IS
,
int
o
>
class
DGFunction
:
virtual
public
GridFunction
<
G
,
RT
,
1
>
,
virtual
public
FunctionDefault
<
G
,
RT
,
1
>
,
virtual
public
GridFunctionDefault
<
G
,
RT
,
1
>
,
virtual
public
FunctionDefault
<
typename
G
::
ctype
,
RT
,
G
::
dimension
,
1
>
,
virtual
public
L2Function
<
typename
G
::
ctype
,
RT
,
G
::
dimension
,
1
>
{
//! get domain field type from the grid
...
...
@@ -42,6 +42,9 @@ namespace Dune {
//! get entity from the grid
typedef
typename
G
::
template
Codim
<
0
>
::
Entity
Entity
;
//! get domain dimension from the grid
enum
{
n
=
G
::
dimension
};
//! make copy constructor private
DGFunction
(
const
DGFunction
&
);
...
...
@@ -51,7 +54,7 @@ namespace Dune {
//! type of shapefunctions
typedef
Dune
::
MonomialShapeFunctionSetContainer
<
DT
,
RT
,
G
::
dimension
,
o
>
ShapeFunctionSetContainer
;
typedef
Dune
::
MonomialShapeFunctionSet
<
DT
,
RT
,
G
::
dimension
,
o
>
typedef
Dune
::
MonomialShapeFunctionSet
<
DT
,
RT
,
G
::
dimension
>
ShapeFunctionSet
;
public
:
typedef
RT
ResultType
;
...
...
@@ -64,12 +67,19 @@ namespace Dune {
DGFunction
(
const
G
&
g
,
const
IS
&
indexset
)
:
grid_
(
g
),
is_
(
indexset
)
{
coeff
.
resize
(
is
.
size
(
0
),
false
);
coeff
_
.
resize
(
is
_
.
size
(
0
),
false
);
}
//! deallocate the vector
~
DGFunction
()
{}
//! evaluate single component comp at global point x
/*! Evaluate a single component of the vector-valued
function.
@param[in] comp number of component to be evaluated
@param[in] x position to be evaluated
\return value of the component
*/
//! evaluate single component comp at global point x
/*! Evaluate a single component of the vector-valued
function.
...
...
@@ -95,11 +105,11 @@ namespace Dune {
assert
(
comp
==
0
);
RT
value
=
0
;
ShapeFunctionSet
&
s
=
shapefnkts_
(
e
.
type
(),
o
);
int
eid
=
is
.
index
(
e
);
const
ShapeFunctionSet
&
s
=
shapefnkts_
(
e
.
geometry
().
type
(),
o
);
int
eid
=
is
_
.
index
(
e
);
for
(
int
i
=
0
;
i
<
BlockSize
;
++
i
)
{
value
+=
coeff
[
eid
][
i
]
*
s
hapefnkts_
[
i
].
evaluateFunction
(
0
,
coord
);
value
+=
coeff
_
[
eid
][
i
]
*
s
[
i
].
evaluateFunction
(
0
,
xi
);
}
return
value
;
}
...
...
@@ -111,7 +121,7 @@ namespace Dune {
@param[in] u a continuous grid function
*/
void
interpolate
(
const
C0GridFunction
<
G
,
RT
,
m
>&
u
)
void
interpolate
(
const
C0GridFunction
<
G
,
RT
,
1
>&
u
)
{
DUNE_THROW
(
NotImplemented
,
"interpolate(C0GridFunction)"
);
}
...
...
@@ -171,7 +181,7 @@ namespace Dune {
// and a dynamically allocated vector
RepresentationType
coeff_
;
}
}
;
/** @} */
...
...
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