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
Tobias Leibner
dune-common
Commits
25415575
Commit
25415575
authored
20 years ago
by
Adrian Burri
Browse files
Options
Downloads
Patches
Plain Diff
const issues and alleviating the need for a registration of quadratures
[[Imported from SVN: r1658]]
parent
c0a4f8a0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fem/common/cachingbase.cc
+10
-2
10 additions, 2 deletions
fem/common/cachingbase.cc
fem/common/cachingbase.hh
+5
-5
5 additions, 5 deletions
fem/common/cachingbase.hh
with
15 additions
and
7 deletions
fem/common/cachingbase.cc
+
10
−
2
View file @
25415575
...
...
@@ -82,6 +82,10 @@ CachingBaseFunctionSet<FunctionSpaceType >::
values
(
int
baseFunct
,
const
QuadratureType
&
quad
)
const
{
ConstRangeMapIterator
it
=
vals_
.
find
(
quad
.
getIdentifier
());
if
(
it
==
vals_
.
end
())
{
registerQuadrature
(
quad
);
it
=
vals_
.
find
(
quad
.
getIdentifier
());
}
assert
(
it
!=
vals_
.
end
());
// Forgot to initialise with quadrature, eh?
assert
(
baseFunct
<
numOfBaseFct_
);
...
...
@@ -95,6 +99,10 @@ CachingBaseFunctionSet<FunctionSpaceType >::
gradients
(
int
baseFunct
,
const
QuadratureType
&
quad
)
const
{
ConstJacobianMapIterator
it
=
grads_
.
find
(
quad
.
getIdentifier
());
if
(
it
==
grads_
.
end
())
{
registerQuadrature
(
quad
);
it
=
grads_
.
find
(
quad
.
getIdentifier
());
}
assert
(
it
!=
grads_
.
end
());
assert
(
baseFunct
<
numOfBaseFct_
);
...
...
@@ -118,7 +126,7 @@ faces(int faceIdx, int baseFct, const QuadratureType& quad) const {
template
<
class
FunctionSpaceType
>
template
<
class
QuadratureType
>
void
CachingBaseFunctionSet
<
FunctionSpaceType
>::
registerQuadrature
(
const
QuadratureType
&
quad
)
registerQuadrature
(
const
QuadratureType
&
quad
)
const
{
// check if quadrature is already registered
int
identifier
=
quad
.
getIdentifier
();
...
...
@@ -156,7 +164,7 @@ registerQuadrature( const QuadratureType &quad )
template
<
class
FunctionSpaceType
>
template
<
class
QuadratureType
,
class
EntityType
>
void
CachingBaseFunctionSet
<
FunctionSpaceType
>::
registerQuadrature
(
const
QuadratureType
&
quad
,
const
EntityType
&
en
)
{
registerQuadrature
(
const
QuadratureType
&
quad
,
const
EntityType
&
en
)
const
{
//- Local typedefs
typedef
typename
EntityType
::
IntersectionIterator
IntersectionIterator
;
...
...
This diff is collapsed.
Click to expand it.
fem/common/cachingbase.hh
+
5
−
5
View file @
25415575
...
...
@@ -118,12 +118,12 @@ namespace Dune {
//! The base function set will only work for quadratures which were
//! registered
template
<
class
QuadratureType
>
void
registerQuadrature
(
const
QuadratureType
&
quad
);
void
registerQuadrature
(
const
QuadratureType
&
quad
)
const
;
//! Register face quadrature
template
<
class
QuadratureType
,
class
EntityType
>
void
registerQuadrature
(
const
QuadratureType
&
quad
,
const
EntityType
&
en
);
const
EntityType
&
en
)
const
;
private
:
//- Local typedefs
...
...
@@ -151,13 +151,13 @@ namespace Dune {
std
::
vector
<
BaseFunctionInterfaceType
*>
baseFunctionList_
;
//! map with cached values for base functions
RangeMap
vals_
;
mutable
RangeMap
vals_
;
//! map with cached values for base function gradients
JacobianMap
grads_
;
mutable
JacobianMap
grads_
;
//! map with cached values for face values of base functions
FaceMap
faces_
;
mutable
FaceMap
faces_
;
};
// end class CachingBaseFunctionSet
...
...
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