#include <RFC_Window_transfer.h>


Public Types | |
| typedef RFC_Window_transfer | Self |
| typedef RFC_Window_derived < RFC_Pane_transfer > | Base |
Public Types inherited from RFC_Window_base | |
| typedef RFC_Window_base | Self |
| typedef COM::Window | Base |
| typedef COM::Attribute | Attribute |
| typedef RFC_Pane_base | Pane |
| typedef std::map< int, Pane * > | Pane_set |
Public Member Functions | |
| RFC_Window_transfer (COM::Window *b, int color, MPI_Comm com, const char *pre=NULL, const char *format=NULL) | |
| virtual | ~RFC_Window_transfer () |
| RFC_Pane_transfer & | pane (const int pid) |
| const RFC_Pane_transfer & | pane (const int pid) const |
| void | init_facial_buffers (const Facial_data &nd, int) |
| Facial_data | facial_buffer (int) |
| void | delete_facial_buffers () |
| void | init_nodal_buffers (const Nodal_data &nd, int n, bool init_emm) |
| Nodal_data | nodal_buffer (int) |
| void | delete_nodal_buffers () |
| void | set_tags (const COM::Attribute *tag) |
| bool | replicated () const |
| Returns whether replication has been performed. More... | |
| void | replicate_metadata (int *pane_ids, int n) |
| Replicate the metadata of a remote pane only the local process. More... | |
| void | clear_replicated_data () |
| Clear all the replicate data but keep metadata. More... | |
| void | incident_panes (std::vector< int > &pane_ids) |
| Determine the remote panes that are incident with local panes. More... | |
| void | incident_faces (std::map< int, std::vector< int > > &) const |
| Obtain the list of incident faces in each pane of the opposite mesh. More... | |
| void | replicate_metadata (const RFC_Window_transfer &opp_win) |
| Replicate the remote panes that are in contact with the local panes in opp_win. More... | |
| void | replicate_data (const Facial_data_const &data, bool replicate_coor) |
| Replicate the given data from remote processes onto local process. More... | |
| void | replicate_data (const Nodal_data_const &data, bool replicate_coor) |
| void | reduce_to_all (Nodal_data &, MPI_Op) |
| void | reduce_maxabs_to_all (Nodal_data &) |
| void | barrier () const |
| Block until all processes of the window have reached here. More... | |
| bool | is_root () const |
| Check whether the process has rank 0. More... | |
| int | comm_rank () const |
| int | comm_size () const |
| void | wait_all (int n, MPI_Request *requests) |
| void | wait_any (int n, MPI_Request *requests, int *index, MPI_Status *stat=NULL) |
| void | allreduce (Array_n &arr, MPI_Op op) const |
| void | allreduce (Real *x, MPI_Op op) const |
Public Member Functions inherited from RFC_Window_derived< RFC_Pane_transfer > | |
| const Pane & | pane (const int pid) const |
Get a reference to the pane with give id pid. More... | |
| Pane & | pane (const int pid) |
| std::pair< Pane *, int > | get_primary (Pane *p, int vid) |
Get a handle to the primary copy of a node contained in the pane p with local id vid. More... | |
| std::pair< const Pane *, int > | get_primary (const Pane *p, int vid) const |
| void | panes (std::vector< Pane * > &ps) |
| Get a vector of local panes contained in the window. More... | |
| void | panes (std::vector< const Pane * > &ps) const |
Public Member Functions inherited from RFC_Window_base | |
| RFC_Window_base (Base *b, int c, MPI_Comm) | |
Construct an object with base b and color c. More... | |
| virtual | ~RFC_Window_base () |
| Default destructor. More... | |
| std::string | name () const |
| The name of the window. More... | |
| const RFC_Pane_base & | pane (const int pid) const |
| RFC_Pane_base & | pane (const int pid) |
| const COM::Window * | base () const |
| Get a reference to the base COM::Window object. More... | |
| int | color () const |
| The color of the window for overlay or for data transfer (BLUE or GREEN). More... | |
| int | size_of_nodes () const |
| Get the total number of nodes contained the window. More... | |
| int | size_of_faces () const |
| Get the total number of faces contained the window. More... | |
| int | size_of_primary_nodes () const |
| Get the total number of nodes contained the window. More... | |
| Bbox_3 | get_bounding_box () const |
| Get the bounding box of the window. More... | |
| int | size_of_panes () const |
| Number of local panes in the window. More... | |
| const Attribute * | attribute (const char *f) const |
| Retrieve an attribute object from the base using the attribute name. More... | |
| void | export_window (RFC_Window_base *) const |
| void | write_tec_ascii (const char *prefix) const |
| Ouptut a mesh in Tecplot format. More... | |
| void | write_tec_sub (const char *prefix) const |
| Ouptut a subdivision of a mesh in Tecplot format. More... | |
| void | new_sdv_attributes (const std::string &wname) const |
| New attributes. More... | |
| void | read_sdv (const char *prefix, const char *format=NULL) |
| Read in local panes in native binary format or using Rocin. More... | |
| void | write_sdv (const char *prefix, const char *format=NULL) const |
| Write out panes in native binary format or using Rocout. More... | |
| void | build_pc_tables () |
| Build the pane connectivity table. More... | |
Private Member Functions | |
| void | allreduce (Real *, int n, MPI_Op op) const |
| void | counts_to_displs (const std::vector< int > &counts, std::vector< int > &displs) const |
| void | init_send_buffer (int pane_id, int to_rank) |
| void | init_recv_buffer (int pane_id, int from_rank) |
Private Attributes | |
| int | _buf_dim |
| MPI_Comm | _comm |
| std::map< int, std::pair< int, int > > | _pane_map |
| std::vector< int > | _num_panes |
| std::map< int, RFC_Pane_transfer * > | _replic_panes |
| bool | _replicated |
| std::set< std::pair< int, RFC_Pane_transfer * > > | _panes_to_send |
| const std::string | _prefix |
| const int | _IO_format |
Additional Inherited Members | |
Protected Types inherited from RFC_Window_derived< RFC_Pane_transfer > | |
| typedef RFC_Window_derived < RFC_Pane_transfer > | Self |
| typedef RFC_Window_base | Base |
| typedef RFC_Pane_transfer | Pane |
Protected Types inherited from RFC_Window_base | |
| enum | { SDV_BINARY, SDV_HDF, SDV_CGNS } |
Protected Member Functions inherited from RFC_Window_derived< RFC_Pane_transfer > | |
| RFC_Window_derived (COM::Window *b, int c, MPI_Comm comm) | |
| A constructor. More... | |
| virtual | ~RFC_Window_derived () |
| A destructor. More... | |
| void | init () |
Static Protected Member Functions inherited from RFC_Window_base | |
| static std::string | get_sdv_fname (const char *prefix, int pane_id, const int format=SDV_BINARY) |
| static const char * | get_prefix_base (const char *prefix) |
| static int | get_sdv_format (const char *format) |
Protected Attributes inherited from RFC_Window_base | |
| Base * | _base |
| A reference to its base COM::Window object. More... | |
| Pane_set | _pane_set |
| The set of panes contained in the window. More... | |
| int | _verbose |
| int | _color |
| MAP::Pane_communicator | _map_comm |
Static Protected Attributes inherited from RFC_Window_base | |
| static const char * | _bufwin_prefix = "buf_" |
Definition at line 133 of file RFC_Window_transfer.h.
| typedef RFC_Window_derived<RFC_Pane_transfer> Base |
Definition at line 136 of file RFC_Window_transfer.h.
| typedef RFC_Window_transfer Self |
Definition at line 135 of file RFC_Window_transfer.h.
| RFC_Window_transfer | ( | COM::Window * | b, |
| int | color, | ||
| MPI_Comm | com, | ||
| const char * | pre = NULL, |
||
| const char * | format = NULL |
||
| ) |
Definition at line 40 of file RFC_Window_transfer.C.
References RFC_Window_base::_base, _num_panes, _pane_map, comm_size(), iend, and RFC_Window_derived< RFC_Pane_transfer >::panes().

