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>
241 o <<
"BConds:(" << std::endl;
243 while (p!=this->
end())
245 (*p).second->write(o);
248 o <<
" , " << std::endl;
250 o << std::endl <<
")" << std::endl << std::endl;
256template<
class T,
unsigned D,
class M,
class C>
262 for (iterator p=this->
begin(); p!=this->
end(); ++p)
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)
330 :
BCondBase<T,D,M,C>(face,i,j), Func(func)
336 ERRORMSG(
"ComponentFunctionFace(): allComponents specified; not allowed; "
337 <<
"use FunctionFace class instead." <<
endl);
367 const unsigned c = e.Component;
428{
a[e.Component] =
a[e.Component]+b[e.Component]; }
460template<class T,
unsigned D, class M>
464template<class T,
unsigned D, class M>
468template<class T,
unsigned D, class M>
471template<class T,
unsigned D, class M>
474template<class T,
unsigned D, class M,
CenteringEnum* CE,
unsigned NC>
479template<class T,
unsigned D, class M, class C>
488template<
class T,
unsigned D,
class M,
class C>
500template<
class T,
unsigned D,
class M>
522 offset = -domain[d].length();
527 offset = domain[d].length();
537 if ( slab.
touches( fill_alloc ) )
544 src[d] = src[d] + offset;
555 if ( src.
touches( from_owned ) )
575 LFI lhs = fill.
begin(fill_it);
576 LFI rhs = from.
begin(from_it);
597template<
class T,
unsigned D,
class M>
614 offset = -domain[d].length();
619 offset = domain[d].length();
629 if ( slab.
touches( fill_alloc ) )
637 dest[d] = dest[d] + offset;
651 if ( dest.
touches( from_owned ) )
671 LFI lhs = fill.
begin(fill_it);
672 LFI rhs = from.
begin(from_it);
693template<
class T,
unsigned D,
class M>
714 offset = -domain[d].length() + 1;
721 offset = domain[d].length() - 1;
731 if ( slab.
touches( fill_alloc ) )
738 src[d] = src[d] + offset;
749 if ( src.
touches( from_owned ) )
769 LFI lhs = fill.
begin(fill_it);
770 LFI rhs = from.
begin(from_it);
791template<
class T,
unsigned D,
class M>
809 offset = -domain[d].length() + 1;
816 offset = domain[d].length() - 1;
826 if ( slab.
touches( fill_alloc ) )
833 src[d] = src[d] + offset;
844 if ( src.
touches( from_owned ) )
864 LFI lhs = fill.
begin(fill_it);
865 LFI rhs = from.
begin(from_it);
885template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
899 unsigned d = pf.getFace()/2;
901 if ( pf.getFace() & 1 )
909 for (
unsigned int c=1; c<NC; c++) {
910 if (CE[c + d*NC] != centering0)
911 ERRORMSG(
"PeriodicFaceBCApply: BCond thinks all components have"
912 <<
" same centering along direction " << d
913 <<
", but it isn't so." <<
endl);
916 if (centering0 ==
CELL) {
917 offset = -domain[d].length();
921 Index( domain[d].
max(), domain[d].
max() + A.rightGuard(d));
922 offset = -domain[d].length()+1;
926 if (CE[pf.getComponent() + d*NC] ==
CELL) {
927 offset = -domain[d].length();
930 Index( domain[d].
max(), domain[d].
max() + A.rightGuard(d));
931 offset = -domain[d].length()+1;
937 slab[d] =
Index( domain[d].
min() - A.leftGuard(d), domain[d].min()-1 );
944 for (
unsigned int c=1; c<NC; c++) {
945 if (CE[c + d*NC] != centering0)
946 ERRORMSG(
"PeriodicFaceBCApply: BCond thinks all components have"
947 <<
" same centering along direction " << d
948 <<
", but it isn't so." <<
endl);
951 if (centering0 ==
CELL) {
952 offset = -domain[d].length();
954 offset = -domain[d].length() + 1;
958 if (CE[pf.getComponent() + d*NC] ==
CELL) {
959 offset = domain[d].length();
961 offset = domain[d].length() - 1;
973 if ( slab.
touches( fill_alloc ) )
980 src[d] = src[d] + offset;
991 if ( src.
touches( from_owned ) )
1011 LFI lhs = fill.
begin(fill_it);
1012 LFI rhs = from.
begin(from_it);
1015 if (pf.getComponent() ==
BCondBase<T,D,M,
1037# include <iterator.h>
1040template <
class T,
unsigned D,
class M>
1068 offset = -domain[d].length();
1081 offset = domain[d].length();
1088template <
class T,
unsigned D,
class M>
1117 offset = -domain[d].length() + 1;
1130 offset = domain[d].length() - 1;
1136template <
class T,
unsigned D,
class M>
1165 offset = -domain[d].length() + 1;
1178 offset = domain[d].length() - 1;
1184template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
1199 unsigned d = pf.getFace()/2;
1201 if (pf.getFace() & 1)
1209 if (pf.getComponent() == BCBase_t::allComponents)
1216 for (
unsigned int c = 1; c < NC; c++)
1219 if (CE[c + d*NC] != centering0)
1220 ERRORMSG(
"ParallelPeriodicFaceBCApply:"
1221 <<
"BCond thinks all components have"
1222 <<
" same centering along direction " << d
1223 <<
", but it isn't so." <<
endl);
1229 if (centering0 ==
CELL) {
1230 offset = -domain[d].length();
1233 Index(domain[d].
max(), domain[d].
max() + A.leftGuard(d));
1234 offset = -domain[d].length() + 1;
1243 if (CE[pf.getComponent() + d*NC] ==
CELL)
1245 offset = -domain[d].length();
1250 Index(domain[d].
max(), domain[d].
max() + A.leftGuard(d));
1251 offset = -domain[d].length() + 1;
1262 Index(domain[d].
min() - A.leftGuard(d), domain[d].min()-1);
1266 if (pf.getComponent() == BCBase_t::allComponents)
1273 for (
unsigned int c = 1; c < NC; c++)
1275 if (CE[c + d*NC] != centering0)
1276 ERRORMSG(
"ParallelPeriodicFaceBCApply:"
1277 <<
"BCond thinks all components have"
1278 <<
" same centering along direction " << d
1279 <<
", but it isn't so." <<
endl);
1285 if (centering0 ==
CELL) {
1286 offset = -domain[d].length();
1288 offset = -domain[d].length() + 1;
1297 if (CE[pf.getComponent() + d*NC] ==
CELL)
1299 offset = domain[d].length();
1303 offset = domain[d].length() - 1;
1319template<
class T,
unsigned D,
class M,
class C>
1330 typedef T Element_t;
1333 typedef typename LField_t::iterator LFI_t;
1380 unsigned d = this->getFace()/2;
1386 Domain_t src_slab = dest_slab;
1387 src_slab[d] = src_slab[d] + offset;
1390 msg <<
"dest_slab = " << dest_slab <<
endl;
1391 msg <<
"src_slab = " << src_slab <<
endl;
1409 typedef std::multimap<Domain_t,LField_t*, std::less<Domain_t> > ReceiveMap_t;
1415 ReceiveMap_t receive_map;
1421 int receive_count = 0;
1443 typedef std::vector<LField_t*> DestList_t;
1444 typedef std::vector<LField_t*> SrcList_t;
1445 typedef typename DestList_t::iterator DestListIterator_t;
1446 typedef typename SrcList_t::iterator SrcListIterator_t;
1448 DestList_t dest_list;
1451 dest_list.reserve(1);
1452 src_list.reserve(1);
1457 msg <<
"Starting dest & src domain calculation." <<
endl;
1462 LField_t &lf = *lf_i->second;
1467 const Domain_t &lf_allocated = lf.getAllocated();
1470 msg <<
" Processing subdomain : " << lf_allocated <<
endl;
1474 if (lf_allocated.touches(dest_slab))
1475 dest_list.push_back(&lf);
1481 const Domain_t &lf_owned = lf.getOwned();
1483 if (lf_owned.touches(src_slab))
1484 src_list.push_back(&lf);
1488 msg <<
" dest_list has " << dest_list.size() <<
" elements." <<
endl;
1489 msg <<
" src_list has " << src_list.size() <<
" elements." <<
endl;
1492 DestListIterator_t dest_begin = dest_list.begin();
1493 DestListIterator_t dest_end = dest_list.end();
1494 SrcListIterator_t src_begin = src_list.begin();
1495 SrcListIterator_t src_end = src_list.end();
1509 msg <<
"Starting receive calculation." <<
endl;
1519 std::vector<bool> receive_mask(nprocs,
false);
1521 DestListIterator_t dest_i;
1523 for (dest_i = dest_begin; dest_i != dest_end; ++dest_i)
1527 LField_t &dest_lf = **dest_i;
1529 const Domain_t &dest_lf_alloc = dest_lf.getAllocated();
1535 const Domain_t dest_domain = dest_lf_alloc.intersect(dest_slab);
1537 Domain_t src_domain = dest_domain;
1538 src_domain[d] = src_domain[d] + offset;
1551 typename Layout_t::touch_range_dv
1552 src_range(layout.touch_range_rdv(src_domain));
1559 typename Layout_t::touch_iterator_dv rv_i;
1561 for (rv_i = src_range.first; rv_i != src_range.second; ++rv_i)
1570 Domain_t hit = src_domain.intersect(rv_alloc);
1571 hit[d] = hit[d] - offset;
1575 typedef typename ReceiveMap_t::value_type
value_type;
1577 receive_map.insert(
value_type(hit,&dest_lf));
1580 msg <<
" Need remote data for domain: " << hit <<
endl;
1585 int rnode = rv_i->second->getNode();
1587 receive_mask[rnode] =
true;
1594 for (
int iproc = 0; iproc < nprocs; ++iproc)
1595 if (receive_mask[iproc]) ++receive_count;
1599 msg <<
" Expecting to see " << receive_count <<
" messages." <<
endl;
1600 msg <<
"Done with receive calculation." <<
endl;
1610 msg <<
"Starting send calculation" <<
endl;
1619 std::vector<Message *> messages(nprocs);
1620 for (
int miter=0; miter < nprocs; messages[miter++] = 0);
1628 std::vector<int> ndomains(nprocs);
1629 for(
int i = 0; i < nprocs; ++i) ndomains[i] = 0;
1632 SrcListIterator_t src_i;
1634 for (src_i = src_begin; src_i != src_end; ++src_i)
1638 LField_t &src_lf = **src_i;
1646 const Domain_t &src_lf_owned = src_lf.getOwned();
1647 const Domain_t &src_lf_alloc = src_lf.getAllocated();
1653 const Domain_t src_owned = src_lf_owned.intersect(src_slab);
1654 const Domain_t src_alloc = src_lf_alloc.intersect(src_slab);
1656 Domain_t dest_owned = src_owned;
1657 dest_owned[d] = dest_owned[d] - offset;
1659 Domain_t dest_alloc = src_alloc;
1660 dest_alloc[d] = dest_alloc[d] - offset;
1663 msg <<
" Considering LField with the domains:" <<
endl;
1664 msg <<
" owned = " << src_lf_owned <<
endl;
1665 msg <<
" alloc = " << src_lf_alloc <<
endl;
1666 msg <<
" The intersections with src_slab are:" <<
endl;
1667 msg <<
" owned = " << src_owned <<
endl;
1668 msg <<
" alloc = " << src_alloc <<
endl;
1674 typename Layout_t::touch_range_dv
1675 dest_range(layout.touch_range_rdv(dest_owned,gc));
1677 typename Layout_t::touch_iterator_dv rv_i;
1686 for (rv_i = dest_range.first; rv_i != dest_range.second; ++rv_i)
1692 Domain_t hit = dest_alloc.intersect(rv_i->first);
1693 hit[d] = hit[d] + offset;
1697 int rnode = rv_i->second->getNode();
1700 msg <<
" Overlap domain = " << rv_i->first <<
endl;
1701 msg <<
" Inters. domain = " << hit;
1702 msg <<
" --> node " << rnode <<
endl;
1711 Element_t compressed_value;
1712 LFI_t msgval = src_lf.begin(hit, compressed_value);
1713 msgval.TryCompress();
1717 if (!messages[rnode])
1719 messages[rnode] =
new Message;
1723 messages[rnode]->put(hit);
1724 messages[rnode]->put(msgval);
1741 for (
int iproc = 0; iproc < nprocs; ++iproc)
1743 if (messages[iproc])
1747 msg <<
" ParallelPeriodicBCApply: Sending message to node "
1749 <<
" number of domains = " << ndomains[iproc] <<
endl
1750 <<
" number of MsgItems = "
1751 << messages[iproc]->size() <<
endl;
1764 msg <<
" Sent " << send_count <<
" messages" <<
endl;
1765 msg <<
"Done with send." <<
endl;
1782 msg <<
"Starting local calculation." <<
endl;
1785 DestListIterator_t dest_i;
1787 for (dest_i = dest_begin; dest_i != dest_end; ++dest_i)
1791 LField_t &dest_lf = **dest_i;
1793 const Domain_t &dest_lf_alloc = dest_lf.getAllocated();
1795 const Domain_t dest_domain = dest_lf_alloc.intersect(dest_slab);
1797 Domain_t src_domain = dest_domain;
1798 src_domain[d] = src_domain[d] + offset;
1800 SrcListIterator_t src_i;
1802 for (src_i = src_begin; src_i != src_end; ++src_i)
1806 LField_t &src_lf = **src_i;
1812 const Domain_t &src_lf_owned = src_lf.getOwned();
1813 const Domain_t &src_lf_alloc = src_lf.getAllocated();
1818 if (src_domain.touches(src_lf_owned))
1824 dest_lf.Uncompress();
1828 Domain_t real_src_domain =
1829 src_domain.intersect(src_lf_alloc);
1831 Domain_t real_dest_domain = real_src_domain;
1832 real_dest_domain[d] = real_dest_domain[d] - offset;
1835 msg <<
" Copying local data . . ." <<
endl;
1836 msg <<
" source domain = " << real_src_domain <<
endl;
1837 msg <<
" dest domain = " << real_dest_domain <<
endl;
1842 LFI_t lhs = dest_lf.begin(real_dest_domain);
1843 LFI_t rhs = src_lf.begin(real_src_domain);
1862 msg <<
"Done with local calculation." <<
endl;
1878 msg <<
"Starting receive..." <<
endl;
1882 while (receive_count > 0)
1901 int ndomains = message->
size() / (D + 3);
1904 msg <<
" Message received from node "
1905 << any_node <<
"," <<
endl
1906 <<
" number of domains = " << ndomains <<
endl;
1909 for (
int idomain=0; idomain < ndomains; ++idomain)
1914 Domain_t intersection;
1915 intersection.getMessage(*message);
1916 intersection[d] = intersection[d] - offset;
1920 Element_t compressed_value;
1921 LFI_t rhs(compressed_value);
1922 rhs.getMessage(*message);
1925 msg <<
" Received remote overlap region = "
1926 << intersection <<
endl;
1931 typename ReceiveMap_t::iterator hit =
1932 receive_map.find(intersection);
1934 PAssert(hit != receive_map.end());
1948 msg <<
", LHS value = " << *lf.
begin() <<
endl;
1949 msg <<
" RHS compressed ? " << rhs.IsCompressed();
1950 msg <<
", RHS value = " << *rhs <<
endl;
1951 msg <<
" *rhs == *lf.begin() ? "
1955 (*rhs == *lf.
begin())))
1960 LFI_t lhs = lf.
begin(intersection);
1965 msg <<
" Doing copy." <<
endl;
1973 receive_map.erase(hit);
1981 msg <<
"Done with receive." <<
endl;
1991template <
class T,
unsigned D,
class M>
2019 offset = -domain[d].length();
2032 offset = domain[d].length();
2040template<
class T,
unsigned D,
class M,
class C>
2051 typedef T Element_t;
2054 typedef typename LField_t::iterator LFI_t;
2101 unsigned d = this->getFace()/2;
2107 Domain_t dest_slab = src_slab;
2108 dest_slab[d] = dest_slab[d] + offset;
2111 msg <<
"dest_slab = " << dest_slab <<
endl;
2112 msg <<
"src_slab = " << src_slab <<
endl;
2130 typedef std::multimap<Domain_t,LField_t*, std::less<Domain_t> > ReceiveMap_t;
2136 ReceiveMap_t receive_map;
2142 int receive_count = 0;
2164 typedef std::vector<LField_t*> DestList_t;
2165 typedef std::vector<LField_t*> SrcList_t;
2166 typedef typename DestList_t::iterator DestListIterator_t;
2167 typedef typename SrcList_t::iterator SrcListIterator_t;
2169 DestList_t dest_list;
2172 dest_list.reserve(1);
2173 src_list.reserve(1);
2178 msg <<
"Starting dest & src domain calculation." <<
endl;
2183 LField_t &lf = *lf_i->second;
2189 const Domain_t &lf_owned = lf.getOwned();
2192 msg <<
" Processing subdomain : " << lf_owned <<
endl;
2196 if (lf_owned.touches(dest_slab))
2197 dest_list.push_back(&lf);
2203 const Domain_t &lf_allocated = lf.getAllocated();
2205 if (lf_allocated.touches(src_slab))
2206 src_list.push_back(&lf);
2210 msg <<
" dest_list has " << dest_list.size() <<
" elements." <<
endl;
2211 msg <<
" src_list has " << src_list.size() <<
" elements." <<
endl;
2214 DestListIterator_t dest_begin = dest_list.begin();
2215 DestListIterator_t dest_end = dest_list.end();
2216 SrcListIterator_t src_begin = src_list.begin();
2217 SrcListIterator_t src_end = src_list.end();
2231 msg <<
"Starting receive calculation." <<
endl;
2241 std::vector<bool> receive_mask(nprocs,
false);
2243 DestListIterator_t dest_i;
2245 for (dest_i = dest_begin; dest_i != dest_end; ++dest_i)
2249 LField_t &dest_lf = **dest_i;
2251 const Domain_t &dest_lf_alloc = dest_lf.getAllocated();
2257 const Domain_t dest_domain = dest_lf_alloc.intersect(dest_slab);
2259 Domain_t src_domain = dest_domain;
2262 src_domain[d] = src_domain[d] - offset;
2276 typename Layout_t::touch_range_dv
2277 src_range(layout.touch_range_rdv(src_domain,gc));
2284 typename Layout_t::touch_iterator_dv rv_i;
2286 for (rv_i = src_range.first; rv_i != src_range.second; ++rv_i)
2294 const Domain_t rv_alloc = rv_i->first;
2296 Domain_t hit = src_domain.intersect(rv_alloc);
2298 hit[d] = hit[d] + offset;
2302 typedef typename ReceiveMap_t::value_type
value_type;
2304 receive_map.insert(
value_type(hit,&dest_lf));
2307 msg <<
" Need remote data for domain: " << hit <<
endl;
2312 int rnode = rv_i->second->getNode();
2314 receive_mask[rnode] =
true;
2321 for (
int iproc = 0; iproc < nprocs; ++iproc)
2322 if (receive_mask[iproc]) ++receive_count;
2326 msg <<
" Expecting to see " << receive_count <<
" messages." <<
endl;
2327 msg <<
"Done with receive calculation." <<
endl;
2337 msg <<
"Starting send calculation" <<
endl;
2346 std::vector<Message *> messages(nprocs);
2347 for (
int miter=0; miter < nprocs; messages[miter++] = 0);
2355 std::vector<int> ndomains(nprocs);
2356 for(
int i = 0; i < nprocs; ++i) ndomains[i] = 0;
2359 SrcListIterator_t src_i;
2361 for (src_i = src_begin; src_i != src_end; ++src_i)
2365 LField_t &src_lf = **src_i;
2373 const Domain_t &src_lf_owned = src_lf.getOwned();
2374 const Domain_t &src_lf_alloc = src_lf.getAllocated();
2380 const Domain_t src_owned = src_lf_owned.intersect(src_slab);
2381 const Domain_t src_alloc = src_lf_alloc.intersect(src_slab);
2383 Domain_t dest_owned = src_owned;
2384 dest_owned[d] = dest_owned[d] + offset;
2386 Domain_t dest_alloc = src_alloc;
2387 dest_alloc[d] = dest_alloc[d] + offset;
2390 msg <<
" Considering LField with the domains:" <<
endl;
2391 msg <<
" owned = " << src_lf_owned <<
endl;
2392 msg <<
" alloc = " << src_lf_alloc <<
endl;
2393 msg <<
" The intersections with src_slab are:" <<
endl;
2394 msg <<
" owned = " << src_owned <<
endl;
2395 msg <<
" alloc = " << src_alloc <<
endl;
2401 typename Layout_t::touch_range_dv
2402 dest_range(layout.touch_range_rdv(dest_owned,gc));
2404 typename Layout_t::touch_iterator_dv rv_i;
2413 for (rv_i = dest_range.first; rv_i != dest_range.second; ++rv_i)
2419 Domain_t hit = dest_alloc.intersect(rv_i->first);
2420 hit[d] = hit[d] - offset;
2424 int rnode = rv_i->second->getNode();
2427 msg <<
" Overlap domain = " << rv_i->first <<
endl;
2428 msg <<
" Inters. domain = " << hit;
2429 msg <<
" --> node " << rnode <<
endl;
2438 Element_t compressed_value;
2439 LFI_t msgval = src_lf.begin(hit, compressed_value);
2440 msgval.TryCompress();
2444 if (!messages[rnode])
2446 messages[rnode] =
new Message;
2450 messages[rnode]->put(hit);
2451 messages[rnode]->put(msgval);
2468 for (
int iproc = 0; iproc < nprocs; ++iproc)
2470 if (messages[iproc])
2474 msg <<
" ParallelPeriodicBCApply: Sending message to node "
2476 <<
" number of domains = " << ndomains[iproc] <<
endl
2477 <<
" number of MsgItems = "
2478 << messages[iproc]->size() <<
endl;
2490 msg <<
" Sent " << send_count <<
" messages" <<
endl;
2491 msg <<
"Done with send." <<
endl;
2508 msg <<
"Starting local calculation." <<
endl;
2511 DestListIterator_t dest_i;
2513 for (dest_i = dest_begin; dest_i != dest_end; ++dest_i)
2517 LField_t &dest_lf = **dest_i;
2519 const Domain_t &dest_lf_alloc = dest_lf.getAllocated();
2522 const Domain_t dest_domain = dest_lf_alloc.intersect(dest_slab);
2524 Domain_t src_domain = dest_domain;
2527 src_domain[d] = src_domain[d] - offset;
2529 SrcListIterator_t src_i;
2531 for (src_i = src_begin; src_i != src_end; ++src_i)
2535 LField_t &src_lf = **src_i;
2542 const Domain_t &src_lf_alloc = src_lf.getAllocated();
2547 if (src_domain.touches(src_lf_alloc))
2553 dest_lf.Uncompress();
2557 Domain_t real_src_domain =
2558 src_domain.intersect(src_lf_alloc);
2560 Domain_t real_dest_domain = real_src_domain;
2562 real_dest_domain[d] = real_dest_domain[d] + offset;
2565 msg <<
" Copying local data . . ." <<
endl;
2566 msg <<
" source domain = " << real_src_domain <<
endl;
2567 msg <<
" dest domain = " << real_dest_domain <<
endl;
2572 LFI_t lhs = dest_lf.begin(real_dest_domain);
2573 LFI_t rhs = src_lf.begin(real_src_domain);
2592 msg <<
"Done with local calculation." <<
endl;
2608 msg <<
"Starting receive..." <<
endl;
2612 while (receive_count > 0)
2631 int ndomains = message->
size() / (D + 3);
2634 msg <<
" Message received from node "
2635 << any_node <<
"," <<
endl
2636 <<
" number of domains = " << ndomains <<
endl;
2639 for (
int idomain=0; idomain < ndomains; ++idomain)
2644 Domain_t intersection;
2645 intersection.getMessage(*message);
2647 intersection[d] = intersection[d] + offset;
2651 Element_t compressed_value;
2652 LFI_t rhs(compressed_value);
2653 rhs.getMessage(*message);
2656 msg <<
" Received remote overlap region = "
2657 << intersection <<
endl;
2662 typename ReceiveMap_t::iterator hit =
2663 receive_map.find(intersection);
2665 PAssert(hit != receive_map.end());
2679 msg <<
", LHS value = " << *lf.
begin() <<
endl;
2680 msg <<
" RHS compressed ? " << rhs.IsCompressed();
2681 msg <<
", RHS value = " << *rhs <<
endl;
2682 msg <<
" *rhs == *lf.begin() ? "
2686 (*rhs == *lf.
begin())))
2691 LFI_t lhs = lf.
begin(intersection);
2696 msg <<
" Doing copy." <<
endl;
2705 receive_map.erase(hit);
2713 msg <<
"Done with receive." <<
endl;
2734{
a = b*e.Slope + e.Offset; }
2749 const unsigned c = e.Component;
2751 a[c] = b[c] * e.Slope[c] + e.Offset[c];
2794template<class T,
unsigned D, class M>
2797template<class T,
unsigned D, class M>
2800template<class T,
unsigned D, class M>
2803template<class T,
unsigned D, class M,
CenteringEnum* CE,
unsigned NC>
2808template<class T,
unsigned D, class M, class C>
2815template<
class T,
unsigned D,
class M,
class C>
2863 LFI lhs = fill.
begin(fill_it);
2864 LFI rhs = from.
begin(from_it);
2887template<
class T,
unsigned D,
class M>
2924 offset = 2*domain[d].max() + 1;
2937 offset = 2*domain[d].min() - 1;
2976 src[d] = offset - src[d];
3019template<
class T,
unsigned D,
class M>
3058 offset = 2*domain[d].max() + 1 - 1;
3072 offset = 2*domain[d].min() - 1 + 1;
3092 if ( slab.
touches( fill_alloc ) )
3109 src[d] = offset - src[d];
3153template<
class T,
unsigned D,
class M>
3189 offset = 2*domain[d].max() + 1 - 1;
3203 offset = 2*domain[d].min() - 1 + 1;
3223 if ( slab.
touches( fill_alloc ) )
3240 src[d] = offset - src[d];
3282template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
3301 unsigned d = ef.getFace()/2;
3309 if ( ef.getFace() & 1 )
3322 for (
unsigned int c=1; c<NC; c++)
3325 if (CE[c + d*NC] != centering0)
3326 ERRORMSG(
"ExtrapolateFaceBCApply: BCond thinks all components"
3327 <<
" have same centering along direction " << d
3328 <<
", but it isn't so." <<
endl);
3337 slab[d] =
Index(domain[d].
max() + 1,
3338 domain[d].
max() + A.rightGuard(d));
3340 if (centering0 ==
CELL)
3342 offset = 2*domain[d].max() + 1 ;
3346 offset = 2*domain[d].max() + 1 - 1;
3353 if (CE[ef.getComponent() + d*NC] ==
CELL)
3358 int highcell = A.get_mesh().gridSizes[d] - 2;
3359 slab[d] =
Index(highcell + 1, highcell + A.rightGuard(d));
3362 offset = 2*highcell + 1 ;
3369 int highvert = A.get_mesh().gridSizes[d] - 1;
3370 slab[d] =
Index(highvert + 1, highvert + A.rightGuard(d));
3373 offset = 2*highvert + 1 - 1;
3383 slab[d] =
Index( domain[d].
min() - A.leftGuard(d), domain[d].min()-1 );
3396 for (
unsigned int c=1; c<NC; c++)
3400 if (CE[c + d*NC] != centering0)
3401 ERRORMSG(
"ExtrapolateFaceBCApply: BCond thinks all components"
3402 <<
" have same centering along direction " << d
3403 <<
", but it isn't so." <<
endl);
3409 if (centering0 ==
CELL)
3411 offset = 2*domain[d].min() - 1;
3415 offset = 2*domain[d].min() - 1 + 1;
3423 if (CE[ef.getComponent() + d*NC] ==
CELL)
3425 offset = 2*domain[d].min() - 1;
3429 offset = 2*domain[d].min() - 1 + 1;
3453 if ( slab.
touches( fill_alloc ) )
3470 src[d] = offset - src[d];
3523{
a = b*e.Slope + e.Offset; }
3538 a[e.Component] = b[e.Component]*e.Slope[e.Component] + e.Offset[e.Component];
3577template<
class T,
class T1>
3607template<class T,
unsigned D, class M>
3610template<class T,
unsigned D, class M>
3613template<class T,
unsigned D, class M>
3616template<class T,
unsigned D, class M,
CenteringEnum* CE,
unsigned NC>
3621template<class T,
unsigned D, class M, class C>
3628template<
class T,
unsigned D,
class M,
class C>
3675 LFI lhs = fill.
begin(fill_it);
3676 LFI rhs = from.
begin(from_it);
3696template<
class T,
unsigned D,
class M,
class C>
3739 LFI lhs = fill.
begin(dest);
3765template<
class T,
unsigned D,
class M>
3802 offset = 2*domain[d].max() + 1;
3815 offset = 2*domain[d].min() - 1;
3854 src[d] = offset - src[d];
3898template<
class T,
unsigned D,
class M>
3934 phys[d] =
Index( domain[d].
max(), domain[d].
max(), 1);
3941 offset = 2*domain[d].max() + 1 - 1;
3953 phys[d] =
Index( domain[d].
min(), domain[d].
min(), 1);
3960 offset = 2*domain[d].min() - 1 + 1;
4001 if ( slab.
touches( fill_alloc ) )
4018 src[d] = offset - src[d];
4062template<
class T,
unsigned D,
class M>
4097 phys[d] =
Index( domain[d].
max(), domain[d].
max(), 1);
4104 offset = 2*domain[d].max() + 1 - 1;
4116 phys[d] =
Index( domain[d].
min(), domain[d].
min(), 1);
4123 offset = 2*domain[d].min() - 1 + 1;
4164 if ( slab.
touches( fill_alloc ) )
4181 src[d] = offset - src[d];
4223template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
4242 unsigned d = ef.getFace()/2;
4244 bool setPhys =
false;
4251 if ( ef.getFace() & 1 )
4264 for (
unsigned int c=1; c<NC; c++)
4267 if (CE[c + d*NC] != centering0)
4269 "ExtrapolateAndZeroFaceBCApply: BCond thinks all components"
4270 <<
" have same centering along direction " << d
4271 <<
", but it isn't so." <<
endl);
4280 slab[d] =
Index(domain[d].
max() + 1,
4281 domain[d].
max() + A.rightGuard(d));
4283 if (centering0 ==
CELL)
4285 offset = 2*domain[d].max() + 1 ;
4289 offset = 2*domain[d].max() + 1 - 1;
4293 phys[d] =
Index( domain[d].
max(), domain[d].
max(), 1);
4301 if (CE[ef.getComponent() + d*NC] ==
CELL)
4306 int highcell = A.get_mesh().gridSizes[d] - 2;
4307 slab[d] =
Index(highcell + 1, highcell + A.rightGuard(d));
4310 offset = 2*highcell + 1 ;
4318 int highvert = A.get_mesh().gridSizes[d] - 1;
4319 slab[d] =
Index(highvert + 1, highvert + A.rightGuard(d));
4323 offset = 2*highvert + 1 - 1;
4327 phys[d] =
Index( highvert, highvert, 1 );
4338 slab[d] =
Index( domain[d].
min() - A.leftGuard(d), domain[d].min()-1 );
4351 for (
unsigned int c=1; c<NC; c++)
4355 if (CE[c + d*NC] != centering0)
4357 "ExtrapolateAndZeroFaceBCApply: BCond thinks all components"
4358 <<
" have same centering along direction " << d
4359 <<
", but it isn't so." <<
endl);
4365 if (centering0 ==
CELL)
4367 offset = 2*domain[d].min() - 1;
4371 offset = 2*domain[d].min() - 1 + 1;
4375 phys[d] =
Index(domain[d].
min(), domain[d].
min(), 1);
4384 if (CE[ef.getComponent() + d*NC] ==
CELL)
4386 offset = 2*domain[d].min() - 1;
4390 offset = 2*domain[d].min() - 1 + 1;
4394 phys[d] =
Index(domain[d].
min(), domain[d].
min(), 1);
4442 if ( slab.
touches( fill_alloc ) )
4459 src[d] = offset - src[d];
4536template<
class T,
unsigned D,
class M>
4539template<
class T,
unsigned D,
class M>
4542template<
class T,
unsigned D,
class M>
4545template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
4550template<
class T,
unsigned D,
class M,
class C>
4562template<
class T,
unsigned D,
class M>
4580 offset = 2*domain[d].max() + 1;
4584 offset = 2*domain[d].min() - 1;
4594 if ( slab.
touches( fill_alloc ) )
4601 src[d] = offset - src[d];
4612 if ( src.
touches( from_owned ) )
4632 LFI lhs = fill.
begin(fill_it);
4633 LFI rhs = from.
begin(from_it);
4647template<
class T,
unsigned D,
class M>
4667 offset = 2*domain[d].max() + 1 - 1;
4673 offset = 2*domain[d].min() - 1 + 1;
4683 if ( slab.
touches( fill_alloc ) )
4690 src[d] = offset - src[d];
4701 if ( src.
touches( from_owned ) )
4721 LFI lhs = fill.
begin(fill_it);
4722 LFI rhs = from.
begin(from_it);
4736template<
class T,
unsigned D,
class M>
4753 offset = 2*domain[d].max() + 1 - 1;
4759 offset = 2*domain[d].min() - 1 + 1;
4769 if ( slab.
touches( fill_alloc ) )
4776 src[d] = offset - src[d];
4787 if ( src.
touches( from_owned ) )
4807 LFI lhs = fill.
begin(fill_it);
4808 LFI rhs = from.
begin(from_it);
4822template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
4836 unsigned d = ff.getFace()/2;
4838 if ( ff.getFace() & 1 ) {
4840 slab[d] =
Index( domain[d].
max() + 1, domain[d].
max() + A.rightGuard(d));
4844 for (
int c=1; c<NC; c++) {
4845 if (CE[c + d*NC] != centering0)
4846 ERRORMSG(
"FunctionFaceBCApply: BCond thinks all components have"
4847 <<
" same centering along direction " << d
4848 <<
", but it isn't so." <<
endl);
4851 if (centering0 ==
CELL) {
4852 offset = 2*domain[d].max() + 1;
4854 offset = 2*domain[d].max() + 1 - 1;
4858 slab[d] =
Index( domain[d].
min() - A.leftGuard(d), domain[d].min()-1 );
4862 for (
int c=1; c<NC; c++) {
4863 if (CE[c + d*NC] != centering0)
4864 ERRORMSG(
"FunctionFaceBCApply: BCond thinks all components have"
4865 <<
" same centering along direction " << d
4866 <<
", but it isn't so." <<
endl);
4869 if (centering0 ==
CELL) {
4870 offset = 2*domain[d].min() - 1;
4872 offset = 2*domain[d].min() - 1 + 1;
4883 if ( slab.
touches( fill_alloc ) )
4890 src[d] = offset - src[d];
4901 if ( src.
touches( from_owned ) )
4921 LFI lhs = fill.
begin(fill_it);
4922 LFI rhs = from.
begin(from_it);
4953{
a[e.Component] = e.Func(b[e.Component]); }
4987template<class T,
unsigned D, class M>
4990template<class T,
unsigned D, class M>
4993template<class T,
unsigned D, class M>
4996template<class T,
unsigned D, class M,
CenteringEnum* CE,
unsigned NC>
5002template<class T,
unsigned D, class M, class C>
5013template<
class T,
unsigned D,
class M>
5031 offset = 2*domain[d].max() + 1;
5035 offset = 2*domain[d].min() - 1;
5045 if ( slab.
touches( fill_alloc ) )
5052 src[d] = offset - src[d];
5063 if ( src.
touches( from_owned ) )
5083 LFI lhs = fill.
begin(fill_it);
5084 LFI rhs = from.
begin(from_it);
5100template<
class T,
unsigned D,
class M>
5120 offset = 2*domain[d].max() + 1 - 1;
5126 offset = 2*domain[d].min() - 1 + 1;
5136 if ( slab.
touches( fill_alloc ) )
5143 src[d] = offset - src[d];
5154 if ( src.
touches( from_owned ) )
5174 LFI lhs = fill.
begin(fill_it);
5175 LFI rhs = from.
begin(from_it);
5191template<
class T,
unsigned D,
class M>
5208 offset = 2*domain[d].max() + 1 - 1;
5214 offset = 2*domain[d].min() - 1 + 1;
5224 if ( slab.
touches( fill_alloc ) )
5231 src[d] = offset - src[d];
5242 if ( src.
touches( from_owned ) )
5262 LFI lhs = fill.
begin(fill_it);
5263 LFI rhs = from.
begin(from_it);
5279template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
5293 unsigned d = ff.getFace()/2;
5295 if ( ff.getFace() & 1 ) {
5297 slab[d] =
Index( domain[d].
max() + 1, domain[d].
max() + A.rightGuard(d));
5300 if (CE[ff.getComponent() + d*NC] ==
CELL) {
5301 ERRORMSG(
"check src code, had to change ef (not known) to ff ??? " <<
endl);
5302 offset = 2*domain[d].max() + 1;
5304 offset = 2*domain[d].max() + 1 - 1;
5308 slab[d] =
Index( domain[d].
min() - A.leftGuard(d), domain[d].min()-1 );
5311 if (CE[ff.getComponent() + d*NC] ==
CELL) {
5312 offset = 2*domain[d].min() - 1;
5314 offset = 2*domain[d].min() - 1 + 1;
5325 if ( slab.
touches( fill_alloc ) )
5332 src[d] = offset - src[d];
5343 if ( src.
touches( from_owned ) )
5363 LFI lhs = fill.
begin(fill_it);
5364 LFI rhs = from.
begin(from_it);
5368 (ff.Func,ff.getComponent())).apply();
5393template<
class T,
unsigned int D,
class M,
class C>
5401 fillSlabWithZero(field,slab,this->getComponent());
5425 static const T&
get(
const T& x,
int) {
5426 ERRORMSG(
"Eureka assign to a component of class without an op[]!"<<
endl);
5430 ERRORMSG(
"Eureka assign to a component of class without an op[]!"<<
endl);
5445template<
class T,
unsigned int D,
class M,
class C>
5456 for (; lp != done ; ++lp )
5465 if ( fillDomain.
touches(localDomain) )
5474 if ( *lf.
begin() == 0 )
5510 Expr_t(data,Rhs_t(0)).apply();
5522 Expr_t(data,Rhs_t(0),component).apply();
5534template<
class T,
unsigned int D>
5543template<
class T,
unsigned int D>
5552template<
class T,
unsigned int D>
5561template<
class T,
unsigned int D>
5590template<
unsigned int D>
5608 high = slab[dim].max();
5609 low = high - gc.
right(dim);
5615 low = slab[dim].min();
5616 high = low + gc.
left(dim);
5625 slab[dim] =
Index(low,high);
5637template<
class T,
unsigned int D,
class M>
5644template<
class T,
unsigned int D,
class M>
5651template<
class T,
unsigned int D,
class M>
5670template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
5706 if (CE[component + d*NC] ==
CELL)
5715 slab[d] =
Index(low,high);
5721 int low = slab[d].min();
5725 if (CE[component + d*NC] ==
CELL)
5734 slab[d] =
Index(low,high);
5760template<
class T,
unsigned D,
class M,
class C>
5764template<
class T,
unsigned D,
class M,
class C>
5771template<
class T,
unsigned D,
class M,
class C>
5778 int slopeMultipplier)
5789 LFI lhs = fill.
begin(dest);
5790 LFI rhs1 = fill.
begin(src1);
5791 LFI rhs2 = fill.
begin(src2);
5792 LFI endi = fill.
end();
5797 for ( ; lhs != endi && rhs1 != endi && rhs2 != endi;
5798 ++lhs, ++rhs1, ++rhs2) {
5799 *lhs = (*rhs2 - *rhs1)*slopeMultipplier + *rhs1;
5811template<
class T,
unsigned D,
class M,
class C>
5857 for (
int guardLayer = 1; guardLayer <= nGuardLayers; guardLayer++) {
5861 int slopeMultipplier = -1*guardLayer;
5864 slab[d] =
Index(domain[d].
max() + guardLayer,
5865 domain[d].
max() + guardLayer);
5867 slab[d] =
Index(domain[d].
min() - guardLayer,
5868 domain[d].
min() - guardLayer);
5889 if (slab.
touches(fill_alloc)) {
5904 src2[d] =
Index(domain[d].
max() - 1, domain[d].
max() - 1, 1);
5905 src1[d] =
Index(domain[d].
max(), domain[d].
max(), 1);
5907 src1[d] =
Index(0,0,1);
5908 src2[d] =
Index(1,1,1);
5941template<
class T,
unsigned D,
class M,
class C>
5946template<
class T,
unsigned D,
class M,
class C>
5953template<
class T,
unsigned D,
class M,
class C>
5961 int slopeMultipplier)
5972 LFI lhs = fill.
begin(dest);
5973 LFI rhs1 = fill.
begin(src1);
5974 LFI rhs2 = fill.
begin(src2);
5975 LFI endi = fill.
end();
5981 int component = ef.getComponent();
5982 for ( ; lhs != endi, rhs1 != endi, rhs2 != endi;
5983 ++lhs, ++rhs1, ++rhs2) {
5985 ((*rhs2)[component] - (*rhs1)[component])*slopeMultipplier +
5998template<
class T,
unsigned D,
class M,
class C>
6015 unsigned d = ef.getFace()/2;
6025 if (ef.getFace() & 1) {
6043 for (
int guardLayer = 1; guardLayer <= nGuardLayers; guardLayer++) {
6047 int slopeMultipplier = -1*guardLayer;
6049 if (ef.getFace() & 1) {
6050 slab[d] =
Index(domain[d].
max() + guardLayer,
6051 domain[d].
max() + guardLayer);
6053 slab[d] =
Index(domain[d].
min() - guardLayer,
6054 domain[d].
min() - guardLayer);
6075 if (slab.
touches(fill_alloc)) {
6089 if (ef.getFace() & 1) {
6090 src2[d] =
Index(domain[d].
max() - 1, domain[d].
max() - 1, 1);
6091 src1[d] =
Index(domain[d].
max(), domain[d].
max(), 1);
6093 src1[d] =
Index(0,0,1);
6094 src2[d] =
Index(1,1,1);
6112template<
class T,
unsigned D,
class M,
class C>
6128template<
class T,
unsigned D,
class M,
class C>
6153 unsigned d = this->getFace()/2;
6160 if ( this->getFace() & 1 )
6171 for (fill_i=A.
begin_if(); fill_i!=A.
end_if(); ++fill_i, ++lfindex)
6185 if ( slab.
touches( fill_alloc ) )
6199 for (
int i=0; i<D; ++i)
6200 v[i] = dest[i].first();
6213#undef COMPONENT_APPLY_BUILTIN
PartBunchBase< T, Dim >::ConstIterator end(PartBunchBase< T, Dim > const &bunch)
PartBunchBase< T, Dim >::ConstIterator begin(PartBunchBase< T, Dim > const &bunch)
Field< double, 3, Mesh_t, Center_t > Field_t
ParticleSpatialLayout< double, 3, Mesh_t > Layout_t
T * value_type(const SliceIterator< T > &)
#define BC_PARALLEL_PERIODIC_TAG
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)
scalar_tag get_tag(std::complex< double >)
TensorOrder_e getTensorOrder(const scalar_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)
NDIndex< Dim > AddGuardCells(const NDIndex< Dim > &idx, const GuardCellSizes< Dim > &g)
Inform & endl(Inform &inf)
Expression Expr_t
type of an expression
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