Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PMesh.H
Go to the documentation of this file.
1 
18 /*
19  Supported Cell Types
20 
21  4 6
22  /|\ 5 8---------7 /|\
23  / | \ / | | \ |\ / | \
24  / | \ / / | \ | \ / | \
25  / | \ / | | 5--------\6 / 3 \
26  1----|----3 4----|-3 4---|-----3 | 4---------5
27  \ | / \ / \ \ | \ | | / \ |
28  \ | / \ | \ \ | \ | | / \ |
29  \ | / \| \ \| \| |/ \|
30  2 1------2 1---------2 1---------2
31 
32 */
33 #ifndef _PMESH_H_
34 #define _PMESH_H_
35 #include "Mesh.H"
36 #include "COMM.H"
37 
38 namespace Mesh {
60  struct BorderData {
62  std::vector<Mesh::IndexType> SendAp;
64  std::vector<Mesh::IndexType> SendAi;
66  std::vector<Mesh::IndexType> RecvAp;
68  std::vector<Mesh::IndexType> RecvAi;
69  std::vector<Mesh::IndexType> border_dof_to_global;
70  std::vector<double> SendBuffer;
71  std::vector<double> RecvBuffer;
72  };
73  struct Border {
81  };
82 
83  struct PartInfo {
93  };
94 
95  class Partition {
96  private:
97  IRAD::Comm::CommunicatorObject *_communicator;
98  public:
101  // NodalCoordinates _nc;
102  // Connectivity _ec;
104  std::vector<Border> _borders;
105  int Read(const std::string &meshname,int id);
106  int Read(const std::string &MeshName,IRAD::Comm::CommunicatorObject &comm,
107  bool allow_n2m,std::ostream &ErrOut);
108  // IRAD::Comm::CommunicatorObject *CommunicatorPtr(){ return(_communicator); };
109  // std::ostream &Report(std::ostream &Ostr);
110  MeshUtilityObject &Mesh() { return (_mesh); };
111  const MeshUtilityObject &Mesh() const { return (_mesh); };
112  PartInfo &Info() { return (_info); };
113  const PartInfo &Info() const { return(_info); };
114  std::vector<Border> &Borders() { return(_borders); };
115  const std::vector<Border> &Borders() const { return(_borders); };
116  IRAD::Comm::CommunicatorObject *CommunicatorPtr(){ return(_communicator); };
117  // std::ostream &Report(std::ostream &Ostr);
118  int GetBorderElements(std::vector<Mesh::IndexType> &be) const;
119  };
120 
121 }
122 #endif
std::vector< Border > _borders
Definition: PMesh.H:104
PartInfo & Info()
Definition: PMesh.H:112
std::vector< Mesh::IndexType > RecvAp
sizes in ndof recv
Definition: PMesh.H:66
std::vector< Mesh::IndexType > RecvAi
dof id&#39;s of recvd dofs
Definition: PMesh.H:68
IRAD::Comm::CommunicatorObject * _communicator
Definition: PMesh.H:97
std::vector< Border > & Borders()
Definition: PMesh.H:114
const std::vector< Border > & Borders() const
Definition: PMesh.H:115
Mesh Stuff.
Class Mesh is the main class that holds all information to describe the current state of the mesh...
Definition: Mesh.hpp:19
Mesh::IndexType rpart
Definition: PMesh.H:74
Mesh::IndexType sendsize
total num owned dofs
Definition: PMesh.H:78
std::vector< Mesh::IndexType > SendAi
dof id&#39;s of the sent dofs
Definition: PMesh.H:64
Border data in CSR format.
Definition: PMesh.H:60
Mesh::IndexType npart
Definition: PMesh.H:84
MeshUtilityObject & Mesh()
Definition: PMesh.H:110
std::vector< IndexType > IndexVec
Definition: Mesh.H:61
const PartInfo & Info() const
Definition: PMesh.H:113
IRAD::Comm::CommunicatorObject * CommunicatorPtr()
Definition: PMesh.H:116
std::vector< double > SendBuffer
Definition: PMesh.H:70
Mesh::IndexVec nsend
remote partition id
Definition: PMesh.H:75
Mesh::IndexType doffset
number of local nodes (convenience)
Definition: PMesh.H:92
Mesh::IndexType part
total number of partitions
Definition: PMesh.H:85
int Read(const std::string &meshname, int id)
Definition: PMesh.C:127
std::vector< double > RecvBuffer
Definition: PMesh.H:71
Mesh::IndexType remote_dofcount
hrm
Definition: PMesh.H:79
const MeshUtilityObject & Mesh() const
Definition: PMesh.H:111
Mesh::IndexType nnodes
total number of elems
Definition: PMesh.H:87
Mesh::IndexType recvsize
local id&#39;s of local nodes
Definition: PMesh.H:77
BorderData data
total num remote dofs
Definition: PMesh.H:80
Mesh::IndexVec nrecv
local id&#39;s of remote nodes
Definition: PMesh.H:76
Mesh::IndexType nborder
total number of nodes
Definition: PMesh.H:88
std::vector< Mesh::IndexType > border_dof_to_global
Definition: PMesh.H:69
MeshUtilityObject _mesh
Definition: PMesh.H:99
Mesh::IndexType nlocal
number of shared nodes owned
Definition: PMesh.H:91
Mesh::IndexType nelem
partition id
Definition: PMesh.H:86
std::vector< Mesh::IndexType > SendAp
sizes in ndof sent
Definition: PMesh.H:62
int GetBorderElements(std::vector< Mesh::IndexType > &be) const
Definition: PMesh.C:13
PartInfo _info
Definition: PMesh.H:103
IRAD::Primitive::IndexType IndexType
Definition: Mesh.H:57
Mesh::IndexType nown
number of shared nodes
Definition: PMesh.H:90
Mesh::IndexType nshared
number of borders
Definition: PMesh.H:89