|
virtual |
Definition at line 66 of file RFC_Window_transfer.C.
References _replic_panes.
|
inline |
Definition at line 199 of file RFC_Window_transfer.h.
References Array_n::begin(), and Array_n::end().
Referenced by allreduce(), Transfer_base::dot(), Transfer_base::dot2(), Transfer_base::integrate(), Transfer_base::minmax(), and Transfer_base::norm2().


|
inline |
Definition at line 201 of file RFC_Window_transfer.h.
References allreduce().

|
private |
| void barrier | ( | ) | const |
Block until all processes of the window have reached here.
Definition at line 494 of file RFC_Window_transfer_comm.C.
References _comm, and RFC_assertion.
Referenced by Transfer_base::interpolate_fe(), Transfer_base::loadtransfer(), Interpolator::transfer(), Transfer_base::transfer_2f(), and Transfer_base::transfer_2n().

| void clear_replicated_data | ( | ) |
Clear all the replicate data but keep metadata.
Definition at line 590 of file RFC_Window_transfer_comm.C.
References _replic_panes, and iend.
Referenced by Transfer_base::loadtransfer(), Interpolator::transfer(), Transfer_base::transfer_2f(), and Transfer_base::transfer_2n().

|
inline |
Definition at line 191 of file RFC_Window_transfer.h.
References _comm, COMMPI_Comm_rank(), and COMMPI_Initialized().
Referenced by replicate_metadata().


