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>
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>
205template<
class T,
unsigned D,
class M,
class C>
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>
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);
1009 if (pf.getComponent() ==
BCondBase<T,D,M,
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>
1327 typedef typename LField_t::iterator LFI_t;
1374 unsigned d = this->
getFace()/2;
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;
1437 typedef std::vector<LField_t*> DestList_t;
1438 typedef std::vector<LField_t*> SrcList_t;
1439 typedef typename DestList_t::iterator DestListIterator_t;
1440 typedef typename SrcList_t::iterator SrcListIterator_t;
1442 DestList_t dest_list;
1445 dest_list.reserve(1);
1446 src_list.reserve(1);
1451 msg <<
"Starting dest & src domain calculation." <<
endl;
1456 LField_t &lf = *lf_i->second;
1461 const Domain_t &lf_allocated = lf.getAllocated();
1464 msg <<
" Processing subdomain : " << lf_allocated <<
endl;
1468 if (lf_allocated.touches(dest_slab))
1469 dest_list.push_back(&lf);
1475 const Domain_t &lf_owned = lf.getOwned();
1477 if (lf_owned.touches(src_slab))
1478 src_list.push_back(&lf);
1482 msg <<
" dest_list has " << dest_list.size() <<
" elements." <<
endl;
1483 msg <<
" src_list has " << src_list.size() <<
" elements." <<
endl;
1486 DestListIterator_t dest_begin = dest_list.begin();
1487 DestListIterator_t dest_end = dest_list.end();
1488 SrcListIterator_t src_begin = src_list.begin();
1489 SrcListIterator_t src_end = src_list.end();
1503 msg <<
"Starting receive calculation." <<
endl;
1513 std::vector<bool> receive_mask(nprocs,
false);
1515 DestListIterator_t dest_i;
1517 for (dest_i = dest_begin; dest_i != dest_end; ++dest_i)
1521 LField_t &dest_lf = **dest_i;
1523 const Domain_t &dest_lf_alloc = dest_lf.getAllocated();
1529 const Domain_t dest_domain = dest_lf_alloc.intersect(dest_slab);
1532 src_domain[d] = src_domain[d] + offset;
1545 typename Layout_t::touch_range_dv
1546 src_range(layout.touch_range_rdv(src_domain));
1553 typename Layout_t::touch_iterator_dv rv_i;
1555 for (rv_i = src_range.first; rv_i != src_range.second; ++rv_i)
1564 Domain_t hit = src_domain.intersect(rv_alloc);
1565 hit[d] = hit[d] - offset;
1569 typedef typename ReceiveMap_t::value_type
value_type;
1571 receive_map.insert(
value_type(hit,&dest_lf));
1574 msg <<
" Need remote data for domain: " << hit <<
endl;
1579 int rnode = rv_i->second->getNode();
1581 receive_mask[rnode] =
true;
1588 for (
int iproc = 0; iproc < nprocs; ++iproc)
1589 if (receive_mask[iproc]) ++receive_count;
1593 msg <<
" Expecting to see " << receive_count <<
" messages." <<
endl;
1594 msg <<
"Done with receive calculation." <<
endl;
1604 msg <<
"Starting send calculation" <<
endl;
1613 std::vector<Message *> messages(nprocs);
1614 for (
int miter=0; miter < nprocs; messages[miter++] = 0);
1622 std::vector<int> ndomains(nprocs);
1623 for(
int i = 0; i < nprocs; ++i) ndomains[i] = 0;
1626 SrcListIterator_t src_i;
1628 for (src_i = src_begin; src_i != src_end; ++src_i)
1632 LField_t &src_lf = **src_i;
1640 const Domain_t &src_lf_owned = src_lf.getOwned();
1641 const Domain_t &src_lf_alloc = src_lf.getAllocated();
1647 const Domain_t src_owned = src_lf_owned.intersect(src_slab);
1648 const Domain_t src_alloc = src_lf_alloc.intersect(src_slab);
1651 dest_owned[d] = dest_owned[d] - offset;
1654 dest_alloc[d] = dest_alloc[d] - offset;
1657 msg <<
" Considering LField with the domains:" <<
endl;
1658 msg <<
" owned = " << src_lf_owned <<
endl;
1659 msg <<
" alloc = " << src_lf_alloc <<
endl;
1660 msg <<
" The intersections with src_slab are:" <<
endl;
1661 msg <<
" owned = " << src_owned <<
endl;
1662 msg <<
" alloc = " << src_alloc <<
endl;
1668 typename Layout_t::touch_range_dv
1669 dest_range(layout.touch_range_rdv(dest_owned,gc));
1671 typename Layout_t::touch_iterator_dv rv_i;
1680 for (rv_i = dest_range.first; rv_i != dest_range.second; ++rv_i)
1686 Domain_t hit = dest_alloc.intersect(rv_i->first);
1687 hit[d] = hit[d] + offset;
1691 int rnode = rv_i->second->getNode();
1694 msg <<
" Overlap domain = " << rv_i->first <<
endl;
1695 msg <<
" Inters. domain = " << hit;
1696 msg <<
" --> node " << rnode <<
endl;
1706 LFI_t msgval = src_lf.begin(hit, compressed_value);
1707 msgval.TryCompress();
1711 if (!messages[rnode])
1713 messages[rnode] =
new Message;
1717 messages[rnode]->put(hit);
1718 messages[rnode]->put(msgval);
1735 for (
int iproc = 0; iproc < nprocs; ++iproc)
1737 if (messages[iproc])
1741 msg <<
" ParallelPeriodicBCApply: Sending message to node "
1743 <<
" number of domains = " << ndomains[iproc] <<
endl
1744 <<
" number of MsgItems = "
1745 << messages[iproc]->size() <<
endl;
1748 Ippl::Comm->send(messages[iproc], iproc, bc_comm_tag);
1758 msg <<
" Sent " << send_count <<
" messages" <<
endl;
1759 msg <<
"Done with send." <<
endl;
1776 msg <<
"Starting local calculation." <<
endl;
1779 DestListIterator_t dest_i;
1781 for (dest_i = dest_begin; dest_i != dest_end; ++dest_i)
1785 LField_t &dest_lf = **dest_i;
1787 const Domain_t &dest_lf_alloc = dest_lf.getAllocated();
1789 const Domain_t dest_domain = dest_lf_alloc.intersect(dest_slab);
1792 src_domain[d] = src_domain[d] + offset;
1794 SrcListIterator_t src_i;
1796 for (src_i = src_begin; src_i != src_end; ++src_i)
1800 LField_t &src_lf = **src_i;
1806 const Domain_t &src_lf_owned = src_lf.getOwned();
1807 const Domain_t &src_lf_alloc = src_lf.getAllocated();
1812 if (src_domain.touches(src_lf_owned))
1818 dest_lf.Uncompress();
1823 src_domain.intersect(src_lf_alloc);
1825 Domain_t real_dest_domain = real_src_domain;
1826 real_dest_domain[d] = real_dest_domain[d] - offset;
1829 msg <<
" Copying local data . . ." <<
endl;
1830 msg <<
" source domain = " << real_src_domain <<
endl;
1831 msg <<
" dest domain = " << real_dest_domain <<
endl;
1836 LFI_t lhs = dest_lf.begin(real_dest_domain);
1837 LFI_t rhs = src_lf.begin(real_src_domain);
1856 msg <<
"Done with local calculation." <<
endl;
1872 msg <<
"Starting receive..." <<
endl;
1876 while (receive_count > 0)
1886 Ippl::Comm->receive_block(any_node,bc_comm_tag);
1895 int ndomains = message->
size() / (D + 3);
1898 msg <<
" Message received from node "
1899 << any_node <<
"," <<
endl
1900 <<
" number of domains = " << ndomains <<
endl;
1903 for (
int idomain=0; idomain < ndomains; ++idomain)
1909 intersection.getMessage(*message);
1910 intersection[d] = intersection[d] - offset;
1915 LFI_t rhs(compressed_value);
1916 rhs.getMessage(*message);
1919 msg <<
" Received remote overlap region = "
1920 << intersection <<
endl;
1925 typename ReceiveMap_t::iterator hit =
1926 receive_map.find(intersection);
1928 PAssert(hit != receive_map.end());
1942 msg <<
", LHS value = " << *lf.
begin() <<
endl;
1943 msg <<
" RHS compressed ? " << rhs.IsCompressed();
1944 msg <<
", RHS value = " << *rhs <<
endl;
1945 msg <<
" *rhs == *lf.begin() ? "
1949 (*rhs == *lf.
begin())))
1954 LFI_t lhs = lf.
begin(intersection);
1959 msg <<
" Doing copy." <<
endl;
1967 receive_map.erase(hit);
1975 msg <<
"Done with receive." <<
endl;
1985template <
class T,
unsigned D,
class M>
2013 offset = -domain[d].length();
2026 offset = domain[d].length();
2034template<
class T,
unsigned D,
class M,
class C>
2048 typedef typename LField_t::iterator LFI_t;
2095 unsigned d = this->
getFace()/2;
2102 dest_slab[d] = dest_slab[d] + offset;
2105 msg <<
"dest_slab = " << dest_slab <<
endl;
2106 msg <<
"src_slab = " << src_slab <<
endl;
2124 typedef std::multimap<Domain_t,LField_t*, std::less<Domain_t> > ReceiveMap_t;
2130 ReceiveMap_t receive_map;
2136 int receive_count = 0;
2158 typedef std::vector<LField_t*> DestList_t;
2159 typedef std::vector<LField_t*> SrcList_t;
2160 typedef typename DestList_t::iterator DestListIterator_t;
2161 typedef typename SrcList_t::iterator SrcListIterator_t;
2163 DestList_t dest_list;
2166 dest_list.reserve(1);
2167 src_list.reserve(1);
2172 msg <<
"Starting dest & src domain calculation." <<
endl;
2177 LField_t &lf = *lf_i->second;
2183 const Domain_t &lf_owned = lf.getOwned();
2186 msg <<
" Processing subdomain : " << lf_owned <<
endl;
2190 if (lf_owned.touches(dest_slab))
2191 dest_list.push_back(&lf);
2197 const Domain_t &lf_allocated = lf.getAllocated();
2199 if (lf_allocated.touches(src_slab))
2200 src_list.push_back(&lf);
2204 msg <<
" dest_list has " << dest_list.size() <<
" elements." <<
endl;
2205 msg <<
" src_list has " << src_list.size() <<
" elements." <<
endl;
2208 DestListIterator_t dest_begin = dest_list.begin();
2209 DestListIterator_t dest_end = dest_list.end();
2210 SrcListIterator_t src_begin = src_list.begin();
2211 SrcListIterator_t src_end = src_list.end();
2225 msg <<
"Starting receive calculation." <<
endl;
2235 std::vector<bool> receive_mask(nprocs,
false);
2237 DestListIterator_t dest_i;
2239 for (dest_i = dest_begin; dest_i != dest_end; ++dest_i)
2243 LField_t &dest_lf = **dest_i;
2245 const Domain_t &dest_lf_alloc = dest_lf.getAllocated();
2251 const Domain_t dest_domain = dest_lf_alloc.intersect(dest_slab);
2256 src_domain[d] = src_domain[d] - offset;
2270 typename Layout_t::touch_range_dv
2271 src_range(layout.touch_range_rdv(src_domain,gc));
2278 typename Layout_t::touch_iterator_dv rv_i;
2280 for (rv_i = src_range.first; rv_i != src_range.second; ++rv_i)
2288 const Domain_t rv_alloc = rv_i->first;
2290 Domain_t hit = src_domain.intersect(rv_alloc);
2292 hit[d] = hit[d] + offset;
2296 typedef typename ReceiveMap_t::value_type
value_type;
2298 receive_map.insert(
value_type(hit,&dest_lf));
2301 msg <<
" Need remote data for domain: " << hit <<
endl;
2306 int rnode = rv_i->second->getNode();
2308 receive_mask[rnode] =
true;
2315 for (
int iproc = 0; iproc < nprocs; ++iproc)
2316 if (receive_mask[iproc]) ++receive_count;
2320 msg <<
" Expecting to see " << receive_count <<
" messages." <<
endl;
2321 msg <<
"Done with receive calculation." <<
endl;
2331 msg <<
"Starting send calculation" <<
endl;
2340 std::vector<Message *> messages(nprocs);
2341 for (
int miter=0; miter < nprocs; messages[miter++] = 0);
2349 std::vector<int> ndomains(nprocs);
2350 for(
int i = 0; i < nprocs; ++i) ndomains[i] = 0;
2353 SrcListIterator_t src_i;
2355 for (src_i = src_begin; src_i != src_end; ++src_i)
2359 LField_t &src_lf = **src_i;
2367 const Domain_t &src_lf_owned = src_lf.getOwned();
2368 const Domain_t &src_lf_alloc = src_lf.getAllocated();
2374 const Domain_t src_owned = src_lf_owned.intersect(src_slab);
2375 const Domain_t src_alloc = src_lf_alloc.intersect(src_slab);
2378 dest_owned[d] = dest_owned[d] + offset;
2381 dest_alloc[d] = dest_alloc[d] + offset;
2384 msg <<
" Considering LField with the domains:" <<
endl;
2385 msg <<
" owned = " << src_lf_owned <<
endl;
2386 msg <<
" alloc = " << src_lf_alloc <<
endl;
2387 msg <<
" The intersections with src_slab are:" <<
endl;
2388 msg <<
" owned = " << src_owned <<
endl;
2389 msg <<
" alloc = " << src_alloc <<
endl;
2395 typename Layout_t::touch_range_dv
2396 dest_range(layout.touch_range_rdv(dest_owned,gc));
2398 typename Layout_t::touch_iterator_dv rv_i;
2407 for (rv_i = dest_range.first; rv_i != dest_range.second; ++rv_i)
2413 Domain_t hit = dest_alloc.intersect(rv_i->first);
2414 hit[d] = hit[d] - offset;
2418 int rnode = rv_i->second->getNode();
2421 msg <<
" Overlap domain = " << rv_i->first <<
endl;
2422 msg <<
" Inters. domain = " << hit;
2423 msg <<
" --> node " << rnode <<
endl;
2433 LFI_t msgval = src_lf.begin(hit, compressed_value);
2434 msgval.TryCompress();
2438 if (!messages[rnode])
2440 messages[rnode] =
new Message;
2444 messages[rnode]->put(hit);
2445 messages[rnode]->put(msgval);
2462 for (
int iproc = 0; iproc < nprocs; ++iproc)
2464 if (messages[iproc])
2468 msg <<
" ParallelPeriodicBCApply: Sending message to node "
2470 <<
" number of domains = " << ndomains[iproc] <<
endl
2471 <<
" number of MsgItems = "
2472 << messages[iproc]->size() <<
endl;
2475 Ippl::Comm->send(messages[iproc], iproc, bc_comm_tag);
2484 msg <<
" Sent " << send_count <<
" messages" <<
endl;
2485 msg <<
"Done with send." <<
endl;
2502 msg <<
"Starting local calculation." <<
endl;
2505 DestListIterator_t dest_i;
2507 for (dest_i = dest_begin; dest_i != dest_end; ++dest_i)
2511 LField_t &dest_lf = **dest_i;
2513 const Domain_t &dest_lf_alloc = dest_lf.getAllocated();
2516 const Domain_t dest_domain = dest_lf_alloc.intersect(dest_slab);
2521 src_domain[d] = src_domain[d] - offset;
2523 SrcListIterator_t src_i;
2525 for (src_i = src_begin; src_i != src_end; ++src_i)
2529 LField_t &src_lf = **src_i;
2536 const Domain_t &src_lf_alloc = src_lf.getAllocated();
2541 if (src_domain.touches(src_lf_alloc))
2547 dest_lf.Uncompress();
2552 src_domain.intersect(src_lf_alloc);
2554 Domain_t real_dest_domain = real_src_domain;
2556 real_dest_domain[d] = real_dest_domain[d] + offset;
2559 msg <<
" Copying local data . . ." <<
endl;
2560 msg <<
" source domain = " << real_src_domain <<
endl;
2561 msg <<
" dest domain = " << real_dest_domain <<
endl;
2566 LFI_t lhs = dest_lf.begin(real_dest_domain);
2567 LFI_t rhs = src_lf.begin(real_src_domain);
2586 msg <<
"Done with local calculation." <<
endl;
2602 msg <<
"Starting receive..." <<
endl;
2606 while (receive_count > 0)
2616 Ippl::Comm->receive_block(any_node,bc_comm_tag);
2625 int ndomains = message->
size() / (D + 3);
2628 msg <<
" Message received from node "
2629 << any_node <<
"," <<
endl
2630 <<
" number of domains = " << ndomains <<
endl;
2633 for (
int idomain=0; idomain < ndomains; ++idomain)
2639 intersection.getMessage(*message);
2641 intersection[d] = intersection[d] + offset;
2646 LFI_t rhs(compressed_value);
2647 rhs.getMessage(*message);
2650 msg <<
" Received remote overlap region = "
2651 << intersection <<
endl;
2656 typename ReceiveMap_t::iterator hit =
2657 receive_map.find(intersection);
2659 PAssert(hit != receive_map.end());
2673 msg <<
", LHS value = " << *lf.
begin() <<
endl;
2674 msg <<
" RHS compressed ? " << rhs.IsCompressed();
2675 msg <<
", RHS value = " << *rhs <<
endl;
2676 msg <<
" *rhs == *lf.begin() ? "
2680 (*rhs == *lf.
begin())))
2685 LFI_t lhs = lf.
begin(intersection);
2690 msg <<
" Doing copy." <<
endl;
2699 receive_map.erase(hit);
2707 msg <<
"Done with receive." <<
endl;
2728{
a = b*e.Slope + e.Offset; }
2742 a[e.Component] = b[e.Component]*e.Slope[e.Component] + e.Offset[e.Component];
2784template<class T,
unsigned D, class M>
2787template<class T,
unsigned D, class M>
2790template<class T,
unsigned D, class M>
2793template<class T,
unsigned D, class M,
CenteringEnum* CE,
unsigned NC>
2798template<class T,
unsigned D, class M, class C>
2805template<
class T,
unsigned D,
class M,
class C>
2853 LFI lhs = fill.
begin(fill_it);
2854 LFI rhs = from.
begin(from_it);
2877template<
class T,
unsigned D,
class M>
2914 offset = 2*domain[d].max() + 1;
2927 offset = 2*domain[d].min() - 1;
2966 src[d] = offset - src[d];
3009template<
class T,
unsigned D,
class M>
3048 offset = 2*domain[d].max() + 1 - 1;
3062 offset = 2*domain[d].min() - 1 + 1;
3082 if ( slab.
touches( fill_alloc ) )
3099 src[d] = offset - src[d];
3143template<
class T,
unsigned D,
class M>
3179 offset = 2*domain[d].max() + 1 - 1;
3193 offset = 2*domain[d].min() - 1 + 1;
3213 if ( slab.
touches( fill_alloc ) )
3230 src[d] = offset - src[d];
3272template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
3291 unsigned d = ef.getFace()/2;
3299 if ( ef.getFace() & 1 )
3312 for (
unsigned int c=1;
c<NC;
c++)
3315 if (CE[
c + d*NC] != centering0)
3316 ERRORMSG(
"ExtrapolateFaceBCApply: BCond thinks all components"
3317 <<
" have same centering along direction " << d
3318 <<
", but it isn't so." <<
endl);
3327 slab[d] =
Index(domain[d].
max() + 1,
3328 domain[d].
max() + A.rightGuard(d));
3330 if (centering0 ==
CELL)
3332 offset = 2*domain[d].max() + 1 ;
3336 offset = 2*domain[d].max() + 1 - 1;
3343 if (CE[ef.getComponent() + d*NC] ==
CELL)
3348 int highcell = A.get_mesh().gridSizes[d] - 2;
3349 slab[d] =
Index(highcell + 1, highcell + A.rightGuard(d));
3352 offset = 2*highcell + 1 ;
3359 int highvert = A.get_mesh().gridSizes[d] - 1;
3360 slab[d] =
Index(highvert + 1, highvert + A.rightGuard(d));
3363 offset = 2*highvert + 1 - 1;
3373 slab[d] =
Index( domain[d].
min() - A.leftGuard(d), domain[d].min()-1 );
3386 for (
unsigned int c=1;
c<NC;
c++)
3390 if (CE[
c + d*NC] != centering0)
3391 ERRORMSG(
"ExtrapolateFaceBCApply: BCond thinks all components"
3392 <<
" have same centering along direction " << d
3393 <<
", but it isn't so." <<
endl);
3399 if (centering0 ==
CELL)
3401 offset = 2*domain[d].min() - 1;
3405 offset = 2*domain[d].min() - 1 + 1;
3413 if (CE[ef.getComponent() + d*NC] ==
CELL)
3415 offset = 2*domain[d].min() - 1;
3419 offset = 2*domain[d].min() - 1 + 1;
3443 if ( slab.
touches( fill_alloc ) )
3460 src[d] = offset - src[d];
3513{
a = b*e.Slope + e.Offset; }
3528 a[e.Component] = b[e.Component]*e.Slope[e.Component] + e.Offset[e.Component];
3567template<
class T,
class T1>
3597template<class T,
unsigned D, class M>
3600template<class T,
unsigned D, class M>
3603template<class T,
unsigned D, class M>
3606template<class T,
unsigned D, class M,
CenteringEnum* CE,
unsigned NC>
3611template<class T,
unsigned D, class M, class C>
3618template<
class T,
unsigned D,
class M,
class C>
3665 LFI lhs = fill.
begin(fill_it);
3666 LFI rhs = from.
begin(from_it);
3686template<
class T,
unsigned D,
class M,
class C>
3729 LFI lhs = fill.
begin(dest);
3755template<
class T,
unsigned D,
class M>
3792 offset = 2*domain[d].max() + 1;
3805 offset = 2*domain[d].min() - 1;
3844 src[d] = offset - src[d];
3888template<
class T,
unsigned D,
class M>
3924 phys[d] =
Index( domain[d].
max(), domain[d].
max(), 1);
3931 offset = 2*domain[d].max() + 1 - 1;
3943 phys[d] =
Index( domain[d].
min(), domain[d].
min(), 1);
3950 offset = 2*domain[d].min() - 1 + 1;
3991 if ( slab.
touches( fill_alloc ) )
4008 src[d] = offset - src[d];
4052template<
class T,
unsigned D,
class M>
4087 phys[d] =
Index( domain[d].
max(), domain[d].
max(), 1);
4094 offset = 2*domain[d].max() + 1 - 1;
4106 phys[d] =
Index( domain[d].
min(), domain[d].
min(), 1);
4113 offset = 2*domain[d].min() - 1 + 1;
4154 if ( slab.
touches( fill_alloc ) )
4171 src[d] = offset - src[d];
4213template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
4232 unsigned d = ef.getFace()/2;
4234 bool setPhys =
false;
4241 if ( ef.getFace() & 1 )
4254 for (
unsigned int c=1;
c<NC;
c++)
4257 if (CE[
c + d*NC] != centering0)
4259 "ExtrapolateAndZeroFaceBCApply: BCond thinks all components"
4260 <<
" have same centering along direction " << d
4261 <<
", but it isn't so." <<
endl);
4270 slab[d] =
Index(domain[d].
max() + 1,
4271 domain[d].
max() + A.rightGuard(d));
4273 if (centering0 ==
CELL)
4275 offset = 2*domain[d].max() + 1 ;
4279 offset = 2*domain[d].max() + 1 - 1;
4283 phys[d] =
Index( domain[d].
max(), domain[d].
max(), 1);
4291 if (CE[ef.getComponent() + d*NC] ==
CELL)
4296 int highcell = A.get_mesh().gridSizes[d] - 2;
4297 slab[d] =
Index(highcell + 1, highcell + A.rightGuard(d));
4300 offset = 2*highcell + 1 ;
4308 int highvert = A.get_mesh().gridSizes[d] - 1;
4309 slab[d] =
Index(highvert + 1, highvert + A.rightGuard(d));
4313 offset = 2*highvert + 1 - 1;
4317 phys[d] =
Index( highvert, highvert, 1 );
4328 slab[d] =
Index( domain[d].
min() - A.leftGuard(d), domain[d].min()-1 );
4341 for (
unsigned int c=1;
c<NC;
c++)
4345 if (CE[
c + d*NC] != centering0)
4347 "ExtrapolateAndZeroFaceBCApply: BCond thinks all components"
4348 <<
" have same centering along direction " << d
4349 <<
", but it isn't so." <<
endl);
4355 if (centering0 ==
CELL)
4357 offset = 2*domain[d].min() - 1;
4361 offset = 2*domain[d].min() - 1 + 1;
4365 phys[d] =
Index(domain[d].
min(), domain[d].
min(), 1);
4374 if (CE[ef.getComponent() + d*NC] ==
CELL)
4376 offset = 2*domain[d].min() - 1;
4380 offset = 2*domain[d].min() - 1 + 1;
4384 phys[d] =
Index(domain[d].
min(), domain[d].
min(), 1);
4432 if ( slab.
touches( fill_alloc ) )
4449 src[d] = offset - src[d];
4526template<
class T,
unsigned D,
class M>
4529template<
class T,
unsigned D,
class M>
4532template<
class T,
unsigned D,
class M>
4535template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
4540template<
class T,
unsigned D,
class M,
class C>
4552template<
class T,
unsigned D,
class M>
4570 offset = 2*domain[d].max() + 1;
4574 offset = 2*domain[d].min() - 1;
4584 if ( slab.
touches( fill_alloc ) )
4591 src[d] = offset - src[d];
4602 if ( src.
touches( from_owned ) )
4622 LFI lhs = fill.
begin(fill_it);
4623 LFI rhs = from.
begin(from_it);
4637template<
class T,
unsigned D,
class M>
4657 offset = 2*domain[d].max() + 1 - 1;
4663 offset = 2*domain[d].min() - 1 + 1;
4673 if ( slab.
touches( fill_alloc ) )
4680 src[d] = offset - src[d];
4691 if ( src.
touches( from_owned ) )
4711 LFI lhs = fill.
begin(fill_it);
4712 LFI rhs = from.
begin(from_it);
4726template<
class T,
unsigned D,
class M>
4743 offset = 2*domain[d].max() + 1 - 1;
4749 offset = 2*domain[d].min() - 1 + 1;
4759 if ( slab.
touches( fill_alloc ) )
4766 src[d] = offset - src[d];
4777 if ( src.
touches( from_owned ) )
4797 LFI lhs = fill.
begin(fill_it);
4798 LFI rhs = from.
begin(from_it);
4812template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
4826 unsigned d = ff.getFace()/2;
4828 if ( ff.getFace() & 1 ) {
4830 slab[d] =
Index( domain[d].
max() + 1, domain[d].
max() + A.rightGuard(d));
4834 for (
int c=1;
c<NC;
c++) {
4835 if (CE[
c + d*NC] != centering0)
4836 ERRORMSG(
"FunctionFaceBCApply: BCond thinks all components have"
4837 <<
" same centering along direction " << d
4838 <<
", but it isn't so." <<
endl);
4841 if (centering0 ==
CELL) {
4842 offset = 2*domain[d].max() + 1;
4844 offset = 2*domain[d].max() + 1 - 1;
4848 slab[d] =
Index( domain[d].
min() - A.leftGuard(d), domain[d].min()-1 );
4852 for (
int c=1;
c<NC;
c++) {
4853 if (CE[
c + d*NC] != centering0)
4854 ERRORMSG(
"FunctionFaceBCApply: BCond thinks all components have"
4855 <<
" same centering along direction " << d
4856 <<
", but it isn't so." <<
endl);
4859 if (centering0 ==
CELL) {
4860 offset = 2*domain[d].min() - 1;
4862 offset = 2*domain[d].min() - 1 + 1;
4873 if ( slab.
touches( fill_alloc ) )
4880 src[d] = offset - src[d];
4891 if ( src.
touches( from_owned ) )
4911 LFI lhs = fill.
begin(fill_it);
4912 LFI rhs = from.
begin(from_it);
4943{
a[e.Component] = e.Func(b[e.Component]); }
4977template<class T,
unsigned D, class M>
4980template<class T,
unsigned D, class M>
4983template<class T,
unsigned D, class M>
4986template<class T,
unsigned D, class M,
CenteringEnum* CE,
unsigned NC>
4992template<class T,
unsigned D, class M, class C>
5003template<
class T,
unsigned D,
class M>
5021 offset = 2*domain[d].max() + 1;
5025 offset = 2*domain[d].min() - 1;
5035 if ( slab.
touches( fill_alloc ) )
5042 src[d] = offset - src[d];
5053 if ( src.
touches( from_owned ) )
5073 LFI lhs = fill.
begin(fill_it);
5074 LFI rhs = from.
begin(from_it);
5090template<
class T,
unsigned D,
class M>
5110 offset = 2*domain[d].max() + 1 - 1;
5116 offset = 2*domain[d].min() - 1 + 1;
5126 if ( slab.
touches( fill_alloc ) )
5133 src[d] = offset - src[d];
5144 if ( src.
touches( from_owned ) )
5164 LFI lhs = fill.
begin(fill_it);
5165 LFI rhs = from.
begin(from_it);
5181template<
class T,
unsigned D,
class M>
5198 offset = 2*domain[d].max() + 1 - 1;
5204 offset = 2*domain[d].min() - 1 + 1;
5214 if ( slab.
touches( fill_alloc ) )
5221 src[d] = offset - src[d];
5232 if ( src.
touches( from_owned ) )
5252 LFI lhs = fill.
begin(fill_it);
5253 LFI rhs = from.
begin(from_it);
5269template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
5283 unsigned d = ff.getFace()/2;
5285 if ( ff.getFace() & 1 ) {
5287 slab[d] =
Index( domain[d].
max() + 1, domain[d].
max() + A.rightGuard(d));
5290 if (CE[ff.getComponent() + d*NC] ==
CELL) {
5291 ERRORMSG(
"check src code, had to change ef (not known) to ff ??? " <<
endl);
5292 offset = 2*domain[d].max() + 1;
5294 offset = 2*domain[d].max() + 1 - 1;
5298 slab[d] =
Index( domain[d].
min() - A.leftGuard(d), domain[d].min()-1 );
5301 if (CE[ff.getComponent() + d*NC] ==
CELL) {
5302 offset = 2*domain[d].min() - 1;
5304 offset = 2*domain[d].min() - 1 + 1;
5315 if ( slab.
touches( fill_alloc ) )
5322 src[d] = offset - src[d];
5333 if ( src.
touches( from_owned ) )
5353 LFI lhs = fill.
begin(fill_it);
5354 LFI rhs = from.
begin(from_it);
5358 (ff.Func,ff.getComponent())).apply();
5383template<
class T,
unsigned int D,
class M,
class C>
5415 static const T&
get(
const T& x,
int) {
5416 ERRORMSG(
"Eureka assign to a component of class without an op[]!"<<
endl);
5420 ERRORMSG(
"Eureka assign to a component of class without an op[]!"<<
endl);
5435template<
class T,
unsigned int D,
class M,
class C>
5446 for (; lp != done ; ++lp )
5455 if ( fillDomain.
touches(localDomain) )
5464 if ( *lf.
begin() == 0 )
5500 Expr_t(data,Rhs_t(0)).apply();
5512 Expr_t(data,Rhs_t(0),component).apply();
5524template<
class T,
unsigned int D>
5533template<
class T,
unsigned int D>
5542template<
class T,
unsigned int D>
5551template<
class T,
unsigned int D>
5580template<
unsigned int D>
5598 high = slab[dim].max();
5599 low = high - gc.
right(dim);
5605 low = slab[dim].min();
5606 high = low + gc.
left(dim);
5615 slab[dim] =
Index(low,high);
5627template<
class T,
unsigned int D,
class M>
5634template<
class T,
unsigned int D,
class M>
5641template<
class T,
unsigned int D,
class M>
5660template<
class T,
unsigned D,
class M, CenteringEnum* CE,
unsigned NC>
5696 if (CE[component + d*NC] ==
CELL)
5705 slab[d] =
Index(low,high);
5711 int low = slab[d].min();
5715 if (CE[component + d*NC] ==
CELL)
5724 slab[d] =
Index(low,high);
5750template<
class T,
unsigned D,
class M,
class C>
5754template<
class T,
unsigned D,
class M,
class C>
5761template<
class T,
unsigned D,
class M,
class C>
5768 int slopeMultipplier)
5779 LFI lhs = fill.
begin(dest);
5780 LFI rhs1 = fill.
begin(src1);
5781 LFI rhs2 = fill.
begin(src2);
5782 LFI endi = fill.
end();
5787 for ( ; lhs != endi && rhs1 != endi && rhs2 != endi;
5788 ++lhs, ++rhs1, ++rhs2) {
5789 *lhs = (*rhs2 - *rhs1)*slopeMultipplier + *rhs1;
5801template<
class T,
unsigned D,
class M,
class C>
5847 for (
int guardLayer = 1; guardLayer <= nGuardLayers; guardLayer++) {
5851 int slopeMultipplier = -1*guardLayer;
5854 slab[d] =
Index(domain[d].
max() + guardLayer,
5855 domain[d].
max() + guardLayer);
5857 slab[d] =
Index(domain[d].
min() - guardLayer,
5858 domain[d].
min() - guardLayer);
5879 if (slab.
touches(fill_alloc)) {
5894 src2[d] =
Index(domain[d].
max() - 1, domain[d].
max() - 1, 1);
5895 src1[d] =
Index(domain[d].
max(), domain[d].
max(), 1);
5897 src1[d] =
Index(0,0,1);
5898 src2[d] =
Index(1,1,1);
5931template<
class T,
unsigned D,
class M,
class C>
5936template<
class T,
unsigned D,
class M,
class C>
5943template<
class T,
unsigned D,
class M,
class C>
5951 int slopeMultipplier)
5962 LFI lhs = fill.
begin(dest);
5963 LFI rhs1 = fill.
begin(src1);
5964 LFI rhs2 = fill.
begin(src2);
5965 LFI endi = fill.
end();
5971 int component = ef.getComponent();
5972 for ( ; lhs != endi, rhs1 != endi, rhs2 != endi;
5973 ++lhs, ++rhs1, ++rhs2) {
5975 ((*rhs2)[component] - (*rhs1)[component])*slopeMultipplier +
5988template<
class T,
unsigned D,
class M,
class C>
6005 unsigned d = ef.getFace()/2;
6015 if (ef.getFace() & 1) {
6033 for (
int guardLayer = 1; guardLayer <= nGuardLayers; guardLayer++) {
6037 int slopeMultipplier = -1*guardLayer;
6039 if (ef.getFace() & 1) {
6040 slab[d] =
Index(domain[d].
max() + guardLayer,
6041 domain[d].
max() + guardLayer);
6043 slab[d] =
Index(domain[d].
min() - guardLayer,
6044 domain[d].
min() - guardLayer);
6065 if (slab.
touches(fill_alloc)) {
6079 if (ef.getFace() & 1) {
6080 src2[d] =
Index(domain[d].
max() - 1, domain[d].
max() - 1, 1);
6081 src1[d] =
Index(domain[d].
max(), domain[d].
max(), 1);
6083 src1[d] =
Index(0,0,1);
6084 src2[d] =
Index(1,1,1);
6102template<
class T,
unsigned D,
class M,
class C>
6118template<
class T,
unsigned D,
class M,
class C>
6143 unsigned d = this->
getFace()/2;
6161 for (fill_i=A.
begin_if(); fill_i!=A.
end_if(); ++fill_i, ++lfindex)
6175 if ( slab.
touches( fill_alloc ) )
6189 for (
int i=0; i<D; ++i)
6190 v[i] = dest[i].first();
6203#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 > &)
constexpr double c
The velocity of light in m/s.
#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)
int BCondBase< T, D, M, C >::allComponents
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)
Expression Expr_t
type of an expression
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
BareFieldIterator< T, Dim > iterator
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
CompressedBrickIterator< T, Dim > iterator
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 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
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)
virtual void apply(Field< T, D, M, C > &)
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 apply(Field< T, D, M, C > &)
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 > &)
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)
virtual void applyPatch(typename Field< T, D, M, C >::iterator, const NDIndex< D > &)=0
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
static Communicate * Comm