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
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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-common
Commits
18f9d790
Commit
18f9d790
authored
20 years ago
by
Robert Klöfkorn
Browse files
Options
Downloads
Patches
Plain Diff
DGMapper moved to seperate file.
[[Imported from SVN: r1262]]
parent
ce58bef3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fem/dgspace.hh
+1
-60
1 addition, 60 deletions
fem/dgspace.hh
with
1 addition
and
60 deletions
fem/dgspace.hh
+
1
−
60
View file @
18f9d790
...
...
@@ -7,70 +7,11 @@
#include
<dune/fem/common/discretefunctionspace.hh>
#include
<dune/fem/dgspace/monomialbase.hh>
#include
<dune/fem/dgspace/dgmapper.hh>
#include
<dune/fem/dofmanager.hh>
namespace
Dune
{
//***************************************************************************
//
//! DG Mapper for mapping of local dof numbers to global dof numbers,
//! i.e. the entry in the vector of unknowns
//
//***************************************************************************
template
<
class
IndexSetType
,
int
polOrd
>
class
DGMapper
:
public
DofMapperDefault
<
DGMapper
<
IndexSetType
,
polOrd
>
>
{
// index set of grid, i.e. the element indices
IndexSetType
&
indexSet_
;
// number of dofs on element
int
numberOfDofs_
;
int
level_
;
public:
//! Constructor
DGMapper
(
IndexSetType
&
iset
,
int
numDof
,
int
level
)
:
indexSet_
(
iset
),
numberOfDofs_
(
numDof
),
level_
(
level
)
{};
//! return size of function space
//! see dofmanager.hh for definition of IndexSet, which
//! is a wrapper for en.index
int
size
()
const
{
// return number of dofs * number of elements
return
(
numberOfDofs_
*
indexSet_
.
size
(
level_
,
0
));
}
//! return boundary type for given boundary id
//! uses the parameter class BoundaryIdentifierType
BoundaryType
boundaryType
(
int
id
)
const
{
// to be expanded for user needs
return
(
id
<
0
)
?
Dirichlet
:
Neumann
;
}
//! map Entity an local Dof number to global Dof number
//! see dofmanager.hh for definition of IndexSet, which
//! is a wrapper for en.index
template
<
class
EntityType
>
int
mapToGlobal
(
EntityType
&
en
,
int
localNum
)
const
{
// indexSet_.index<0>(en,0) return 0 entity of codim the codim 0
// entitys of en which is the element index
return
((
indexSet_
.
template
index
<
0
>(
en
,
0
)
*
numberOfDofs_
)
+
localNum
);
};
//** size methods needed by the dofmanager ***
//! calc new start point for element dof , vertex dof ...
//not needed here at the moment
virtual
void
calcInsertPoints
()
{};
//! only called once, if grid was adapted
virtual
int
newSize
()
const
{
return
this
->
size
();
}
};
//**********************************************************************
//
...
...
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