32template<
class T,
unsigned D,
class M,
class C>
40#define COMPONENT_APPLY_BUILTIN(OP,T) \
41inline void PETE_apply(const OP<T>&, T&, const T&) \
43 ERRORMSG("Component boundary condition on a scalar (T)." << endl); \
55template<
class T,
unsigned int D,
class M,
class C>
57: m_face(face), m_changePhysical(false)
64 ERRORMSG(
"BCondBase(): component 2 specified, component 1 not."
74 int lo = i < j ? i : j;
75 int hi = i > j ? i : j;
82 "BCondBase(): something other than [Sym,AntiSym]Tenzor specified"
83 <<
" two component indices; not implemented." <<
endl);
106template<
class T,
unsigned int D,
class M,
class C>
109 out <<
"BCondBase" <<
", Face=" << m_face;
112template<
class T,
unsigned int D,
class M,
class C>
119template<
class T,
unsigned int D,
class M,
class C>
126template<
class T,
unsigned int D,
class M,
class C>
132template<
class T,
unsigned int D,
class M,
class C>
138template<
class T,
unsigned int D,
class M,
class C>
144template<
class T,
unsigned int D,
class M,
class C>
150template<
class T,
unsigned int D,
class M,
class C>
156template<
class T,
unsigned int D,
class M,
class C>
162template<
class T,
unsigned int D,
class M,
class C>
168template<
class T,
unsigned int D,
class M,
class C>
171 out <<
"ConstantFace"
173 <<
", Constant=" << this->
Offset
177template<
class T,
unsigned int D,
class M,
class C>
183template<
class T,
unsigned int D,
class M,
class C>
189template<
class T,
unsigned int D,
class M,
class C>
195template<
class T,
unsigned D,
class M,
class C>
202 <<
", Offset=" <<
Offset <<
", Slope=" << Slope;
205template<
class T,
unsigned D,
class M,
class C>
212 <<
", Offset=" <<
Offset <<
", Slope=" << Slope;
215template<
class T,
unsigned D,
class M,
class C>
224template<
class T,
unsigned D,
class M,
class C>
234template<
class T,
unsigned D,
class M,
class C>
243 while (p!=this->
end())
245 (*p).second->write(o);
256template<
class T,
unsigned D,
class M,
class C>
263 (*p).second->apply(
a);
266template<
class T,
unsigned D,
class M,
class C>
271 if ((*p).second->changesPhysicalCells())
281template<
class T,
unsigned D,
class M,
class C>
291template<
class T,
unsigned D,
class M,
class C>
299template<
class T,
unsigned D,
class M,
class C>
307template<
class T,
unsigned D,
class M,
class C>
316template<
class T,
unsigned D,
class M,
class C>
325template<
class T,
unsigned D,
class M,
class C>
329 unsigned face,
int i,
int j)
336 ERRORMSG(
"ComponentFunctionFace(): allComponents specified; not allowed; "
337 <<
"use FunctionFace class instead." <<
endl);
365{
a[
e.Component] = b[
e.Component]; }
422{
a[
e.Component] =
a[
e.Component]+b[
e.Component]; }
454template<class
T,
unsigned D, class M>
458template<class
T,
unsigned D, class M>
462template<class
T,
unsigned D, class M>
465template<class
T,
unsigned D, class M>
468template<class
T,
unsigned D, class M,
CenteringEnum* CE,
unsigned NC>
473template<class
T,
unsigned D, class M, class C>
482template<
class T,
unsigned D,
class M,
class C>
494template<
class T,
unsigned D,
class M>
516 offset = -domain[d].length();
521 offset = domain[d].length();
531 if ( slab.
touches( fill_alloc ) )
538 src[d] = src[d] + offset;
549 if ( src.
touches( from_owned ) )
569 LFI lhs = fill.
begin(fill_it);
570 LFI rhs = from.
begin(from_it);
591template<
class T,
unsigned D,
class M>
608 offset = -domain[d].length();
613 offset = domain[d].length();
623 if ( slab.
touches( fill_alloc ) )
631 dest[d] = dest[d] + offset;
645 if ( dest.
touches( from_owned ) )
665 LFI lhs = fill.
begin(fill_it);
666 LFI rhs = from.
begin(from_it);
687template<
class T,
unsigned D,
class M>
708 offset = -domain[d].length() + 1;
715 offset = domain[d].length() - 1;
725 if ( slab.
touches( fill_alloc ) )
732 src[d] = src[d] + offset;
743 if ( src.
touches( from_owned ) )
763 LFI lhs = fill.
begin(fill_it);
764 LFI rhs = from.
begin(from_it);
785template<
class T,
unsigned D,
class M>
803 offset = -domain[d].length() + 1;
810 offset = domain[d].length() - 1;
820 if ( slab.
touches( fill_alloc ) )
827 src[d] = src[d] + offset;
838 if ( src.
touches( from_owned ) )
858 LFI lhs = fill.
begin(fill_it);
859 LFI rhs = from.
begin(from_it);
879template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
893 unsigned d = pf.getFace()/2;
895 if ( pf.getFace() & 1 )
903 for (
unsigned int c=1;
c<NC;
c++) {
904 if (CE[
c + d*NC] != centering0)
905 ERRORMSG(
"PeriodicFaceBCApply: BCond thinks all components have"
906 <<
" same centering along direction " << d
907 <<
", but it isn't so." <<
endl);
910 if (centering0 ==
CELL) {
911 offset = -domain[d].length();
915 Index( domain[d].
max(), domain[d].
max() + A.rightGuard(d));
916 offset = -domain[d].length()+1;
920 if (CE[pf.getComponent() + d*NC] ==
CELL) {
921 offset = -domain[d].length();
924 Index( domain[d].
max(), domain[d].
max() + A.rightGuard(d));
925 offset = -domain[d].length()+1;
931 slab[d] =
Index( domain[d].
min() - A.leftGuard(d), domain[d].min()-1 );
938 for (
unsigned int c=1;
c<NC;
c++) {
939 if (CE[
c + d*NC] != centering0)
940 ERRORMSG(
"PeriodicFaceBCApply: BCond thinks all components have"
941 <<
" same centering along direction " << d
942 <<
", but it isn't so." <<
endl);
945 if (centering0 ==
CELL) {
946 offset = -domain[d].length();
948 offset = -domain[d].length() + 1;
952 if (CE[pf.getComponent() + d*NC] ==
CELL) {
953 offset = domain[d].length();
955 offset = domain[d].length() - 1;
967 if ( slab.
touches( fill_alloc ) )
974 src[d] = src[d] + offset;
985 if ( src.
touches( from_owned ) )
1005 LFI lhs = fill.
begin(fill_it);
1006 LFI rhs = from.
begin(from_it);
1031# include <iterator.h>
1034template <
class T,
unsigned D,
class M>
1062 offset = -domain[d].length();
1075 offset = domain[d].length();
1082template <
class T,
unsigned D,
class M>
1111 offset = -domain[d].length() + 1;
1124 offset = domain[d].length() - 1;
1130template <
class T,
unsigned D,
class M>
1159 offset = -domain[d].length() + 1;
1172 offset = domain[d].length() - 1;
1178template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
1193 unsigned d = pf.getFace()/2;
1195 if (pf.getFace() & 1)
1203 if (pf.getComponent() == BCBase_t::allComponents)
1210 for (
unsigned int c = 1;
c < NC;
c++)
1213 if (CE[
c + d*NC] != centering0)
1214 ERRORMSG(
"ParallelPeriodicFaceBCApply:"
1215 <<
"BCond thinks all components have"
1216 <<
" same centering along direction " << d
1217 <<
", but it isn't so." <<
endl);
1223 if (centering0 ==
CELL) {
1224 offset = -domain[d].length();
1227 Index(domain[d].
max(), domain[d].
max() + A.leftGuard(d));
1228 offset = -domain[d].length() + 1;
1237 if (CE[pf.getComponent() + d*NC] ==
CELL)
1239 offset = -domain[d].length();
1244 Index(domain[d].
max(), domain[d].
max() + A.leftGuard(d));
1245 offset = -domain[d].length() + 1;
1256 Index(domain[d].
min() - A.leftGuard(d), domain[d].min()-1);
1260 if (pf.getComponent() == BCBase_t::allComponents)
1267 for (
unsigned int c = 1;
c < NC;
c++)
1269 if (CE[
c + d*NC] != centering0)
1270 ERRORMSG(
"ParallelPeriodicFaceBCApply:"
1271 <<
"BCond thinks all components have"
1272 <<
" same centering along direction " << d
1273 <<
", but it isn't so." <<
endl);
1279 if (centering0 ==
CELL) {
1280 offset = -domain[d].length();
1282 offset = -domain[d].length() + 1;
1291 if (CE[pf.getComponent() + d*NC] ==
CELL)
1293 offset = domain[d].length();
1297 offset = domain[d].length() - 1;
1313template<
class T,
unsigned D,
class M,
class C>
1324 typedef T Element_t;
1374 unsigned d = this->getFace()/2;
1380 Domain_t src_slab = dest_slab;
1381 src_slab[d] = src_slab[d] + offset;
1384 msg <<
"dest_slab = " << dest_slab <<
endl;
1385 msg <<
"src_slab = " << src_slab <<
endl;
1403 typedef std::multimap<Domain_t,LField_t*, std::less<Domain_t> > ReceiveMap_t;
1409 ReceiveMap_t receive_map;
1415 int receive_count = 0;
1435 typedef std::vector<LField_t*> DestList_t;
1436 typedef std::vector<LField_t*> SrcList_t;
1440 DestList_t dest_list;
1443 dest_list.reserve(1);
1444 src_list.reserve(1);
1449 msg <<
"Starting dest & src domain calculation." <<
endl;
1454 LField_t &lf = *lf_i->second;
1459 const Domain_t &lf_allocated = lf.getAllocated();
1462 msg <<
" Processing subdomain : " << lf_allocated <<
endl;
1466 if (lf_allocated.touches(dest_slab))
1467 dest_list.push_back(&lf);
1473 const Domain_t &lf_owned = lf.getOwned();
1475 if (lf_owned.touches(src_slab))
1476 src_list.push_back(&lf);
1480 msg <<
" dest_list has " << dest_list.size() <<
" elements." <<
endl;
1481 msg <<
" src_list has " << src_list.size() <<
" elements." <<
endl;
1484 DestListIterator_t dest_begin = dest_list.begin();
1485 DestListIterator_t dest_end = dest_list.end();
1486 SrcListIterator_t src_begin = src_list.begin();
1487 SrcListIterator_t src_end = src_list.end();
1501 msg <<
"Starting receive calculation." <<
endl;
1511 std::vector<bool> receive_mask(nprocs,
false);
1513 DestListIterator_t dest_i;
1515 for (dest_i = dest_begin; dest_i != dest_end; ++dest_i)
1519 LField_t &dest_lf = **dest_i;
1521 const Domain_t &dest_lf_alloc = dest_lf.getAllocated();
1527 const Domain_t dest_domain = dest_lf_alloc.intersect(dest_slab);
1529 Domain_t src_domain = dest_domain;
1530 src_domain[d] = src_domain[d] + offset;
1543 typename Layout_t::touch_range_dv
1544 src_range(layout.touch_range_rdv(src_domain));
1551 typename Layout_t::touch_iterator_dv rv_i;
1553 for (rv_i = src_range.first; rv_i != src_range.second; ++rv_i)
1562 Domain_t hit = src_domain.intersect(rv_alloc);
1563 hit[d] = hit[d] - offset;
1569 receive_map.insert(
value_type(hit,&dest_lf));
1572 msg <<
" Need remote data for domain: " << hit <<
endl;
1577 int rnode = rv_i->second->getNode();
1579 receive_mask[rnode] =
true;
1586 for (
int iproc = 0; iproc < nprocs; ++iproc)
1587 if (receive_mask[iproc]) ++receive_count;
1591 msg <<
" Expecting to see " << receive_count <<
" messages." <<
endl;
1592 msg <<
"Done with receive calculation." <<
endl;
1602 msg <<
"Starting send calculation" <<
endl;
1611 std::vector<Message *> messages(nprocs);
1612 for (
int miter=0; miter < nprocs; messages[miter++] = 0);
1620 std::vector<int> ndomains(nprocs);
1621 for(
int i = 0; i < nprocs; ++i) ndomains[i] = 0;
1624 SrcListIterator_t src_i;
1626 for (src_i = src_begin; src_i != src_end; ++src_i)
1630 LField_t &src_lf = **src_i;
1638 const Domain_t &src_lf_owned = src_lf.getOwned();
1639 const Domain_t &src_lf_alloc = src_lf.getAllocated();
1645 const Domain_t src_owned = src_lf_owned.intersect(src_slab);
1646 const Domain_t src_alloc = src_lf_alloc.intersect(src_slab);
1648 Domain_t dest_owned = src_owned;
1649 dest_owned[d] = dest_owned[d] - offset;
1651 Domain_t dest_alloc = src_alloc;
1652 dest_alloc[d] = dest_alloc[d] - offset;
1655 msg <<
" Considering LField with the domains:" <<
endl;
1656 msg <<
" owned = " << src_lf_owned <<
endl;
1657 msg <<
" alloc = " << src_lf_alloc <<
endl;
1658 msg <<
" The intersections with src_slab are:" <<
endl;
1659 msg <<
" owned = " << src_owned <<
endl;
1660 msg <<
" alloc = " << src_alloc <<
endl;
1666 typename Layout_t::touch_range_dv
1667 dest_range(layout.touch_range_rdv(dest_owned,gc));
1669 typename Layout_t::touch_iterator_dv rv_i;
1678 for (rv_i = dest_range.first; rv_i != dest_range.second; ++rv_i)
1684 Domain_t hit = dest_alloc.intersect(rv_i->first);
1685 hit[d] = hit[d] + offset;
1689 int rnode = rv_i->second->getNode();
1692 msg <<
" Overlap domain = " << rv_i->first <<
endl;
1693 msg <<
" Inters. domain = " << hit;
1694 msg <<
" --> node " << rnode <<
endl;
1703 Element_t compressed_value;
1704 LFI_t msgval = src_lf.begin(hit, compressed_value);
1705 msgval.TryCompress();
1709 if (!messages[rnode])
1711 messages[rnode] =
new Message;
1715 messages[rnode]->put(hit);
1716 messages[rnode]->put(msgval);
1733 for (
int iproc = 0; iproc < nprocs; ++iproc)
1735 if (messages[iproc])
1739 msg <<
" ParallelPeriodicBCApply: Sending message to node "
1741 <<
" number of domains = " << ndomains[iproc] <<
endl
1742 <<
" number of MsgItems = "
1743 << messages[iproc]->size() <<
endl;
1754 msg <<
" Sent " << send_count <<
" messages" <<
endl;
1755 msg <<
"Done with send." <<
endl;
1772 msg <<
"Starting local calculation." <<
endl;
1775 DestListIterator_t dest_i;
1777 for (dest_i = dest_begin; dest_i != dest_end; ++dest_i)
1781 LField_t &dest_lf = **dest_i;
1783 const Domain_t &dest_lf_alloc = dest_lf.getAllocated();
1785 const Domain_t dest_domain = dest_lf_alloc.intersect(dest_slab);
1787 Domain_t src_domain = dest_domain;
1788 src_domain[d] = src_domain[d] + offset;
1790 SrcListIterator_t src_i;
1792 for (src_i = src_begin; src_i != src_end; ++src_i)
1796 LField_t &src_lf = **src_i;
1802 const Domain_t &src_lf_owned = src_lf.getOwned();
1803 const Domain_t &src_lf_alloc = src_lf.getAllocated();
1808 if (src_domain.touches(src_lf_owned))
1814 dest_lf.Uncompress();
1818 Domain_t real_src_domain =
1819 src_domain.intersect(src_lf_alloc);
1821 Domain_t real_dest_domain = real_src_domain;
1822 real_dest_domain[d] = real_dest_domain[d] - offset;
1825 msg <<
" Copying local data . . ." <<
endl;
1826 msg <<
" source domain = " << real_src_domain <<
endl;
1827 msg <<
" dest domain = " << real_dest_domain <<
endl;
1832 LFI_t lhs = dest_lf.begin(real_dest_domain);
1833 LFI_t rhs = src_lf.begin(real_src_domain);
1852 msg <<
"Done with local calculation." <<
endl;
1868 msg <<
"Starting receive..." <<
endl;
1872 while (receive_count > 0)
1891 int ndomains = message->
size() / (D + 3);
1894 msg <<
" Message received from node "
1895 << any_node <<
"," <<
endl
1896 <<
" number of domains = " << ndomains <<
endl;
1899 for (
int idomain=0; idomain < ndomains; ++idomain)
1904 Domain_t intersection;
1905 intersection.getMessage(*message);
1906 intersection[d] = intersection[d] - offset;
1910 Element_t compressed_value;
1911 LFI_t rhs(compressed_value);
1912 rhs.getMessage(*message);
1915 msg <<
" Received remote overlap region = "
1916 << intersection <<
endl;
1922 receive_map.find(intersection);
1924 PAssert(hit != receive_map.end());
1938 msg <<
", LHS value = " << *lf.
begin() <<
endl;
1939 msg <<
" RHS compressed ? " << rhs.IsCompressed();
1940 msg <<
", RHS value = " << *rhs <<
endl;
1941 msg <<
" *rhs == *lf.begin() ? "
1945 (*rhs == *lf.
begin())))
1950 LFI_t lhs = lf.
begin(intersection);
1955 msg <<
" Doing copy." <<
endl;
1963 receive_map.erase(hit);
1971 msg <<
"Done with receive." <<
endl;
1981template <
class T,
unsigned D,
class M>
2009 offset = -domain[d].length();
2022 offset = domain[d].length();
2030template<
class T,
unsigned D,
class M,
class C>
2041 typedef T Element_t;
2091 unsigned d = this->getFace()/2;
2097 Domain_t dest_slab = src_slab;
2098 dest_slab[d] = dest_slab[d] + offset;
2101 msg <<
"dest_slab = " << dest_slab <<
endl;
2102 msg <<
"src_slab = " << src_slab <<
endl;
2120 typedef std::multimap<Domain_t,LField_t*, std::less<Domain_t> > ReceiveMap_t;
2126 ReceiveMap_t receive_map;
2132 int receive_count = 0;
2152 typedef std::vector<LField_t*> DestList_t;
2153 typedef std::vector<LField_t*> SrcList_t;
2157 DestList_t dest_list;
2160 dest_list.reserve(1);
2161 src_list.reserve(1);
2166 msg <<
"Starting dest & src domain calculation." <<
endl;
2171 LField_t &lf = *lf_i->second;
2177 const Domain_t &lf_owned = lf.getOwned();
2180 msg <<
" Processing subdomain : " << lf_owned <<
endl;
2184 if (lf_owned.touches(dest_slab))
2185 dest_list.push_back(&lf);
2191 const Domain_t &lf_allocated = lf.getAllocated();
2193 if (lf_allocated.touches(src_slab))
2194 src_list.push_back(&lf);
2198 msg <<
" dest_list has " << dest_list.size() <<
" elements." <<
endl;
2199 msg <<
" src_list has " << src_list.size() <<
" elements." <<
endl;
2202 DestListIterator_t dest_begin = dest_list.begin();
2203 DestListIterator_t dest_end = dest_list.end();
2204 SrcListIterator_t src_begin = src_list.begin();
2205 SrcListIterator_t src_end = src_list.end();
2219 msg <<
"Starting receive calculation." <<
endl;
2229 std::vector<bool> receive_mask(nprocs,
false);
2231 DestListIterator_t dest_i;
2233 for (dest_i = dest_begin; dest_i != dest_end; ++dest_i)
2237 LField_t &dest_lf = **dest_i;
2239 const Domain_t &dest_lf_alloc = dest_lf.getAllocated();
2245 const Domain_t dest_domain = dest_lf_alloc.intersect(dest_slab);
2247 Domain_t src_domain = dest_domain;
2250 src_domain[d] = src_domain[d] - offset;
2264 typename Layout_t::touch_range_dv
2265 src_range(layout.touch_range_rdv(src_domain,gc));
2272 typename Layout_t::touch_iterator_dv rv_i;
2274 for (rv_i = src_range.first; rv_i != src_range.second; ++rv_i)
2282 const Domain_t rv_alloc = rv_i->first;
2284 Domain_t hit = src_domain.intersect(rv_alloc);
2286 hit[d] = hit[d] + offset;
2292 receive_map.insert(
value_type(hit,&dest_lf));
2295 msg <<
" Need remote data for domain: " << hit <<
endl;
2300 int rnode = rv_i->second->getNode();
2302 receive_mask[rnode] =
true;
2309 for (
int iproc = 0; iproc < nprocs; ++iproc)
2310 if (receive_mask[iproc]) ++receive_count;
2314 msg <<
" Expecting to see " << receive_count <<
" messages." <<
endl;
2315 msg <<
"Done with receive calculation." <<
endl;
2325 msg <<
"Starting send calculation" <<
endl;
2334 std::vector<Message *> messages(nprocs);
2335 for (
int miter=0; miter < nprocs; messages[miter++] = 0);
2343 std::vector<int> ndomains(nprocs);
2344 for(
int i = 0; i < nprocs; ++i) ndomains[i] = 0;
2347 SrcListIterator_t src_i;
2349 for (src_i = src_begin; src_i != src_end; ++src_i)
2353 LField_t &src_lf = **src_i;
2361 const Domain_t &src_lf_owned = src_lf.getOwned();
2362 const Domain_t &src_lf_alloc = src_lf.getAllocated();
2368 const Domain_t src_owned = src_lf_owned.intersect(src_slab);
2369 const Domain_t src_alloc = src_lf_alloc.intersect(src_slab);
2371 Domain_t dest_owned = src_owned;
2372 dest_owned[d] = dest_owned[d] + offset;
2374 Domain_t dest_alloc = src_alloc;
2375 dest_alloc[d] = dest_alloc[d] + offset;
2378 msg <<
" Considering LField with the domains:" <<
endl;
2379 msg <<
" owned = " << src_lf_owned <<
endl;
2380 msg <<
" alloc = " << src_lf_alloc <<
endl;
2381 msg <<
" The intersections with src_slab are:" <<
endl;
2382 msg <<
" owned = " << src_owned <<
endl;
2383 msg <<
" alloc = " << src_alloc <<
endl;
2389 typename Layout_t::touch_range_dv
2390 dest_range(layout.touch_range_rdv(dest_owned,gc));
2392 typename Layout_t::touch_iterator_dv rv_i;
2401 for (rv_i = dest_range.first; rv_i != dest_range.second; ++rv_i)
2407 Domain_t hit = dest_alloc.intersect(rv_i->first);
2408 hit[d] = hit[d] - offset;
2412 int rnode = rv_i->second->getNode();
2415 msg <<
" Overlap domain = " << rv_i->first <<
endl;
2416 msg <<
" Inters. domain = " << hit;
2417 msg <<
" --> node " << rnode <<
endl;
2426 Element_t compressed_value;
2427 LFI_t msgval = src_lf.begin(hit, compressed_value);
2428 msgval.TryCompress();
2432 if (!messages[rnode])
2434 messages[rnode] =
new Message;
2438 messages[rnode]->put(hit);
2439 messages[rnode]->put(msgval);
2456 for (
int iproc = 0; iproc < nprocs; ++iproc)
2458 if (messages[iproc])
2462 msg <<
" ParallelPeriodicBCApply: Sending message to node "
2464 <<
" number of domains = " << ndomains[iproc] <<
endl
2465 <<
" number of MsgItems = "
2466 << messages[iproc]->size() <<
endl;
2477 msg <<
" Sent " << send_count <<
" messages" <<
endl;
2478 msg <<
"Done with send." <<
endl;
2495 msg <<
"Starting local calculation." <<
endl;
2498 DestListIterator_t dest_i;
2500 for (dest_i = dest_begin; dest_i != dest_end; ++dest_i)
2504 LField_t &dest_lf = **dest_i;
2506 const Domain_t &dest_lf_alloc = dest_lf.getAllocated();
2509 const Domain_t dest_domain = dest_lf_alloc.intersect(dest_slab);
2511 Domain_t src_domain = dest_domain;
2514 src_domain[d] = src_domain[d] - offset;
2516 SrcListIterator_t src_i;
2518 for (src_i = src_begin; src_i != src_end; ++src_i)
2522 LField_t &src_lf = **src_i;
2529 const Domain_t &src_lf_alloc = src_lf.getAllocated();
2534 if (src_domain.touches(src_lf_alloc))
2540 dest_lf.Uncompress();
2544 Domain_t real_src_domain =
2545 src_domain.intersect(src_lf_alloc);
2547 Domain_t real_dest_domain = real_src_domain;
2549 real_dest_domain[d] = real_dest_domain[d] + offset;
2552 msg <<
" Copying local data . . ." <<
endl;
2553 msg <<
" source domain = " << real_src_domain <<
endl;
2554 msg <<
" dest domain = " << real_dest_domain <<
endl;
2559 LFI_t lhs = dest_lf.begin(real_dest_domain);
2560 LFI_t rhs = src_lf.begin(real_src_domain);
2579 msg <<
"Done with local calculation." <<
endl;
2595 msg <<
"Starting receive..." <<
endl;
2599 while (receive_count > 0)
2618 int ndomains = message->
size() / (D + 3);
2621 msg <<
" Message received from node "
2622 << any_node <<
"," <<
endl
2623 <<
" number of domains = " << ndomains <<
endl;
2626 for (
int idomain=0; idomain < ndomains; ++idomain)
2631 Domain_t intersection;
2632 intersection.getMessage(*message);
2634 intersection[d] = intersection[d] + offset;
2638 Element_t compressed_value;
2639 LFI_t rhs(compressed_value);
2640 rhs.getMessage(*message);
2643 msg <<
" Received remote overlap region = "
2644 << intersection <<
endl;
2650 receive_map.find(intersection);
2652 PAssert(hit != receive_map.end());
2666 msg <<
", LHS value = " << *lf.
begin() <<
endl;
2667 msg <<
" RHS compressed ? " << rhs.IsCompressed();
2668 msg <<
", RHS value = " << *rhs <<
endl;
2669 msg <<
" *rhs == *lf.begin() ? "
2673 (*rhs == *lf.
begin())))
2678 LFI_t lhs = lf.
begin(intersection);
2683 msg <<
" Doing copy." <<
endl;
2692 receive_map.erase(hit);
2700 msg <<
"Done with receive." <<
endl;
2721{
a = b*
e.Slope +
e.Offset; }
2735 a[
e.Component] = b[
e.Component]*
e.Slope[
e.Component] +
e.Offset[
e.Component];
2777template<class
T,
unsigned D, class M>
2780template<class
T,
unsigned D, class M>
2783template<class
T,
unsigned D, class M>
2786template<class
T,
unsigned D, class M,
CenteringEnum* CE,
unsigned NC>
2791template<class
T,
unsigned D, class M, class C>
2798template<
class T,
unsigned D,
class M,
class C>
2846 LFI lhs = fill.
begin(fill_it);
2847 LFI rhs = from.
begin(from_it);
2870template<
class T,
unsigned D,
class M>
2907 offset = 2*domain[d].max() + 1;
2920 offset = 2*domain[d].min() - 1;
2959 src[d] = offset - src[d];
3002template<
class T,
unsigned D,
class M>
3041 offset = 2*domain[d].max() + 1 - 1;
3055 offset = 2*domain[d].min() - 1 + 1;
3075 if ( slab.
touches( fill_alloc ) )
3092 src[d] = offset - src[d];
3136template<
class T,
unsigned D,
class M>
3172 offset = 2*domain[d].max() + 1 - 1;
3186 offset = 2*domain[d].min() - 1 + 1;
3206 if ( slab.
touches( fill_alloc ) )
3223 src[d] = offset - src[d];
3265template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
3284 unsigned d = ef.getFace()/2;
3292 if ( ef.getFace() & 1 )
3305 for (
unsigned int c=1;
c<NC;
c++)
3308 if (CE[
c + d*NC] != centering0)
3309 ERRORMSG(
"ExtrapolateFaceBCApply: BCond thinks all components"
3310 <<
" have same centering along direction " << d
3311 <<
", but it isn't so." <<
endl);
3320 slab[d] =
Index(domain[d].
max() + 1,
3321 domain[d].
max() + A.rightGuard(d));
3323 if (centering0 ==
CELL)
3325 offset = 2*domain[d].max() + 1 ;
3329 offset = 2*domain[d].max() + 1 - 1;
3336 if (CE[ef.getComponent() + d*NC] ==
CELL)
3341 int highcell = A.get_mesh().gridSizes[d] - 2;
3342 slab[d] =
Index(highcell + 1, highcell + A.rightGuard(d));
3345 offset = 2*highcell + 1 ;
3352 int highvert = A.get_mesh().gridSizes[d] - 1;
3353 slab[d] =
Index(highvert + 1, highvert + A.rightGuard(d));
3356 offset = 2*highvert + 1 - 1;
3366 slab[d] =
Index( domain[d].
min() - A.leftGuard(d), domain[d].min()-1 );
3379 for (
unsigned int c=1;
c<NC;
c++)
3383 if (CE[
c + d*NC] != centering0)
3384 ERRORMSG(
"ExtrapolateFaceBCApply: BCond thinks all components"
3385 <<
" have same centering along direction " << d
3386 <<
", but it isn't so." <<
endl);
3392 if (centering0 ==
CELL)
3394 offset = 2*domain[d].min() - 1;
3398 offset = 2*domain[d].min() - 1 + 1;
3406 if (CE[ef.getComponent() + d*NC] ==
CELL)
3408 offset = 2*domain[d].min() - 1;
3412 offset = 2*domain[d].min() - 1 + 1;
3436 if ( slab.
touches( fill_alloc ) )
3453 src[d] = offset - src[d];
3506{
a = b*
e.Slope +
e.Offset; }
3521 a[
e.Component] = b[
e.Component]*
e.Slope[
e.Component] +
e.Offset[
e.Component];
3560template<
class T,
class T1>
3590template<class
T,
unsigned D, class M>
3593template<class
T,
unsigned D, class M>
3596template<class
T,
unsigned D, class M>
3599template<class
T,
unsigned D, class M,
CenteringEnum* CE,
unsigned NC>
3604template<class
T,
unsigned D, class M, class C>
3611template<
class T,
unsigned D,
class M,
class C>
3658 LFI lhs = fill.
begin(fill_it);
3659 LFI rhs = from.
begin(from_it);
3679template<
class T,
unsigned D,
class M,
class C>
3722 LFI lhs = fill.
begin(dest);
3748template<
class T,
unsigned D,
class M>
3785 offset = 2*domain[d].max() + 1;
3798 offset = 2*domain[d].min() - 1;
3837 src[d] = offset - src[d];
3881template<
class T,
unsigned D,
class M>
3917 phys[d] =
Index( domain[d].
max(), domain[d].
max(), 1);
3924 offset = 2*domain[d].max() + 1 - 1;
3936 phys[d] =
Index( domain[d].
min(), domain[d].
min(), 1);
3943 offset = 2*domain[d].min() - 1 + 1;
3984 if ( slab.
touches( fill_alloc ) )
4001 src[d] = offset - src[d];
4045template<
class T,
unsigned D,
class M>
4080 phys[d] =
Index( domain[d].
max(), domain[d].
max(), 1);
4087 offset = 2*domain[d].max() + 1 - 1;
4099 phys[d] =
Index( domain[d].
min(), domain[d].
min(), 1);
4106 offset = 2*domain[d].min() - 1 + 1;
4147 if ( slab.
touches( fill_alloc ) )
4164 src[d] = offset - src[d];
4206template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
4225 unsigned d = ef.getFace()/2;
4227 bool setPhys =
false;
4234 if ( ef.getFace() & 1 )
4247 for (
unsigned int c=1;
c<NC;
c++)
4250 if (CE[
c + d*NC] != centering0)
4252 "ExtrapolateAndZeroFaceBCApply: BCond thinks all components"
4253 <<
" have same centering along direction " << d
4254 <<
", but it isn't so." <<
endl);
4263 slab[d] =
Index(domain[d].
max() + 1,
4264 domain[d].
max() + A.rightGuard(d));
4266 if (centering0 ==
CELL)
4268 offset = 2*domain[d].max() + 1 ;
4272 offset = 2*domain[d].max() + 1 - 1;
4276 phys[d] =
Index( domain[d].
max(), domain[d].
max(), 1);
4284 if (CE[ef.getComponent() + d*NC] ==
CELL)
4289 int highcell = A.get_mesh().gridSizes[d] - 2;
4290 slab[d] =
Index(highcell + 1, highcell + A.rightGuard(d));
4293 offset = 2*highcell + 1 ;
4301 int highvert = A.get_mesh().gridSizes[d] - 1;
4302 slab[d] =
Index(highvert + 1, highvert + A.rightGuard(d));
4306 offset = 2*highvert + 1 - 1;
4310 phys[d] =
Index( highvert, highvert, 1 );
4321 slab[d] =
Index( domain[d].
min() - A.leftGuard(d), domain[d].min()-1 );
4334 for (
unsigned int c=1;
c<NC;
c++)
4338 if (CE[
c + d*NC] != centering0)
4340 "ExtrapolateAndZeroFaceBCApply: BCond thinks all components"
4341 <<
" have same centering along direction " << d
4342 <<
", but it isn't so." <<
endl);
4348 if (centering0 ==
CELL)
4350 offset = 2*domain[d].min() - 1;
4354 offset = 2*domain[d].min() - 1 + 1;
4358 phys[d] =
Index(domain[d].
min(), domain[d].
min(), 1);
4367 if (CE[ef.getComponent() + d*NC] ==
CELL)
4369 offset = 2*domain[d].min() - 1;
4373 offset = 2*domain[d].min() - 1 + 1;
4377 phys[d] =
Index(domain[d].
min(), domain[d].
min(), 1);
4425 if ( slab.
touches( fill_alloc ) )
4442 src[d] = offset - src[d];
4519template<
class T,
unsigned D,
class M>
4522template<
class T,
unsigned D,
class M>
4525template<
class T,
unsigned D,
class M>
4528template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
4533template<
class T,
unsigned D,
class M,
class C>
4545template<
class T,
unsigned D,
class M>
4563 offset = 2*domain[d].max() + 1;
4567 offset = 2*domain[d].min() - 1;
4577 if ( slab.
touches( fill_alloc ) )
4584 src[d] = offset - src[d];
4595 if ( src.
touches( from_owned ) )
4615 LFI lhs = fill.
begin(fill_it);
4616 LFI rhs = from.
begin(from_it);
4630template<
class T,
unsigned D,
class M>
4650 offset = 2*domain[d].max() + 1 - 1;
4656 offset = 2*domain[d].min() - 1 + 1;
4666 if ( slab.
touches( fill_alloc ) )
4673 src[d] = offset - src[d];
4684 if ( src.
touches( from_owned ) )
4704 LFI lhs = fill.
begin(fill_it);
4705 LFI rhs = from.
begin(from_it);
4719template<
class T,
unsigned D,
class M>
4736 offset = 2*domain[d].max() + 1 - 1;
4742 offset = 2*domain[d].min() - 1 + 1;
4752 if ( slab.
touches( fill_alloc ) )
4759 src[d] = offset - src[d];
4770 if ( src.
touches( from_owned ) )
4790 LFI lhs = fill.
begin(fill_it);
4791 LFI rhs = from.
begin(from_it);
4805template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
4819 unsigned d = ff.getFace()/2;
4821 if ( ff.getFace() & 1 ) {
4823 slab[d] =
Index( domain[d].
max() + 1, domain[d].
max() + A.rightGuard(d));
4827 for (
int c=1;
c<NC;
c++) {
4828 if (CE[
c + d*NC] != centering0)
4829 ERRORMSG(
"FunctionFaceBCApply: BCond thinks all components have"
4830 <<
" same centering along direction " << d
4831 <<
", but it isn't so." <<
endl);
4834 if (centering0 ==
CELL) {
4835 offset = 2*domain[d].max() + 1;
4837 offset = 2*domain[d].max() + 1 - 1;
4841 slab[d] =
Index( domain[d].
min() - A.leftGuard(d), domain[d].min()-1 );
4845 for (
int c=1;
c<NC;
c++) {
4846 if (CE[
c + d*NC] != centering0)
4847 ERRORMSG(
"FunctionFaceBCApply: BCond thinks all components have"
4848 <<
" same centering along direction " << d
4849 <<
", but it isn't so." <<
endl);
4852 if (centering0 ==
CELL) {
4853 offset = 2*domain[d].min() - 1;
4855 offset = 2*domain[d].min() - 1 + 1;
4866 if ( slab.
touches( fill_alloc ) )
4873 src[d] = offset - src[d];
4884 if ( src.
touches( from_owned ) )
4904 LFI lhs = fill.
begin(fill_it);
4905 LFI rhs = from.
begin(from_it);
4936{
a[
e.Component] =
e.Func(b[
e.Component]); }
4970template<class
T,
unsigned D, class M>
4973template<class
T,
unsigned D, class M>
4976template<class
T,
unsigned D, class M>
4979template<class
T,
unsigned D, class M,
CenteringEnum* CE,
unsigned NC>
4985template<class
T,
unsigned D, class M, class C>
4996template<
class T,
unsigned D,
class M>
5014 offset = 2*domain[d].max() + 1;
5018 offset = 2*domain[d].min() - 1;
5028 if ( slab.
touches( fill_alloc ) )
5035 src[d] = offset - src[d];
5046 if ( src.
touches( from_owned ) )
5066 LFI lhs = fill.
begin(fill_it);
5067 LFI rhs = from.
begin(from_it);
5083template<
class T,
unsigned D,
class M>
5103 offset = 2*domain[d].max() + 1 - 1;
5109 offset = 2*domain[d].min() - 1 + 1;
5119 if ( slab.
touches( fill_alloc ) )
5126 src[d] = offset - src[d];
5137 if ( src.
touches( from_owned ) )
5157 LFI lhs = fill.
begin(fill_it);
5158 LFI rhs = from.
begin(from_it);
5174template<
class T,
unsigned D,
class M>
5191 offset = 2*domain[d].max() + 1 - 1;
5197 offset = 2*domain[d].min() - 1 + 1;
5207 if ( slab.
touches( fill_alloc ) )
5214 src[d] = offset - src[d];
5225 if ( src.
touches( from_owned ) )
5245 LFI lhs = fill.
begin(fill_it);
5246 LFI rhs = from.
begin(from_it);
5262template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
5276 unsigned d = ff.getFace()/2;
5278 if ( ff.getFace() & 1 ) {
5280 slab[d] =
Index( domain[d].
max() + 1, domain[d].
max() + A.rightGuard(d));
5283 if (CE[ff.getComponent() + d*NC] ==
CELL) {
5284 ERRORMSG(
"check src code, had to change ef (not known) to ff ??? " <<
endl);
5285 offset = 2*domain[d].max() + 1;
5287 offset = 2*domain[d].max() + 1 - 1;
5291 slab[d] =
Index( domain[d].
min() - A.leftGuard(d), domain[d].min()-1 );
5294 if (CE[ff.getComponent() + d*NC] ==
CELL) {
5295 offset = 2*domain[d].min() - 1;
5297 offset = 2*domain[d].min() - 1 + 1;
5308 if ( slab.
touches( fill_alloc ) )
5315 src[d] = offset - src[d];
5326 if ( src.
touches( from_owned ) )
5346 LFI lhs = fill.
begin(fill_it);
5347 LFI rhs = from.
begin(from_it);
5351 (ff.Func,ff.getComponent())).apply();
5376template<
class T,
unsigned int D,
class M,
class C>
5384 fillSlabWithZero(field,slab,this->getComponent());
5409 ERRORMSG(
"Eureka assign to a component of class without an op[]!"<<
endl);
5413 ERRORMSG(
"Eureka assign to a component of class without an op[]!"<<
endl);
5428template<
class T,
unsigned int D,
class M,
class C>
5439 for (; lp != done ; ++lp )
5448 if ( fillDomain.
touches(localDomain) )
5457 if ( *lf.
begin() == 0 )
5493 Expr_t(data,Rhs_t(0)).apply();
5505 Expr_t(data,Rhs_t(0),component).apply();
5517template<
class T,
unsigned int D>
5526template<
class T,
unsigned int D>
5535template<
class T,
unsigned int D>
5544template<
class T,
unsigned int D>
5573template<
unsigned int D>
5591 high = slab[dim].max();
5592 low = high - gc.
right(dim);
5598 low = slab[dim].min();
5599 high = low + gc.
left(dim);
5608 slab[dim] =
Index(low,high);
5620template<
class T,
unsigned int D,
class M>
5627template<
class T,
unsigned int D,
class M>
5634template<
class T,
unsigned int D,
class M>
5653template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
5689 if (CE[component + d*NC] ==
CELL)
5698 slab[d] =
Index(low,high);
5704 int low = slab[d].min();
5708 if (CE[component + d*NC] ==
CELL)
5717 slab[d] =
Index(low,high);
5743template<
class T,
unsigned D,
class M,
class C>
5747template<
class T,
unsigned D,
class M,
class C>
5754template<
class T,
unsigned D,
class M,
class C>
5761 int slopeMultipplier)
5772 LFI lhs = fill.
begin(dest);
5773 LFI rhs1 = fill.
begin(src1);
5774 LFI rhs2 = fill.
begin(src2);
5775 LFI endi = fill.
end();
5780 for ( ; lhs != endi && rhs1 != endi && rhs2 != endi;
5781 ++lhs, ++rhs1, ++rhs2) {
5782 *lhs = (*rhs2 - *rhs1)*slopeMultipplier + *rhs1;
5794template<
class T,
unsigned D,
class M,
class C>
5840 for (
int guardLayer = 1; guardLayer <= nGuardLayers; guardLayer++) {
5844 int slopeMultipplier = -1*guardLayer;
5847 slab[d] =
Index(domain[d].
max() + guardLayer,
5848 domain[d].
max() + guardLayer);
5850 slab[d] =
Index(domain[d].
min() - guardLayer,
5851 domain[d].
min() - guardLayer);
5872 if (slab.
touches(fill_alloc)) {
5887 src2[d] =
Index(domain[d].
max() - 1, domain[d].
max() - 1, 1);
5888 src1[d] =
Index(domain[d].
max(), domain[d].
max(), 1);
5890 src1[d] =
Index(0,0,1);
5891 src2[d] =
Index(1,1,1);
5924template<
class T,
unsigned D,
class M,
class C>
5929template<
class T,
unsigned D,
class M,
class C>
5936template<
class T,
unsigned D,
class M,
class C>
5944 int slopeMultipplier)
5955 LFI lhs = fill.
begin(dest);
5956 LFI rhs1 = fill.
begin(src1);
5957 LFI rhs2 = fill.
begin(src2);
5958 LFI endi = fill.
end();
5964 int component = ef.getComponent();
5965 for ( ; lhs != endi, rhs1 != endi, rhs2 != endi;
5966 ++lhs, ++rhs1, ++rhs2) {
5968 ((*rhs2)[component] - (*rhs1)[component])*slopeMultipplier +
5981template<
class T,
unsigned D,
class M,
class C>
5998 unsigned d = ef.getFace()/2;
6008 if (ef.getFace() & 1) {
6026 for (
int guardLayer = 1; guardLayer <= nGuardLayers; guardLayer++) {
6030 int slopeMultipplier = -1*guardLayer;
6032 if (ef.getFace() & 1) {
6033 slab[d] =
Index(domain[d].
max() + guardLayer,
6034 domain[d].
max() + guardLayer);
6036 slab[d] =
Index(domain[d].
min() - guardLayer,
6037 domain[d].
min() - guardLayer);
6058 if (slab.
touches(fill_alloc)) {
6072 if (ef.getFace() & 1) {
6073 src2[d] =
Index(domain[d].
max() - 1, domain[d].
max() - 1, 1);
6074 src1[d] =
Index(domain[d].
max(), domain[d].
max(), 1);
6076 src1[d] =
Index(0,0,1);
6077 src2[d] =
Index(1,1,1);
6095template<
class T,
unsigned D,
class M,
class C>
6111template<
class T,
unsigned D,
class M,
class C>
6136 unsigned d = this->getFace()/2;
6143 if ( this->getFace() & 1 )
6154 for (fill_i=A.
begin_if(); fill_i!=A.
end_if(); ++fill_i, ++lfindex)
6168 if ( slab.
touches( fill_alloc ) )
6182 for (
int i=0; i<D; ++i)
6183 v[i] = dest[i].first();
6196#undef COMPONENT_APPLY_BUILTIN
Field< double, 3, Mesh_t, Center_t > Field_t
ParticleSpatialLayout< double, 3, Mesh_t > Layout_t
PartBunchBase< T, Dim >::ConstIterator end(PartBunchBase< T, Dim > const &bunch)
PartBunchBase< T, Dim >::ConstIterator begin(PartBunchBase< T, Dim > const &bunch)
T * value_type(const SliceIterator< T > &)
#define BC_PARALLEL_PERIODIC_TAG
T::PETE_Expr_t::PETE_Return_t max(const PETE_Expr< T > &expr, NDIndex< D > &loc)
T::PETE_Expr_t::PETE_Return_t min(const PETE_Expr< T > &expr, NDIndex< D > &loc)
scalar_tag get_tag(std::complex< double >)
TensorOrder_e getTensorOrder(const scalar_tag &)
NDIndex< Dim > AddGuardCells(const NDIndex< Dim > &idx, const GuardCellSizes< Dim > &g)
void LinearExtrapolateFaceBCApply(LinearExtrapolateFace< T, D, M, C > &ef, Field< T, D, M, C > &A)
void FunctionFaceBCApply(FunctionFace< T, D, M, Cell > &ff, Field< T, D, M, Cell > &A)
void ExtrapolateAndZeroFaceBCApply2(const NDIndex< D > &dest, const NDIndex< D > &src, LField< T, D > &fill, LField< T, D > &from, const NDIndex< D > &from_alloc, ExtrapolateAndZeroFace< T, D, M, C > &ef)
void ComponentLinearExtrapolateFaceBCApply(ComponentLinearExtrapolateFace< T, D, M, C > &ef, Field< T, D, M, C > &A)
void ComponentFunctionFaceBCApply(ComponentFunctionFace< T, D, M, Cell > &ff, Field< T, D, M, Cell > &A)
void ExtrapolateFaceBCApply(ExtrapolateFace< T, D, M, Cell > &ef, Field< T, D, M, Cell > &A)
void CalcParallelInterpolationDomain(const Field< T, D, M, Cell > &A, const ParallelInterpolationFace< T, D, M, Cell > &pf, NDIndex< D > &src_slab, int &offset)
NDIndex< D > calcEurekaDomain(const NDIndex< D > &realDomain, int face, const GuardCellSizes< D > &gc)
void ExtrapolateAndZeroFaceBCApply3(const NDIndex< D > &dest, LField< T, D > &fill, ExtrapolateAndZeroFace< T, D, M, C > &ef)
void ComponentLinearExtrapolateFaceBCApply2(const NDIndex< D > &dest, const NDIndex< D > &src1, const NDIndex< D > &src2, LField< T, D > &fill, ComponentLinearExtrapolateFace< T, D, M, C > &ef, int slopeMultipplier)
void ExtrapolateFaceBCApply2(const NDIndex< D > &dest, const NDIndex< D > &src, LField< T, D > &fill, LField< T, D > &from, const NDIndex< D > &from_alloc, ExtrapolateFace< T, D, M, C > &ef)
void CalcParallelPeriodicDomain(const Field< T, D, M, Cell > &A, const ParallelPeriodicFace< T, D, M, Cell > &pf, NDIndex< D > &dest_slab, int &offset)
void ExtrapolateAndZeroFaceBCApply(ExtrapolateAndZeroFace< T, D, M, Cell > &ef, Field< T, D, M, Cell > &A)
#define COMPONENT_APPLY_BUILTIN(OP, T)
void PeriodicFaceBCApply(PeriodicFace< T, D, M, Cell > &pf, Field< T, D, M, Cell > &A)
void LinearExtrapolateFaceBCApply2(const NDIndex< D > &dest, const NDIndex< D > &src1, const NDIndex< D > &src2, LField< T, D > &fill, LinearExtrapolateFace< T, D, M, C > &, int slopeMultipplier)
void InterpolationFaceBCApply(InterpolationFace< T, D, M, Cell > &pf, Field< T, D, M, Cell > &A)
void PETE_apply(const OpPeriodic< T > &, T &a, const T &b)
Inform & endl(Inform &inf)
MMatrix< m_complex > complex(MMatrix< double > real)
Expression Expr_t
type of an expression
constexpr double e
The value of.
constexpr double c
The velocity of light in m/s.
std::string::iterator iterator
Interface for a single beam element.
Mesh_t & get_mesh() const
bool touches(const NDIndex< Dim > &) const
NDIndex< Dim > plugBase(const NDIndex< D > &i) const
bool contains(const NDIndex< Dim > &a) const
NDIndex< Dim > intersect(const NDIndex< Dim > &) const
unsigned rightGuard(unsigned d) const
const GuardCellSizes< Dim > & getGC() const
const NDIndex< Dim > & getDomain() const
ac_id_larray::iterator iterator_if
Layout_t & getLayout() const
const GuardCellSizes< Dim > & getGuardCellSizes() const
unsigned leftGuard(unsigned d) const
const NDIndex< Dim > & getOwned() const
const NDIndex< Dim > & getAllocated() const
bool IsCompressed() const
const iterator & end() const
void Uncompress(bool fill_domain=true)
const iterator & begin() const
void SetCurrentLocation(const FieldLoc< Dim > &loc)
BCondBase(unsigned int face, int i=allComponents, int j=allComponents)
unsigned int getFace() const
virtual void write(std::ostream &) const
vmap< int, RefCountedP< BCondBase< T, D, M, C > > >::const_iterator const_iterator
bool changesPhysicalCells() const
void apply(Field< T, D, M, C > &a)
virtual void write(std::ostream &) const
PeriodicFace(unsigned f, int i=BCondBaseTDMC::allComponents, int j=BCondBaseTDMC::allComponents)
virtual void write(std::ostream &out) const
virtual void apply(Field< T, D, M, C > &)
virtual void write(std::ostream &out) const
InterpolationFace(unsigned f, int i=BCondBaseTDMC::allComponents, int j=BCondBaseTDMC::allComponents)
virtual void apply(Field< T, D, M, C > &)
virtual void write(std::ostream &out) const
virtual void apply(Field< T, D, M, C > &)
virtual void write(std::ostream &out) const
ExtrapolateFace(unsigned f, T o, T s, int i=BCondBaseTDMC::allComponents, int j=BCondBaseTDMC::allComponents)
const T & getOffset() const
virtual void write(std::ostream &) const
const T & getSlope() const
const T & getSlope() const
virtual void write(std::ostream &) const
const T & getOffset() const
ExtrapolateAndZeroFace(unsigned f, T o, T s, int i=BCondBaseTDMC::allComponents, int j=BCondBaseTDMC::allComponents)
virtual void write(std::ostream &out) const
virtual void write(std::ostream &out) const
virtual void write(std::ostream &out) const
virtual void write(std::ostream &out) const
virtual void write(std::ostream &out) const
virtual void write(std::ostream &out) const
FunctionFace(T(*func)(const T &), unsigned face)
virtual void write(std::ostream &out) const
void apply(Field< T, D, M, C > &)
virtual void write(std::ostream &out) const
ApplyToComponentType< T >::type(* Func)(typename ApplyToComponentType< T >::type)
ComponentFunctionFace(typename ApplyToComponentType< T >::type(*func)(typename ApplyToComponentType< T >::type), unsigned face, int i=BCondBaseTDMC::allComponents, int j=BCondBaseTDMC::allComponents)
virtual void write(std::ostream &out) const
virtual void apply(Field< T, D, M, C > &)
virtual void apply(Field< T, D, M, C > &A)
virtual void write(std::ostream &) const
virtual void write(std::ostream &) const
virtual void apply(Field< T, D, M, C > &A)
void apply(Field< T, D, M, C > &)
OpPeriodicComponent(int c)
OpInterpolationComponent(int c)
OpExtrapolate(const T &o, const T &s)
OpExtrapolateComponent(const T &o, const T &s, int c)
OpExtrapolateAndZero(const T &o, const T &s)
OpExtrapolateAndZeroComponent(const T &o, const T &s, int c)
OpBCFunctionEq(T(*func)(const T &))
ApplyToComponentType< T >::type(* Func)(typename ApplyToComponentType< T >::type)
OpBCFunctionEqComponent(typename ApplyToComponentType< T >::type(*func)(typename ApplyToComponentType< T >::type), int c)
static const T & get(const T &x, int)
static T & get(T &x, int)
static T & get(Vektor< T, D > &x, int c)
static T get(const Vektor< T, D > &x, int c)
static T get(const Tenzor< T, D > &x, int c)
static T & get(Tenzor< T, D > &x, int c)
static T get(const AntiSymTenzor< T, D > &x, int c)
static T & get(AntiSymTenzor< T, D > &x, int c)
static T & get(SymTenzor< T, D > &x, int c)
static T get(const SymTenzor< T, D > &x, int c)
unsigned left(unsigned d) const
unsigned right(unsigned d) const
bool send(Message *, int node, int tag, bool delmsg=true)
Message * receive_block(int &node, int &tag)
int next_tag(int t, int s=1000)
static Communicate * Comm