|
inline |
Definition at line 193 of file RFC_Window_transfer.h.
References _comm, COMMPI_Comm_size(), and COMMPI_Initialized().
Referenced by replicate_metadata(), and RFC_Window_transfer().


|
inlineprivate |
Definition at line 208 of file RFC_Window_transfer.h.
References i, and RFC_assertion.
Referenced by replicate_metadata().

| void delete_facial_buffers | ( | ) |
Definition at line 193 of file RFC_Window_transfer.C.
References RFC_Pane_transfer::_buffer, RFC_Window_base::_pane_set, free_vector(), pane(), and pi.
Referenced by Transfer_base::transfer_2f().


| void delete_nodal_buffers | ( | ) |
Definition at line 148 of file RFC_Window_transfer.C.
References RFC_Pane_transfer::_buffer, RFC_Pane_transfer::_emm_buffer, RFC_Pane_transfer::_emm_offset, RFC_Window_base::_pane_set, free_vector(), pane(), and pi.
Referenced by Transfer_base::transfer_2n().


| Facial_data facial_buffer | ( | int | index | ) |
Definition at line 187 of file RFC_Window_transfer.C.
References _buf_dim, and RFC_assertion.
Referenced by Transfer_base::transfer_2f().

| RFC_BEGIN_NAME_SPACE void incident_faces | ( | std::map< int, std::vector< int > > & | opp_subface_lists | ) | const |
Obtain the list of incident faces in each pane of the opposite mesh.
Definition at line 36 of file RFC_Window_transfer_comm.C.
References RFC_Window_base::_pane_set, RFC_Pane_base::_subface_counterparts, Face_ID::face_id, for(), i, pane(), Face_ID::pane_id, pi, RFC_assertion, and RFC_Pane_base::size_of_subfaces().
Referenced by replicate_metadata().


| void incident_panes | ( | std::vector< int > & | pane_ids | ) |
Determine the remote panes that are incident with local panes.
Definition at line 203 of file RFC_Window_transfer.C.
References RFC_Window_base::_pane_set, RFC_Pane_base::_subface_counterparts, RFC_Pane_base::_subnode_counterparts, for(), i, pane(), pi, and RFC_assertion.

| void init_facial_buffers | ( | const Facial_data & | nd, |
| int | size | ||
| ) |
Definition at line 172 of file RFC_Window_transfer.C.
References _buf_dim, RFC_Pane_transfer::_buffer, RFC_Window_base::_pane_set, RFC_Data_const< _Tag >::dimension(), i, pane(), pi, and RFC_Pane_base::size_of_faces().
Referenced by Transfer_base::transfer_2f().


| void init_nodal_buffers | ( | const Nodal_data & | nd, |
| int | n, | ||
| bool | init_emm | ||
| ) |
Definition at line 97 of file RFC_Window_transfer.C.
References RFC_Pane_base::_base, _buf_dim, RFC_Pane_transfer::_buffer, RFC_Pane_transfer::_emm_buffer, RFC_Pane_transfer::_emm_offset, RFC_Window_base::_pane_set, RFC_Data_const< _Tag >::dimension(), i, k, n, pane(), pi, RFC_Pane_base::size_of_faces(), and RFC_Window_base::size_of_nodes().
Referenced by Transfer_base::transfer_2n().


