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
1eb7f82f
Commit
1eb7f82f
authored
19 years ago
by
Adrian Burri
Browse files
Options
Downloads
Patches
Plain Diff
Adjusted to interface changes
[[Imported from SVN: r3504]]
parent
efcc05a2
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fem/common/fastbase.cc
+26
-20
26 additions, 20 deletions
fem/common/fastbase.cc
fem/common/fastbase.hh
+16
-24
16 additions, 24 deletions
fem/common/fastbase.hh
with
42 additions
and
44 deletions
fem/common/fastbase.cc
+
26
−
20
View file @
1eb7f82f
...
...
@@ -100,56 +100,62 @@ evaluateInit( const QuadratureType &quad )
}
template
<
class
FunctionSpaceType
>
void
FastBaseFunctionSet
<
FunctionSpaceType
>::
typename
FastBaseFunctionSet
<
FunctionSpaceType
>::
DofType
FastBaseFunctionSet
<
FunctionSpaceType
>::
evaluateSingle
(
int
baseFunct
,
const
DomainType
&
xLocal
,
const
RangeType
&
factor
,
DofType
&
result
)
const
const
RangeType
&
factor
)
const
{
if
(
trulyVectorial_
)
{
BaseType
::
evaluateSingle
(
baseFunct
,
xLocal
,
factor
,
result
);
}
else
{
evaluateSingleOptim
(
baseFunct
,
xLocal
,
factor
,
result
);
return
BaseType
::
evaluateSingle
(
baseFunct
,
xLocal
,
factor
);
}
return
evaluateSingleOptim
(
baseFunct
,
xLocal
,
factor
);
}
template
<
class
FunctionSpaceType
>
void
FastBaseFunctionSet
<
FunctionSpaceType
>::
template
<
class
Entity
>
typename
FastBaseFunctionSet
<
FunctionSpaceType
>::
DofType
FastBaseFunctionSet
<
FunctionSpaceType
>::
evaluateGradientSingle
(
int
baseFunct
,
Entity
&
en
,
const
DomainType
&
xLocal
,
const
JacobianRangeType
&
factor
,
DofType
&
result
)
const
const
JacobianRangeType
&
factor
)
const
{
if
(
trulyVectorial_
)
{
BaseType
::
evaluateGradientSingle
(
baseFunct
,
xLocal
,
factor
,
result
);
}
else
{
evaluateGradientSingleOptim
(
baseFunct
,
xLocal
,
factor
,
result
);
return
BaseType
::
evaluateGradientSingle
(
baseFunct
,
en
,
xLocal
,
factor
);
}
return
evaluateGradientSingleOptim
(
baseFunct
,
en
,
xLocal
,
factor
);
}
template
<
class
FunctionSpaceType
>
void
FastBaseFunctionSet
<
FunctionSpaceType
>::
typename
FastBaseFunctionSet
<
FunctionSpaceType
>::
DofType
FastBaseFunctionSet
<
FunctionSpaceType
>::
evaluateSingleOptim
(
int
baseFunct
,
const
DomainType
&
xLocal
,
const
RangeType
&
factor
,
DofType
&
result
)
const
const
RangeType
&
factor
)
const
{
RangeType
phi
;
this
->
eval
(
util_
.
containedDof
(
baseFunct
),
xLocal
,
phi
);
int
comp
=
util_
.
component
(
baseFunct
);
re
sult
=
factor
[
comp
]
*
phi
[
comp
];
re
turn
factor
[
comp
]
*
phi
[
comp
];
}
template
<
class
FunctionSpaceType
>
void
FastBaseFunctionSet
<
FunctionSpaceType
>::
template
<
class
Entity
>
typename
FastBaseFunctionSet
<
FunctionSpaceType
>::
DofType
FastBaseFunctionSet
<
FunctionSpaceType
>::
evaluateGradientSingleOptim
(
int
baseFunct
,
Entity
&
en
,
const
DomainType
&
xLocal
,
const
JacobianRangeType
&
factor
,
DofType
&
result
)
const
const
JacobianRangeType
&
factor
)
const
{
assert
(
false
);
// * Add scaling!
JacobianRangeType
gradPhi
;
this
->
jacobian
(
util_
.
containedDof
(
baseFunct
),
xLocal
,
gradPhi
);
int
comp
=
util_
.
component
(
baseFunct
);
re
sult
=
gradPhi
[
comp
]
*
factor
[
comp
];
re
turn
gradPhi
[
comp
]
*
factor
[
comp
];
}
This diff is collapsed.
Click to expand it.
fem/common/fastbase.hh
+
16
−
24
View file @
1eb7f82f
...
...
@@ -125,23 +125,15 @@ namespace Dune {
enum
{
numDiffOrd
=
3
};
// * add methods for quadrature type as well
void
evaluateSingle
(
int
baseFunct
,
const
DomainType
&
xLocal
,
const
RangeType
&
factor
,
DofType
&
result
)
const
;
DofType
evaluateSingle
(
int
baseFunct
,
const
DomainType
&
xLocal
,
const
RangeType
&
factor
)
const
;
void
evaluateSet
(
const
DomainType
&
xLocal
,
const
RangeType
&
factor
,
DofVectorType
&
result
)
const
;
void
evaluateGradientSingle
(
int
baseFunct
,
const
DomainType
&
xLocal
,
const
JacobianRangeType
&
factor
,
DofType
&
result
)
const
;
void
evaluateGradientSet
(
const
DomainType
&
xLocal
,
const
JacobianRangeType
&
factor
,
DofVectorType
&
result
)
const
;
template
<
class
Entity
>
DofType
evaluateGradientSingle
(
int
baseFunct
,
Entity
&
en
,
const
DomainType
&
xLocal
,
const
JacobianRangeType
&
factor
)
const
;
protected
:
//! set method for storage of the base function pointers
...
...
@@ -190,15 +182,15 @@ namespace Dune {
template
<
int
diffOrd
,
class
QuadratureType
>
void
evaluateInit
(
const
QuadratureType
&
quad
)
;
void
evaluateSingleOptim
(
int
baseFunct
,
const
DomainType
&
xLocal
,
const
RangeType
&
factor
,
DofType
&
result
)
const
;
DofType
evaluateSingleOptim
(
int
baseFunct
,
const
DomainType
&
xLocal
,
const
RangeType
&
factor
)
const
;
void
evaluateGradientSingleOptim
(
int
baseFunct
,
const
DomainType
&
xLocal
,
const
JacobianRangeType
&
factor
,
DofType
&
result
)
const
;
template
<
class
Entity
>
DofType
evaluateGradientSingleOptim
(
int
baseFunct
,
Entity
&
en
,
const
DomainType
&
xLocal
,
const
JacobianRangeType
&
factor
)
const
;
};
// end class FastBaseFunctionSet
...
...
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