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
de7c6456
Commit
de7c6456
authored
19 years ago
by
Adrian Burri
Browse files
Options
Downloads
Patches
Plain Diff
Implementation of localFunction moved to adaptiveimp.hh,cc
[[Imported from SVN: r3329]]
parent
7f2daf14
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/discretefunction/adaptivefunction.cc
+10
-2
10 additions, 2 deletions
fem/discretefunction/adaptivefunction.cc
fem/discretefunction/adaptivefunction.hh
+5
-3
5 additions, 3 deletions
fem/discretefunction/adaptivefunction.hh
with
15 additions
and
5 deletions
fem/discretefunction/adaptivefunction.cc
+
10
−
2
View file @
de7c6456
...
...
@@ -16,7 +16,8 @@ namespace Dune {
dofVec_
(
dofVec
),
values_
(),
tmp_
(
0.0
),
tmpGrad_
(
0.0
)
tmpGrad_
(
0.0
),
init_
(
false
)
{}
template
<
class
DiscreteFunctionSpaceImp
>
...
...
@@ -26,7 +27,8 @@ namespace Dune {
dofVec_
(
other
.
dofVec_
),
values_
(),
tmp_
(
0.0
),
tmpGrad_
(
0.0
)
tmpGrad_
(
0.0
),
init_
(
false
)
{}
template
<
class
DiscreteFunctionSpaceImp
>
...
...
@@ -38,6 +40,7 @@ namespace Dune {
AdaptiveLocalFunction
<
DiscreteFunctionSpaceImp
>::
operator
[]
(
int
num
)
{
assert
(
init_
);
assert
(
num
>=
0
&&
num
<
numDofs
());
return
(
*
(
values_
[
num
]));
}
...
...
@@ -47,6 +50,7 @@ namespace Dune {
AdaptiveLocalFunction
<
DiscreteFunctionSpaceImp
>::
operator
[]
(
int
num
)
const
{
assert
(
init_
);
assert
(
num
>=
0
&&
num
<
numDofs
());
return
(
*
(
values_
[
num
]));
}
...
...
@@ -78,6 +82,7 @@ namespace Dune {
void
AdaptiveLocalFunction
<
DiscreteFunctionSpaceImp
>::
evaluateLocal
(
EntityType
&
en
,
const
DomainType
&
x
,
RangeType
&
ret
)
const
{
assert
(
init_
);
assert
(
en
.
geometry
().
checkInside
(
x
));
ret
*=
0.0
;
const
BaseFunctionSetType
&
bSet
=
spc_
.
getBaseFunctionSet
(
en
);
...
...
@@ -108,6 +113,7 @@ namespace Dune {
const
DomainType
&
x
,
JacobianRangeType
&
ret
)
const
{
assert
(
init_
);
enum
{
dim
=
EntityType
::
dimension
};
ret
*=
0.0
;
...
...
@@ -148,6 +154,8 @@ namespace Dune {
for
(
int
i
=
0
;
i
<
numOfDof
;
++
i
)
{
values_
[
i
]
=
&
(
this
->
dofVec_
[
spc_
.
mapToGlobal
(
en
,
i
)]);
}
init_
=
true
;
}
//- AdaptiveDiscreteFunction (specialisation)
template
<
class
ContainedFunctionSpaceImp
,
int
N
,
DofStoragePolicy
p
>
...
...
This diff is collapsed.
Click to expand it.
fem/discretefunction/adaptivefunction.hh
+
5
−
3
View file @
de7c6456
...
...
@@ -149,8 +149,8 @@ namespace Dune {
//! return empty local function
LocalFunctionType
newLocalFunction
()
DUNE_DEPRECATED
{
return
LocalFunctionType
(
*
this
);
}
//! return local function for given entity
template
<
class
EntityType
>
LocalFunctionType
localFunction
(
const
EntityType
&
en
)
{
return
LocalFunctionType
(
en
,
*
this
);
}
//
template <class EntityType>
//
LocalFunctionType localFunction (const EntityType &en) { return LocalFunctionType(en,*this); }
using
Imp
::
localFunction
;
using
Imp
::
write_xdr
;
using
Imp
::
read_xdr
;
...
...
@@ -275,7 +275,7 @@ namespace Dune {
private
:
//- Forbidden methods
//!
Copy construc
tor
//!
assignment opera
tor
ThisType
&
operator
=
(
const
ThisType
&
other
);
template
<
class
EntityType
>
...
...
@@ -289,6 +289,8 @@ namespace Dune {
mutable
RangeType
tmp_
;
mutable
JacobianRangeType
tmpGrad_
;
mutable
bool
init_
;
};
// end class AdaptiveLocalFunction
//- Specialisations
...
...
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