|
private |
Definition at line 539 of file RFC_Window_transfer_comm.C.
References RFC_Window_base::_bufwin_prefix, _IO_format, RFC_Window_base::_pane_set, _prefix, _replic_panes, RFC_Window_base::color(), COM_call_function(), COM_delete_window(), COM_get_attribute_handle(), COM_get_function_handle(), COM_LOAD_MODULE_STATIC_DYNAMIC, COM_UNLOAD_MODULE_STATIC_DYNAMIC, RFC_Window_base::get_prefix_base(), RFC_Window_base::get_sdv_fname(), RFC_Pane_base::init(), MPI_COMM_SELF, pane(), RFC_Pane_base::read_binary(), RFC_Pane_base::read_rocin(), RFC_assertion, and RFC_Window_base::SDV_BINARY.
Referenced by replicate_metadata().


|
private |
Definition at line 531 of file RFC_Window_transfer_comm.C.
References _panes_to_send, and pane().
Referenced by replicate_metadata().


| bool is_root | ( | ) | const |
Check whether the process has rank 0.
Definition at line 499 of file RFC_Window_transfer_comm.C.
Referenced by Transfer_base::interpolate_fe(), Transfer_base::loadtransfer(), Interpolator::transfer(), Transfer_base::transfer_2f(), and Transfer_base::transfer_2n().

| Nodal_data nodal_buffer | ( | int | index | ) |
Definition at line 142 of file RFC_Window_transfer.C.
References _buf_dim, and RFC_assertion.
Referenced by Transfer_base::transfer_2n().

| RFC_Pane_transfer & pane | ( | const int | pid | ) |
Definition at line 74 of file RFC_Window_transfer.C.
References RFC_Window_base::_pane_set, and _replic_panes.
Referenced by delete_facial_buffers(), delete_nodal_buffers(), Transfer_base::get_src_pane(), Transfer_base::get_trg_pane(), incident_faces(), incident_panes(), init_facial_buffers(), init_nodal_buffers(), init_recv_buffer(), init_send_buffer(), reduce_maxabs_to_all(), reduce_to_all(), replicate_metadata(), and set_tags().

| const RFC_Pane_transfer & pane | ( | const int | pid | ) | const |
Definition at line 85 of file RFC_Window_transfer.C.
References RFC_Window_base::_pane_set, and _replic_panes.
| void reduce_maxabs_to_all | ( | Nodal_data & | data | ) |
Definition at line 476 of file RFC_Window_transfer_comm.C.
References RFC_Window_base::_map_comm, RFC_Window_base::_pane_set, COM_DOUBLE, RFC_Data_const< _Tag >::dimension(), RFC_Data_const< _Tag >::id(), pane(), pi, and RFC_Pane_transfer::pointer().
Referenced by Transfer_base::interpolate_fe(), and Transfer_base::transfer_2n().


| void reduce_to_all | ( | Nodal_data & | data, |
| MPI_Op | op | ||
| ) |
Definition at line 459 of file RFC_Window_transfer_comm.C.
References RFC_Window_base::_map_comm, RFC_Window_base::_pane_set, COM_DOUBLE, RFC_Data_const< _Tag >::dimension(), RFC_Data_const< _Tag >::id(), pane(), pi, and RFC_Pane_transfer::pointer().
Referenced by Transfer_base::init_load_vector(), and Transfer_base::multiply_mass_mat_and_x().


| void replicate_data | ( | const Facial_data_const & | data, |
| bool | replicate_coor | ||
| ) |
Replicate the given data from remote processes onto local process.
Replicate coordinates only if replicate_coor is true.
Definition at line 228 of file RFC_Window_transfer_comm.C.
References _comm, RFC_Pane_transfer::_coor_buf, RFC_Pane_transfer::_data_buf, RFC_Pane_transfer::_data_buf_id, _pane_map, _panes_to_send, RFC_Pane_transfer::_recv_faces, _replic_panes, RFC_Pane_transfer::_send_buffers, RFC_Pane_transfer::_send_faces, RFC_Pane_transfer::coordinates(), d, RFC_Data_const< _Tag >::dimension(), i, RFC_Pane_base::id(), RFC_Data_const< _Tag >::id(), iend, j, MPI_BYTE, RFC_Pane_transfer::pointer(), QUIET_NAN, RFC_assertion, s, RFC_Pane_base::size_of_faces(), RFC_Pane_base::size_of_nodes(), and wait_all().
Referenced by Transfer_base::loadtransfer(), Interpolator::transfer(), Transfer_base::transfer_2f(), and Transfer_base::transfer_2n().


