Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFC_Pane_transfer Class Reference

#include <RFC_Window_transfer.h>

Inheritance diagram for RFC_Pane_transfer:
Collaboration diagram for RFC_Pane_transfer:

Public Types

typedef RFC_Pane_transfer Self
 
typedef RFC_Pane_base Base
 
- Public Types inherited from RFC_Pane_base
typedef RFC_Pane_base Self
 
typedef COM::Pane Base
 
typedef COM::Attribute Attribute
 
typedef Base::Size Size
 
typedef RFC::Real Real
 
typedef std::pair< int, int > V2b
 Pane id and local boundary id. More...
 
typedef std::map< int, V2bV2b_table
 From node id to its corresponding map. More...
 
typedef std::vector< int > B2v
 From local boundary ids to node ids. More...
 
typedef std::map< int, B2vB2v_table
 From pane id to its corresponding mapping. More...
 

Public Member Functions

 RFC_Pane_transfer (COM::Pane *b, int c)
 
virtual ~RFC_Pane_transfer ()
 
RFC_Window_transferwindow ()
 
const RFC_Window_transferwindow () const
 
Realpointer (int i)
 
const Realpointer (int i) const
 
const Realcoordinates () const
 
bool need_recv (int i) const
 
Realget_emm (int f)
 
const Realget_emm (int f) const
 
bool is_master () const
 
- Public Member Functions inherited from RFC_Pane_base
 RFC_Pane_base (Base *b, int color)
 A constructor. More...
 
void init ()
 
virtual ~RFC_Pane_base ()
 The default destructor. More...
 
Basebase ()
 The id of its base COM::Pane object. More...
 
const Basebase () const
 
int id () const
 
bool is_master () const
 Is this pane a master copy? More...
 
bool is_replicate () const
 Is this pane not a master copy? More...
 
bool is_quadratic () const
 Does this pane contain quadratic elements? More...
 
bool is_border_node (int i) const
 Is a give node on the boundary of the pane? More...
 
bool is_isolated_node (int i) const
 Is a give node an isolated node not belong to any element? More...
 
bool coincident (int i, int j) const
 Report whether the two given nodes are coincident. More...
 
int size_of_nodes () const
 The total number of nodes in the pane. More...
 
int size_of_faces () const
 The total number of faces in the pane. More...
 
int size_of_isolated_nodes () const
 
int size_of_border_nodes () const
 
Edge_ID get_edge_id (const int face_lid, const int vertex_lid) const
 Get the edge id within a given face. More...
 
int size_of_subnodes () const
 The total number of nodes in the subdivision of the pane. More...
 
int size_of_subfaces () const
 The total number of faces in the subdivision of the pane. More...
 
Realpointer (int i)
 Get the address of a given attribute with id i. More...
 
const Realpointer (int i) const
 
bool is_primary_node (const int vid) const
 Is the node with given local id a primary one? More...
 
int size_of_primary_nodes () const
 Get total number of primary nodes contained in the pane. More...
 
const Point_3get_point (int id) const
 Get the physical coordinates of the node with given local id. More...
 
const Point_3get_point (int id, int) const
 
const Realcoordinates () const
 
Point_3 get_point_of_subnode (int id) const
 
Bbox_3 get_bounding_box () const
 Get the bounding box of the pane. More...
 
int color () const
 The color of the parent window (BLUE or GREEN). More...
 
int parent_type_of_subnode (int) const
 Determine the parent type of a subnode of given tyep. More...
 
int get_parent_node (int) const
 Get the local parent node id of a given subnode. More...
 
int get_parent_face (int id) const
 Get the local parent face id of a given subface. More...
 
template<class Point >
void normalize_nat_coor (int idx, int e, Point &nc) const
 
void get_host_element_of_subnode (int i, Element_node_enumerator &ene, Point_2 &nc) const
 
void get_host_element_of_subface (int i, Element_node_enumerator &ene) const
 
void get_nat_coor_in_element (const int eid, const int lid, Point_2 &nc) const
 Take a subface id and a local subnode id, return the natual coordinates of the subnode within the parent element. More...
 
void get_nat_coor_in_element (const int sn_id, Element_node_enumerator &ene, Point_2 &nc) const
 Take a subnode id and an element, return the natrual coordinates within the element. More...
 
std::pair< const
COM::Connectivity *, int > 
get_element (int face_id) const
 Get the connectivity object and the id within the connectivity object for a given element. More...
 
const Node_IDget_subnode_counterpart (int i) const
 
const Face_IDget_subface_counterpart (int i) const
 
int get_lvid (const Element_node_enumerator &ene, const int v) const
 

Private Attributes

RFC_Window_transfer_window
 
std::vector< std::vector< Real > > _buffer
 
std::vector< int > _emm_offset
 
std::vector< Real_emm_buffer
 
int _data_buf_id
 
std::vector< Real_coor_buf
 
std::vector< Real_data_buf
 
std::vector< MPI_Request > _msg_requests
 
int * _to_recv
 
