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
0db4d5a3
Commit
0db4d5a3
authored
21 years ago
by
Robert Klöfkorn
Browse files
Options
Downloads
Patches
Plain Diff
Added some stuff for functionspace with const basis functions.
[[Imported from SVN: r171]]
parent
9276b6e6
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
fem/lagrangebase.hh
+44
-6
44 additions, 6 deletions
fem/lagrangebase.hh
with
44 additions
and
6 deletions
fem/lagrangebase.hh
+
44
−
6
View file @
0db4d5a3
...
...
@@ -117,11 +117,13 @@ namespace Dune {
{
typedef
typename
FunctionSpaceType
::
RangeField
RangeField
;
RangeField
factor
[
3
];
int
baseNum_
;
public:
LagrangeBaseFunction
(
FunctionSpaceType
&
f
,
int
baseNum
)
:
BaseFunctionInterface
<
FunctionSpaceType
>
(
f
)
{
baseNum_
=
baseNum
;
if
(
baseNum
==
2
)
{
// 1 - x - y
factor
[
0
]
=
-
1.0
;
...
...
@@ -566,7 +568,6 @@ namespace Dune {
Vec
<
numOfBaseFct
,
LagrangeBaseFunctionType
*>
baseFuncList_
;
};
//************************************************************************
//
// --LagrangeMapper
...
...
@@ -595,10 +596,32 @@ namespace Dune {
int
mapToGlobal
(
EntityType
&
en
,
int
localNum
)
const
{
enum
{
codim
=
EntityType
::
dimension
};
// return vertex number , very slow
return
(
*
en
.
entity
<
codim
>
(
localNum
)).
index
();
//int num = (*en.entity<codim>( localNum )).index();
//return num;
// get global vertex number
return
en
.
subIndex
<
codim
>
(
localNum
);
};
};
class
LagrangeMapper
<
0
>
:
public
MapperDefault
<
LagrangeMapper
<
0
>
>
{
public:
//! default is Lagrange with polOrd = 1
template
<
class
GridType
>
int
size
(
const
GridType
&
grid
,
int
level
)
const
{
// return number of vertices
return
grid
.
size
(
level
,
0
);
};
//! map Entity an local Dof number to global Dof number
//! for Lagrange with polOrd = 1
template
<
class
EntityType
>
int
mapToGlobal
(
EntityType
&
en
,
int
localNum
)
const
{
// return entity index
return
en
.
index
();
};
};
...
...
@@ -630,7 +653,7 @@ namespace Dune {
<
FunctionSpaceType
,
GridType
,
polOrd
>
LagrangeDiscreteFunctionSpaceType
;
typedef
BaseFunctionSetType
FastBaseFunctionSetType
;
// id is neighbor of the beast
//
!
id is neighbor of the beast
static
const
IdentifierType
id
=
665
;
// Lagrange 1 , to be revised in this matter
...
...
@@ -642,6 +665,8 @@ namespace Dune {
LagrangeDiscreteFunctionSpace
(
GridType
&
g
)
:
DiscreteFunctionSpaceType
(
g
,
id
)
// ,baseFuncSet_(*this) { };
{
// g.globalRefine ( maxLevel );
//std::cout << "Constructor of LagrangeDiscreteFunctionSpace! \n";
for
(
int
i
=
0
;
i
<
numOfDiffBase_
;
i
++
)
baseFuncSet_
(
i
)
=
NULL
;
...
...
@@ -672,6 +697,19 @@ namespace Dune {
return
(
*
baseFuncSet_
.
get
(
type
));
};
//! get maximal global polynom order
int
polynomOrder
(
)
const
{
return
polOrd
;
}
//! get local polynom order on entity
template
<
class
EntityType
>
int
localPolynomOrder
(
EntityType
&
en
)
const
{
return
polOrd
;
}
//! length of the dof vector
//! size knows the correct way to calculate the size of the functionspace
int
size
(
int
level
)
const
...
...
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