|
dune-grid 2.8.0
|
Loading...
Searching...
No Matches
torus.hh
Go to the documentation of this file.
85 DUNE_THROW(Dune::Exception, "Communicator size and result of the given load balancer do not match!");
390 std::cout << "[" << rank() << "]: ERROR: local sends/receives do not match in exchange!" << std::endl;
This file provides tools to partition YaspGrids. If you want to write your own partitioner,...
int size() const
std::ostream & operator<<(std::ostream &s, const bigunsignedint< k > &x)
std::ptrdiff_t index() const
#define DUNE_THROW(E, m)
constexpr Mantissa power(Mantissa m, Exponent p)
Communication< T > CollectiveCommunication
Include standard header files.
int rank() const
int size() const
a base class for the yaspgrid partitioning strategy The name might be irritating. It will probably ch...
Definition partitioning.hh:24
virtual void loadbalance(const iTupel &, int, iTupel &) const =0
Definition torus.hh:44
int neighbors() const
return the number of neighbors, which is
Definition torus.hh:201
iTupel rank_to_coord(int rank) const
map rank to coordinate in torus using lexicographic ordering
Definition torus.hh:142
ProcListIterator sendbegin() const
first process in send list
Definition torus.hh:335
int color(const iTupel &coord) const
assign color to given coordinate
Definition torus.hh:172
ProcListIterator recvbegin() const
first process in receive list
Definition torus.hh:347
int rank_relative(int rank, int dir, int cnt) const
return rank of process where its coordinate in direction dir has offset cnt (handles periodic case)
Definition torus.hh:164
void recv(int rank, void *buffer, int size) const
store a receive request; buffers are received in order; handles also local requests with memcpy
Definition torus.hh:372
int coord_to_rank(iTupel coord) const
map coordinate in torus to rank using lexicographic ordering
Definition torus.hh:155
int dims(int i) const
return dimensions of torus in direction i
Definition torus.hh:116
Torus(CollectiveCommunication comm, int tag, iTupel size, const YLoadBalance< d > *lb)
make partitioner from communicator and coarse mesh size
Definition torus.hh:69
ProcListIterator recvend() const
last process in receive list
Definition torus.hh:353
bool is_neighbor(iTupel delta, std::bitset< d > periodic) const
return true if neighbor with given delta is a neighbor under the given periodicity
Definition torus.hh:210
void send(int rank, void *buffer, int size) const
store a send request; buffers are sent in order; handles also local requests with memcpy
Definition torus.hh:359
void print(std::ostream &s) const
print contents of torus object
Definition torus.hh:449
double partition(int rank, iTupel origin_in, iTupel size_in, iTupel &origin_out, iTupel &size_out) const
partition the given grid onto the torus and return the piece of the process with given rank; returns ...
Definition torus.hh:237
bool inside(iTupel c) const
return true if coordinate is inside torus
Definition torus.hh:134
void exchange() const
exchange messages stored in request buffers; clear request buffers afterwards
Definition torus.hh:385
std::array< int, d > iTupel
type used to pass tupels in and out
Definition torus.hh:47
Definition torus.hh:274
ProcListIterator(typename std::deque< CommPartner >::const_iterator iter)
make an iterator
Definition torus.hh:277
int distance() const
return 1-norm of distance vector
Definition torus.hh:301
int index() const
return index in proclist
Definition torus.hh:295
int rank() const
return rank of neighboring process
Definition torus.hh:283
bool operator==(const ProcListIterator &iter) const
Return true when two iterators point to same member.
Definition torus.hh:311
iTupel delta() const
return distance vector
Definition torus.hh:289
bool operator!=(const ProcListIterator &iter) const
Return true when two iterators do not point to same member.
Definition torus.hh:318
ProcListIterator & operator++()
Increment iterator to next cell.
Definition torus.hh:324
T begin(T... args)
T clear(T... args)
T data(T... args)
T end(T... args)
T endl(T... args)
T fill(T... args)
T push_back(T... args)
T push_front(T... args)
T size(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8