| void replicate_data | ( | const Nodal_data_const & | data, |
| bool | replicate_coor | ||
| ) |
Definition at line 344 of file RFC_Window_transfer_comm.C.
References _comm, RFC_Pane_transfer::_coor_buf, RFC_Pane_transfer::_data_buf, RFC_Pane_transfer::_data_buf_id, _pane_map, _panes_to_send, RFC_Pane_transfer::_recv_nodes, _replic_panes, RFC_Pane_transfer::_send_buffers, RFC_Pane_transfer::_send_nodes, RFC_Pane_transfer::coordinates(), d, RFC_Data_const< _Tag >::dimension(), i, RFC_Pane_base::id(), RFC_Data_const< _Tag >::id(), iend, j, MPI_BYTE, RFC_Pane_transfer::pointer(), QUIET_NAN, RFC_assertion, s, RFC_Pane_base::size_of_nodes(), and wait_all().

| void replicate_metadata | ( | int * | pane_ids, |
| int | n | ||
| ) |
Replicate the metadata of a remote pane only the local process.
Definition at line 174 of file RFC_Window_transfer_comm.C.
References _comm, _pane_map, _replicated, comm_rank(), comm_size(), counts_to_displs(), i, init_recv_buffer(), init_send_buffer(), j, k, n, rank, and RFC_assertion.
Referenced by replicate_metadata().


| void replicate_metadata | ( | const RFC_Window_transfer & | opp_win | ) |
Replicate the remote panes that are in contact with the local panes in opp_win.
Definition at line 54 of file RFC_Window_transfer_comm.C.
References _pane_map, RFC_Window_base::_pane_set, RFC_Pane_transfer::_recv_faces, RFC_Pane_transfer::_recv_nodes, RFC_Pane_transfer::_send_faces, RFC_Pane_transfer::_send_nodes, RFC_Pane_base::_subface_counterparts, RFC_Pane_base::_subface_parents, RFC_Pane_base::_subfaces, RFC_Pane_base::_subnode_parents, RFC_Pane_base::base(), comm_rank(), for(), i, incident_faces(), RFC_Pane_transfer::is_master(), j, k, pane(), Face_ID::pane_id, pi, rank, replicate_metadata(), RFC_assertion, and RFC_Pane_base::size_of_subfaces().

|
inline |
Returns whether replication has been performed.
Definition at line 161 of file RFC_Window_transfer.h.
References _replicated.
| void set_tags | ( | const COM::Attribute * | tag | ) |
Definition at line 160 of file RFC_Window_transfer.C.
References RFC_Pane_base::_base, RFC_Window_base::_pane_set, RFC_Pane_transfer::_to_recv, RFC_Window_base::attribute(), pane(), and pi.

| void wait_all | ( | int | n, |
| MPI_Request * | requests | ||
| ) |
Definition at line 505 of file RFC_Window_transfer_comm.C.
References RFC_assertion.
Referenced by replicate_data().

| void wait_any | ( | int | n, |
| MPI_Request * | requests, | ||
| int * | index, | ||
| MPI_Status * | stat = NULL |
||
| ) |
|
private |
Definition at line 221 of file RFC_Window_transfer.h.
Referenced by facial_buffer(), init_facial_buffers(), init_nodal_buffers(), and nodal_buffer().
|
private |
Definition at line 222 of file RFC_Window_transfer.h.
Referenced by allreduce(), barrier(), comm_rank(), comm_size(), is_root(), replicate_data(), and replicate_metadata().
|
private |
Definition at line 230 of file RFC_Window_transfer.h.
Referenced by init_recv_buffer().
|
private |
Definition at line 224 of file RFC_Window_transfer.h.
Referenced by RFC_Window_transfer().
|
private |
Definition at line 223 of file RFC_Window_transfer.h.
Referenced by replicate_data(), replicate_metadata(), and RFC_Window_transfer().
|
private |
Definition at line 228 of file RFC_Window_transfer.h.
Referenced by init_send_buffer(), and replicate_data().
|
private |
Definition at line 229 of file RFC_Window_transfer.h.
Referenced by init_recv_buffer().
|
private |
Definition at line 225 of file RFC_Window_transfer.h.
Referenced by clear_replicated_data(), init_recv_buffer(), pane(), replicate_data(), and ~RFC_Window_transfer().
|
private |
Definition at line 226 of file RFC_Window_transfer.h.
Referenced by replicate_metadata(), and replicated().