std::vector< int > _recv_faces
 
std::vector< int > _recv_nodes
 
std::map< int, std::vector< int > > _send_faces
 
std::map< int, std::vector< int > > _send_nodes
 
std::map< int, std::vector
< Real > > 
_send_buffers
 

Friends

class RFC_Window_transfer
 

Additional Inherited Members

- Protected Member Functions inherited from RFC_Pane_base
void comp_nat_coors ()
 Compute the natural coordinates. More...
 
void build_v2b_from_b2v (const RFC_Window_base *w)
 Build pane connectivity. More...
 
void write_tec_ij (std::ostream &, const COM::Attribute *a=0) const
 
void write_tec_tri (std::ostream &, const COM::Connectivity &, const COM::Attribute *a=0) const
 
void write_tec_mixed (std::ostream &, const std::vector< const COM::Connectivity * > &, const COM::Attribute *a=0) const
 
void write_tec_sub (std::ostream &) const
 
void write_tec_ascii (std::ostream &os, const COM::Attribute *attr=0) const
 
void write_binary (std::ostream &os) const
 
void read_binary (std::istream &is, std::vector< int > *b2v_all=NULL, COM::Pane *p=NULL)
 
void register_sdv_attributes (const std::string &wname) const
 
void read_rocin (const std::string &sdv_wname, const std::string &parent_wname="", COM::Pane *p=NULL)
 Read in using Rocin. More...
 
- Protected Attributes inherited from RFC_Pane_base
Base_base
 Reference to its base object. More...
 
bool _is_master
 Is the pane a master copy? More...
 
bool _quadratic
 Does it contain quadratic elements? More...
 
std::vector< bool > _is_border
 Is a node on border? More...
 
std::vector< bool > _is_isolated
 Is a node isolated? More...
 
int _n_border
 
int _n_isolated
 
V2b_table _v2b_table
 
B2v_table _b2v_table
 
std::vector< Edge_ID_subnode_parents
 Edge ids of parents. More...
 
std::vector< Point_2S_subnode_nat_coors
 Natual coordinates in the parent face. More...
 
std::vector< Point_2S_subnode_normalized_nc
 Natual coordinates in the parent face. More...
 
std::vector< int > _subnode_subID
 Sub-node ID of nodes in the pane. More...
 
std::vector< Node_ID_subnode_counterparts
 Ids of counterparts of subnodes. More...
 
std::vector< Three_tuple< int > > _subfaces
 
std::vector< int > _subface_parents
 Face ids of the parents of the subfaces. More...
 
std::vector< int > _subface_offsets
 Offsets of first subfaces contained in a face. More...
 
std::vector< Face_ID_subface_counterparts
 Ids of counterparts of faces. More...
 
std::vector< Three_tuple
< Point_2S > > 
_subface_nat_coors
 Element connectivity of the subfaces. More...
 

Detailed Description

Definition at line 53 of file RFC_Window_transfer.h.

Member Typedef Documentation

Definition at line 56 of file RFC_Window_transfer.h.

Definition at line 55 of file RFC_Window_transfer.h.

Constructor & Destructor Documentation

RFC_BEGIN_NAME_SPACE RFC_Pane_transfer ( COM::Pane *  b,
int  c 
)

Definition at line 35 of file RFC_Window_transfer.C.

36  : Base( b, c), _window( NULL), _to_recv( NULL) {}
RFC_Window_transfer * _window
~RFC_Pane_transfer ( )
virtual

Definition at line 37 of file RFC_Window_transfer.C.

37 {}

Member Function Documentation

const Real* coordinates ( ) const
inline

Definition at line 79 of file RFC_Window_transfer.h.

References _coor_buf, RFC_Pane_base::coordinates(), and is_master().

Referenced by Transfer_base::compute_load_vector_wra(), Transfer_base::integrate_subface(), and RFC_Window_transfer::replicate_data().

79  {
80  if ( is_master())
81  return Base::coordinates();
82  else {
83  return &_coor_buf.front();
84  }
85  }
std::vector< Real > _coor_buf
const Real * coordinates() const

Here is the call graph for this function:

Here is the caller graph for this function:

Real* get_emm ( int  f)
inline

Definition at line 93 of file RFC_Window_transfer.h.

References _emm_buffer, _emm_offset, RFC_assertion, and RFC_Pane_base::size_of_faces().

Referenced by Transfer_base::compute_load_vector_wra(), and Transfer_base::multiply_mass_mat_and_x().

93  {
94  RFC_assertion( f>=1 && f<=size_of_faces());
95  return &_emm_buffer[ _emm_offset[f-1]];
96  }
int size_of_faces() const
The total number of faces in the pane.
std::vector< Real > _emm_buffer
std::vector< int > _emm_offset
#define RFC_assertion
Definition: rfc_basic.h:65

Here is the call graph for this function:

Here is the caller graph for this function:

const Real* get_emm ( int  f) const
inline

Definition at line 97 of file RFC_Window_transfer.h.

