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
f8c3d98c
Commit
f8c3d98c
authored
19 years ago
by
Robert Klöfkorn
Browse files
Options
Downloads
Patches
Plain Diff
Added insert Indices to DataCollector during loadBalance.
Also minor faceliftings. [[Imported from SVN: r2311]]
parent
b0d728a1
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/transfer/adaptoperator.hh
+1
-1
1 addition, 1 deletion
fem/transfer/adaptoperator.hh
fem/transfer/datacollector.hh
+19
-37
19 additions, 37 deletions
fem/transfer/datacollector.hh
with
20 additions
and
38 deletions
fem/transfer/adaptoperator.hh
+
1
−
1
View file @
f8c3d98c
...
...
@@ -349,7 +349,7 @@ namespace Dune {
template
<
class
EntityType
>
void
prolongLocal
(
EntityType
&
father
,
EntityType
&
son
,
bool
initialize
)
const
{
assert
(
son
.
state
()
==
REFINED
);
//
assert( son.state() == REFINED )
;
df_
.
localFunction
(
father
,
vati_
);
df_
.
localFunction
(
son
,
sohn_
);
...
...
This diff is collapsed.
Click to expand it.
fem/transfer/datacollector.hh
+
19
−
37
View file @
f8c3d98c
...
...
@@ -512,6 +512,13 @@ namespace Dune {
{
ParamType
p
(
&
str
,
&
en
);
if
(
!
read_
)
dm_
.
removeOldIndex
(
en
);
else
{
dm_
.
insertNewIndex
(
en
);
dm_
.
resizeMem
(
mxlvl
*
10
);
}
ldc_
.
apply
(
p
);
{
typedef
typename
EntityType
::
HierarchicIterator
HierItType
;
...
...
@@ -519,11 +526,18 @@ namespace Dune {
for
(
HierItType
it
=
en
.
hbegin
(
mxlvl
);
it
!=
endit
;
++
it
)
{
//
if(
(*it).isLeaf()
)
if
(
!
read_
)
{
p
.
second
=
it
.
operator
->
();
ldc_
.
apply
(
p
);
dm_
.
removeOldIndex
(
*
it
);
}
else
{
dm_
.
insertNewIndex
(
*
it
);
dm_
.
checkMemorySize
();
}
p
.
second
=
it
.
operator
->
();
ldc_
.
apply
(
p
);
}
}
}
...
...
@@ -575,13 +589,12 @@ namespace Dune {
:
df_
(
df
)
,
lf_
(
df
.
newLocalFunction
()
)
,
leaf_
(
leaf
)
{}
//! store data to stream
//template <class ObjectStreamType, class EntityType>
void
apply
(
ParamType
&
p
)
const
{
assert
(
p
.
first
&&
p
.
second
);
EntityType
&
en
=
const_cast
<
EntityType
&>
(
*
(
p
.
second
));
if
(
leaf_
)
if
(
!
en
.
isLeaf
())
return
;
if
(
leaf_
&&
(
!
en
.
isLeaf
())
)
return
;
df_
.
localFunction
(
en
,
lf_
);
for
(
int
l
=
0
;
l
<
lf_
.
numberOfDofs
();
l
++
)
...
...
@@ -599,22 +612,6 @@ namespace Dune {
};
/*
template <class ObjectStreamType , class LocalFunctionType>
struct GatherScatterCopy
{
static void gather ( ObjectStreamType & os, LocalFunctionType & lf )
{
std::cout << "Gather data \n";
for(int l=0; l<lf.numberOfDofs(); l++)
{
os.readObject( lf[l] );
}
}
};
*/
template
<
class
DiscreteFunctionType
>
class
DataXtractor
:
public
LocalInlinePlus
<
DataXtractor
<
DiscreteFunctionType
>
,
...
...
@@ -638,40 +635,25 @@ namespace Dune {
typedef
typename
DiscreteFunctionType
::
RangeFieldType
RangeFieldType
;
typedef
typename
DiscreteFunctionType
::
DomainType
DomainType
;
//typedef void GatherFunctionType( ObjectStreamType & , LocalFunctionType & );
//typedef void ScatterFunctionType( ObjectStreamType & , LocalFunctionType & );
public:
DataXtractor
(
DiscreteFunctionType
&
df
,
bool
leaf
=
true
)
:
df_
(
df
)
,
lf_
(
df
.
newLocalFunction
()
)
,
leaf_
(
leaf
)
{}
//! store data to stream
//template <class ObjectStreamType, class EntityType>
void
apply
(
ParamType
&
p
)
const
{
assert
(
p
.
first
&&
p
.
second
);
EntityType
&
en
=
const_cast
<
EntityType
&>
(
*
(
p
.
second
));
if
(
leaf_
)
if
(
!
en
.
isLeaf
())
return
;
if
(
leaf_
&&
(
!
en
.
isLeaf
())
)
return
;
df_
.
localFunction
(
en
,
lf_
);
//assert( gatherFunc_ );
//gatherFunc_( (*(p.first)) , lf_ ) ;
for
(
int
l
=
0
;
l
<
lf_
.
numberOfDofs
();
l
++
)
{
(
*
(
p
.
first
)).
readObject
(
lf_
[
l
]
);
}
}
/*
template <template <class,class> class GatherScatterType>
void setGatherScatter ()
{
gatherFunc_ = GatherScatterType<ObjectStreamType,LocalFunctionType>::gather;
std::cout << "Set gather Function " << gatherFunc_ << "\n";
}
*/
private
:
mutable
DiscreteFunctionType
&
df_
;
mutable
LocalFunctionType
lf_
;
...
...
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