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
ed2320f5
Commit
ed2320f5
authored
19 years ago
by
Robert Klöfkorn
Browse files
Options
Downloads
Patches
Plain Diff
Uses iterator of space now. Also numberOfBaseFunction --> numBaseFunction.
[[Imported from SVN: r2875]]
parent
b292b0a1
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/feoperator.hh
+8
-85
8 additions, 85 deletions
fem/feoperator.hh
with
8 additions
and
85 deletions
fem/feoperator.hh
+
8
−
85
View file @
ed2320f5
...
...
@@ -92,24 +92,20 @@ namespace Dune {
void
assemble
(
)
const
{
typedef
typename
DiscFunctionType
::
FunctionSpaceType
FunctionSpaceType
;
typedef
typename
FunctionSpaceType
::
GridType
GridType
;
typedef
typename
GridType
::
template
Codim
<
0
>
::
LevelIterator
LevelIterator
;
typedef
typename
FunctionSpaceType
::
BaseFunctionSetType
BaseFunctionSetType
;
const
GridType
&
grid
=
functionSpace_
.
grid
();
typedef
typename
FunctionSpaceType
::
IteratorType
IteratorType
;
{
LevelIterator
it
=
grid
.
template
lbegin
<
0
>(
grid
.
maxlevel
()
);
LevelIterator
endit
=
grid
.
template
lend
<
0
>
(
grid
.
maxlevel
()
);
IteratorType
endit
=
functionSpace_
.
end
();
enum
{
maxnumOfBaseFct
=
30
};
if
(
!
matrix_
)
matrix_
=
this
->
newEmptyMatrix
();
FieldMatrix
<
double
,
maxnumOfBaseFct
,
maxnumOfBaseFct
>
mat
;
for
(
;
it
!=
endit
;
++
it
)
for
(
IteratorType
it
=
functionSpace_
.
begin
()
;
it
!=
endit
;
++
it
)
{
const
BaseFunctionSetType
&
baseSet
=
functionSpace_
.
getBaseFunctionSet
(
*
it
);
const
int
numOfBaseFct
=
baseSet
.
getNumberOf
BaseFunctions
();
const
int
numOfBaseFct
=
baseSet
.
num
BaseFunctions
();
// setup matrix
getLocalMatrix
(
*
it
,
numOfBaseFct
,
mat
);
...
...
@@ -125,75 +121,6 @@ namespace Dune {
}
}
}
#if 0
{
// eliminate the Dirichlet rows and columns
typedef typename GridType::template Codim<0>::Entity EntityType;
typedef typename GridType::template Codim<0>::IntersectionIterator NeighIt;
typedef typename NeighIt::BoundaryEntity BoundaryEntityType;
LevelIterator it = grid.template lbegin<0>( grid.maxlevel() );
LevelIterator endit = grid.template lend<0> ( grid.maxlevel() );
for( ; it != endit; ++it )
{
NeighIt endnit = it->iend();
for(NeighIt nit = it->ibegin() ; nit != endnit ; ++nit)
{
if(nit.boundary())
{
BoundaryEntityType & bEl = nit.boundaryEntity();
if( functionSpace_.boundaryType( bEl.id() ) == Dirichlet )
{
int neigh = nit.number_in_self();
if((*it).geometry().type() == triangle)
{
int numDof = 3;
for(int i=1; i<numDof; i++)
{
// funktioniert nur fuer Dreiecke
// hier muss noch gearbeitet werden. Wie kommt man von den
// Intersections zu den localen Dof Nummern?
int col = functionSpace_.mapToGlobal(*it,(neigh+i)%numDof);
// unitRow unitCol for boundary
matrix_->kroneckerKill(col,col);
}
}
if((*it).geometry().type() == tetrahedron)
{
int numDof = 4;
for(int i=1; i<numDof; i++)
{
// funktioniert nur fuer Dreiecke
// hier muss noch gearbeitet werden. Wie kommt man von den
// Intersections zu den localen Dof Nummern?
int col = functionSpace_.mapToGlobal(*it,(neigh+i)%numDof);
// unitRow unitCol for boundary
matrix_->kroneckerKill(col,col);
}
}
if((*it).geometry().type() == quadrilateral)
{
for(int i=0; i<2; i++)
{
// funktioniert nur fuer Dreiecke
// hier muss noch gearbeitet werden. Wie kommt man von den
// Intersections zu den localen Dof Nummern?
int col = functionSpace_.mapToGlobal(*it,edge[neigh][i]);
// unitRow unitCol for boundary
matrix_->kroneckerKill(col,col);
}
}
}
}
}
}
}
#endif
matrix_assembled_
=
true
;
}
...
...
@@ -201,12 +128,9 @@ namespace Dune {
void
multiplyOnTheFly
(
const
DiscFunctionType
&
arg
,
DiscFunctionType
&
dest
)
const
{
typedef
typename
DiscFunctionType
::
FunctionSpaceType
FunctionSpaceType
;
typedef
typename
FunctionSpaceType
::
GridType
GridType
;
typedef
typename
GridType
::
template
Codim
<
0
>
::
LevelIterator
LevelIterator
;
typedef
typename
FunctionSpaceType
::
IteratorType
IteratorType
;
typedef
typename
FunctionSpaceType
::
BaseFunctionSetType
BaseFunctionSetType
;
const
GridType
&
grid
=
functionSpace_
.
grid
();
typedef
typename
DiscFunctionType
::
LocalFunctionType
LocalFunctionType
;
typedef
typename
FunctionSpaceType
::
RangeType
RangeVecType
;
typedef
typename
FunctionSpaceType
::
JacobianRangeType
JacobianRange
;
...
...
@@ -220,14 +144,13 @@ namespace Dune {
dest
.
clear
();
LevelIterator
it
=
grid
.
template
lbegin
<
0
>(
grid
.
maxlevel
()
);
LevelIterator
endit
=
grid
.
template
lend
<
0
>
(
grid
.
maxlevel
()
);
for
(
;
it
!=
endit
;
++
it
)
IteratorType
endit
=
functionSpace_
.
end
();
for
(
IteratorType
it
=
functionSpace_
.
begin
();
it
!=
endit
;
++
it
)
{
//prepare( *it );
const
BaseFunctionSetType
&
baseSet
=
functionSpace_
.
getBaseFunctionSet
(
*
it
);
int
numOfBaseFct
=
baseSet
.
getNumberOf
BaseFunctions
();
int
numOfBaseFct
=
baseSet
.
num
BaseFunctions
();
for
(
int
i
=
0
;
i
<
numOfBaseFct
;
i
++
)
{
...
...
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