[Dune-devel] dune-istl communication question
Christian Engwer
christian.engwer at uni-muenster.de
Mon Nov 2 11:07:14 CET 2015
Dear all,
why does the mask object in the istl communication:
novlpschwarz.hh:141: mask[i] = 1;
novlpschwarz.hh:144: mask[i->local().local()] = 0;
novlpschwarz.hh:146: mask[i->local().local()] = 2;
novlpschwarz.hh:158: if (mask[i.index()] == 0)
novlpschwarz.hh:174: if (mask[i.index()] == 0) {
novlpschwarz.hh:179: if (mask[j.index()] == 0) {
novlpschwarz.hh:212: if (mask[i.index()] == 0) {
novlpschwarz.hh:215: if (mask[j.index()] == 1) //j is owner => then sum entries
novlpschwarz.hh:217: else if (mask[j.index()] == 0) {
novlpschwarz.hh:226: else if (mask[i.index()] == 1) {
novlpschwarz.hh:228: if (mask[j.index()] != 2)
owneroverlapcopy.hh:410: mask[i] = 1;
owneroverlapcopy.hh:413: mask[i->local().local()] = 0;
owneroverlapcopy.hh:418: result += x[i]*(y[i])*mask[i];
owneroverlapcopy.hh:437: mask[i] = 1;
owneroverlapcopy.hh:440: mask[i->local().local()] = 0;
owneroverlapcopy.hh:444: result += x[i].two_norm2()*mask[i];
It only stores entries from the set [0,1,2]
Currently it is implemented as std::vector<double>. Why?
(A) why double?
Is it faster to use double here? shouldn't we at least
restrict ourselfs to float? Why not use int or size_t or what ever?
Although char would be ric enough, I assume it might lead to
performance penalties due to alignment issues.
The mask is as large as the original data so storage is not
negligible.
(B) why std::vector?
I have the impression it will fail with hard to detect errors if we
types further nested than BlockVector<FieldVector<...>>.
Ciao
Christian
More information about the Dune-devel
mailing list