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
904b9241
Commit
904b9241
authored
20 years ago
by
Robert Klöfkorn
Browse files
Options
Downloads
Patches
Plain Diff
DGMapper moved from dgspace.hh to here.
[[Imported from SVN: r1263]]
parent
18f9d790
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/dgspace/dgmapper.hh
+79
-0
79 additions, 0 deletions
fem/dgspace/dgmapper.hh
with
79 additions
and
0 deletions
fem/dgspace/dgmapper.hh
0 → 100644
+
79
−
0
View file @
904b9241
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifndef __DUNE_DGMAPPER_HH__
#define __DUNE_DGMAPPER_HH__
#include
<dune/fem/common/dofmapperinterface.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
,
int
dimRange
>
class
DGMapper
:
public
DofMapperDefault
<
DGMapper
<
IndexSetType
,
polOrd
,
dimRange
>
>
{
// 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
()
{};
//! default implementation if not overlaoded
virtual
int
numberOfDofs
()
const
{
return
numberOfDofs_
;
}
//! only called once, if grid was adapted
virtual
int
newSize
()
const
{
return
this
->
size
();
}
};
}
// end namespace Dune
#endif
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