References _emm_buffer, _emm_offset, RFC_assertion, and RFC_Pane_base::size_of_faces().

97  {
98  RFC_assertion( f>=1 && f<=size_of_faces());
99  return &_emm_buffer[ _emm_offset[f-1]];
100  }
int size_of_faces() const
The total number of faces in the pane.
std::vector< Real > _emm_buffer
std::vector< int > _emm_offset
#define RFC_assertion
Definition: rfc_basic.h:65

Here is the call graph for this function:

bool is_master ( ) const
inline

Definition at line 102 of file RFC_Window_transfer.h.

References RFC_Pane_base::_base.

Referenced by coordinates(), pointer(), and RFC_Window_transfer::replicate_metadata().

102 { return _base->window()!=NULL; }
Base * _base
Reference to its base object.

Here is the caller graph for this function:

bool need_recv ( int  i) const
inline

Definition at line 86 of file RFC_Window_transfer.h.

References _to_recv, RFC_assertion, and RFC_Pane_base::size_of_faces().

Referenced by Transfer_base::interpolate_fe(), and Transfer_base::multiply_mass_mat_and_x().

86  {
87  // Check whether an element is on the receiver list
88  if ( _to_recv == NULL) return true;
89  RFC_assertion( i>=1 && i<=size_of_faces());
90  return _to_recv[ i-1];
91  }
int size_of_faces() const
The total number of faces in the pane.
blockLoc i
Definition: read.cpp:79
#define RFC_assertion
Definition: rfc_basic.h:65

Here is the call graph for this function:

Here is the caller graph for this function:

Real* pointer ( int  i)
inline

Definition at line 65 of file RFC_Window_transfer.h.

References _buffer, _data_buf, _data_buf_id, is_master(), RFC_Pane_base::pointer(), and RFC_assertion.

Referenced by RFC_Data_const< _Tag >::get_value(), RFC_Data< _Tag >::get_value(), Transfer_base::interpolate_fe(), Transfer_base::make_field(), Transfer_base::multiply_mass_mat_and_x(), pointer(), RFC_Window_transfer::reduce_maxabs_to_all(), RFC_Window_transfer::reduce_to_all(), RFC_Window_transfer::replicate_data(), and RFC_Data< _Tag >::set_value().

65  {
66  if ( i>=0) {
67  if ( is_master())
68  return Base::pointer(i);
69  else {
71  return &_data_buf.front();
72  }
73  }
74  else
75  return &_buffer[-i-1][0];
76  }
Real * pointer(int i)
Get the address of a given attribute with id i.
blockLoc i
Definition: read.cpp:79
std::vector< std::vector< Real > > _buffer
#define RFC_assertion
Definition: rfc_basic.h:65
std::vector< Real > _data_buf

Here is the call graph for this function:

Here is the caller graph for this function:

const Real* pointer ( int  i) const
inline

Definition at line 77 of file RFC_Window_transfer.h.

References pointer().

78  { return const_cast<Self*>(this)->pointer(i); }
RFC_Pane_transfer Self
blockLoc i
Definition: read.cpp:79

Here is the call graph for this function:

RFC_Window_transfer* window ( )
inline

Definition at line 62 of file RFC_Window_transfer.h.

References _window.

62 { return _window; }
RFC_Window_transfer * _window
const RFC_Window_transfer* window ( ) const
inline

Definition at line 63 of file RFC_Window_transfer.h.

References _window.

63 { return _window; }
RFC_Window_transfer * _window

Friends And Related Function Documentation

friend class RFC_Window_transfer
friend

Definition at line 57 of file RFC_Window_transfer.h.

Member Data Documentation

std::vector< Real> _coor_buf
private

Definition at line 113 of file RFC_Window_transfer.h.

Referenced by coordinates(), and RFC_Window_transfer::replicate_data().

std::vector< Real> _data_buf
private

Definition at line 114 of file RFC_Window_transfer.h.

Referenced by pointer(), and RFC_Window_transfer::replicate_data().

int _data_buf_id
private

Definition at line 112 of file RFC_Window_transfer.h.

Referenced by pointer(), and RFC_Window_transfer::replicate_data().

std::vector< Real> _emm_buffer
private
std::vector< int> _emm_offset
private
std::vector< MPI_Request> _msg_requests
private

Definition at line 116 of file RFC_Window_transfer.h.

std::vector<int> _recv_faces
private
std::vector<int> _recv_nodes
private
std::map<int, std::vector<Real> > _send_buffers
private

Definition at line 129 of file RFC_Window_transfer.h.

Referenced by RFC_Window_transfer::replicate_data().

std::map<int, std::vector<int> > _send_faces
private
std::map<int, std::vector<int> > _send_nodes
private
int* _to_recv
private

Definition at line 117 of file RFC_Window_transfer.h.

Referenced by need_recv(), and RFC_Window_transfer::set_tags().

RFC_Window_transfer* _window
private

Definition at line 106 of file RFC_Window_transfer.h.

Referenced by window().


The documentation for this class was generated from the following files: