accu.template
|
#include <par_geom.h>
Public Member Functions | |
ParMesh (int ndim, int nvert_e=0, int ndof_e=0, int nedge_e=0, MPI_Comm const &icomm=MPI_COMM_WORLD) | |
ParMesh (ParMesh const &)=default | |
ParMesh & | operator= (ParMesh const &)=delete |
virtual | ~ParMesh () |
ParMesh (std::string const &sname, MPI_Comm const &icomm=MPI_COMM_WORLD) | |
void | VecAccu (std::vector< double > &w) const |
double | dscapr (std::vector< double > const &x, std::vector< double > const &y) const |
int | MyRank () const |
int | NumProcs () const |
MPI_Comm | GetCommunicator () const |
Public Member Functions inherited from Mesh | |
Mesh (int ndim, int nvert_e=0, int ndof_e=0, int nedge_e=0) | |
__attribute__ ((noinline)) Mesh(Mesh const &)=default | |
Mesh & | operator= (Mesh const &)=delete |
virtual | ~Mesh () |
Mesh (std::string const &fname) | |
void | ReadVertexBasedMesh (std::string const &fname) |
int | Nelems () const |
int | NverticesElements () const |
int | NdofsElement () const |
int | Nnodes () const |
int | Ndims () const |
void | Resize_Connectivity (int nelem, int nvert_e) |
const std::vector< int > & | GetConnectivity () const |
std::vector< int > & | GetConnectivity () |
void | Resize_Coords (int nnodes, int ndim) |
const std::vector< double > & | GetCoords () const |
std::vector< double > & | GetCoords () |
void | SetValues (std::vector< double > &v, const std::function< double(double, double)> &func) const |
void | SetBoundaryValues (std::vector< double > &v, const std::function< double(double, double)> &func) const |
void | SetDirchletValues (std::vector< double > &v, const std::function< double(double, double)> &func) const |
void | Debug () const |
void | DebugEdgeBased () const |
virtual std::vector< int > | Index_DirichletNodes () const |
virtual std::vector< int > | Index_BoundaryNodes () const |
void | Write_ascii_matlab (std::string const &fname, std::vector< double > const &v) const |
void | Export_scicomp (std::string const &basename) const |
void | Visualize (std::vector< double > const &v) const |
int | Nedges () const |
int | NedgesElements () const |
const std::vector< int > & | GetEdgeConnectivity () const |
std::vector< int > & | GetEdgeConnectivity () |
const std::vector< int > & | GetEdges () const |
std::vector< int > & | GetEdges () |
std::vector< std::vector< int > > | Node2NodeGraph () const |
virtual const std::vector< int > & | GetFathersOfVertices () const |
void | Del_EdgeConnectivity () |
Private Member Functions | |
std::vector< int > | ReadElementSubdomains (std::string const &dname) |
void | Transform_Local2Global_Vertex (int myrank, std::vector< int > const &t2d) |
void | Generate_VectorAdd () |
bool | CheckInterfaceExchange_InPlace () const |
bool | CheckInterfaceExchange () const |
bool | CheckInterfaceAdd_InPlace () const |
bool | CheckInterfaceAdd () const |
Private Attributes | |
const MPI_Comm | _icomm |
MPI communicator for the group of processes. More... | |
int | _numprocs |
number of MPI processes More... | |
int | _myrank |
my MPI rank More... | |
std::vector< int > | _v_l2g |
vertices: local to global mapping More... | |
std::vector< int > | _t_l2g |
triangles: local to global mapping More... | |
std::map< int, int > | _v_g2l |
vertices: global to local mapping More... | |
std::map< int, int > | _t_g2l |
triangles: global to local mapping More... | |
std::vector< int > | _valence |
valence of local vertices, i.e. number of subdomains they belong to More... | |
std::vector< double > | _sendbuf |
send buffer a n d receiving buffer (MPI_IN_PLACE) More... | |
std::vector< int > | _sendcounts |
number of data to send to each MPI rank (the same as for recv) More... | |
std::vector< int > | _sdispls |
offset of data to send to each MPI rank wrt. _senbuffer (the same as for recv) More... | |
std::vector< int > | _loc_itf |
local index of interface vertex lk More... | |
std::vector< int > | _gloc_itf |
global index of interface vertex lk More... | |
std::vector< int > | _buf2loc |
local indices of sendbuffer positions (the same as for recv) More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Mesh | |
void | SetNelem (int nelem) |
void | SetNverticesElement (int nvert) |
void | SetNdofsElement (int ndof) |
void | SetNnode (int nnode) |
void | SetNdim (int ndim) |
void | SetNedge (int nedge) |
void | ReadVectexBasedMesh (std::string const &fname) |
void | DeriveEdgeFromVertexBased () |
void | DeriveEdgeFromVertexBased_slow () |
void | DeriveEdgeFromVertexBased_fast () |
void | DeriveEdgeFromVertexBased_fast_2 () |
void | DeriveVertexFromEdgeBased () |
int | Nnbedges () const |
virtual bool | Check_array_dimensions () const |
void | PermuteVertices_EdgeBased (std::vector< int > const &old2new) |
Protected Attributes inherited from Mesh | |
int | _nelem |
number elements More... | |
int | _nvert_e |
number of vertices per element More... | |
int | _ndof_e |
degrees of freedom (d.o.f.) per element More... | |
int | _nnode |
number nodes/vertices More... | |
int | _ndim |
space dimension of the problem (1, 2, or 3) More... | |
std::vector< int > | _ia |
element connectivity More... | |
std::vector< double > | _xc |
coordinates More... | |
std::vector< int > | _bedges |
boundary edges [nbedges][2] storing start/end vertex More... | |
std::vector< int > | _sdedges |
boundary edges [nbedges][2] with left/right subdomain number More... | |
int | _nedge |
number of edges in mesh More... | |
int | _nedge_e |
number of edges per element More... | |
std::vector< int > | _edges |
edges of mesh (vertices ordered ascending) More... | |
std::vector< int > | _ea |
edge based element connectivity More... | |
std::vector< int > | _ebedges |
boundary edges [nbedges] More... | |
Definition at line 14 of file par_geom.h.
|
explicit |
Constructor initializing the members with default values.
[in] | ndim | space dimensions (dimension for coordinates) |
[in] | nvert_e | number of vertices per element (dimension for connectivity) |
[in] | ndof_e | degrees of freedom per element (= nvert_e for linear elements) |
[in] | nedge_e | number of edges per element (= nvert_e for linear elements in 2D) |
[in] | icomm | MPI communicator |
Definition at line 21 of file par_geom.cpp.
|
default |
|
virtual |
|
explicit |
Reads mesh data from a binary file.
[in] | sname | suffix of file name |
[in] | icomm | MPI communicator |
Definition at line 37 of file par_geom.cpp.
|
private |
Definition at line 474 of file par_geom.cpp.
|
private |
Definition at line 438 of file par_geom.cpp.
|
private |
Definition at line 406 of file par_geom.cpp.
|
private |
Definition at line 377 of file par_geom.cpp.
|
inline |
Inner product
[in] | x | vector |
[in] | y | vector |
Definition at line 57 of file par_geom.h.
|
private |
Transform
Definition at line 192 of file par_geom.cpp.
|
inline |
|
inline |
MPI rank of the calling process in communication group.
Definition at line 98 of file par_geom.h.
|
inline |
Number of MPI processes in communication group.
Definition at line 107 of file par_geom.h.
|
private |
Reads the global triangle to subdomain mapping.
[in] | dname | file name |
Definition at line 75 of file par_geom.cpp.
|
private |
Transform
[in] | myrank | MPI rank of this process |
[in] | t2d | global mapping triangle to subdomain for all elements (vertex based) |
Definition at line 106 of file par_geom.cpp.
void ParMesh::VecAccu | ( | std::vector< double > & | w | ) | const |
Definition at line 517 of file par_geom.cpp.
|
private |
local indices of sendbuffer positions (the same as for recv)
Definition at line 141 of file par_geom.h.
|
private |
global index of interface vertex lk
Definition at line 140 of file par_geom.h.
|
private |
MPI communicator for the group of processes.
Definition at line 122 of file par_geom.h.
|
private |
local index of interface vertex lk
Definition at line 139 of file par_geom.h.
|
private |
my MPI rank
Definition at line 124 of file par_geom.h.
|
private |
number of MPI processes
Definition at line 123 of file par_geom.h.
|
private |
offset of data to send to each MPI rank wrt. _senbuffer (the same as for recv)
Definition at line 136 of file par_geom.h.
|
mutableprivate |
send buffer a n d receiving buffer (MPI_IN_PLACE)
Definition at line 134 of file par_geom.h.
|
private |
number of data to send to each MPI rank (the same as for recv)
Definition at line 135 of file par_geom.h.
|
private |
triangles: global to local mapping
Definition at line 128 of file par_geom.h.
|
private |
triangles: local to global mapping
Definition at line 126 of file par_geom.h.
|
private |
vertices: global to local mapping
Definition at line 127 of file par_geom.h.
|
private |
vertices: local to global mapping
Definition at line 125 of file par_geom.h.
|
private |
valence of local vertices, i.e. number of subdomains they belong to
Definition at line 132 of file par_geom.h.