Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Pane_connectivity.h
Go to the documentation of this file.
1 /* *******************************************************************
2  * Rocstar Simulation Suite *
3  * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4  * *
5  * Illinois Rocstar LLC *
6  * Champaign, IL *
7  * www.illinoisrocstar.com *
8  * sales@illinoisrocstar.com *
9  * *
10  * License: See LICENSE file in top level of distribution package or *
11  * http://opensource.org/licenses/NCSA *
12  *********************************************************************/
13 /* *******************************************************************
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17  * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21  * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22  *********************************************************************/
23 // $Id: Pane_connectivity.h,v 1.15 2008/12/06 08:43:20 mtcampbe Exp $
24 
28 /* Author: Xiangmin Jiao
29  * Date: Aug. 26, 2002
30  */
31 
32 #ifndef _PANE_CONNECTIVITY_H_
33 #define _PANE_CONNECTIVITY_H_
34 
35 #include <list>
36 
37 #include "mapbasic.h"
38 #include "roccom_devel.h"
39 #include "Simple_manifold_2.h"
40 #include "commpi.h"
41 
43 
44 class KD_tree_3;
45 
47  typedef std::vector<const COM::Pane*> Pane_set;
48  typedef MAP::Point_3<double> Point_3;
49 public:
51  explicit Pane_connectivity( const COM::Attribute *mesh,
52  MPI_Comm c=MPI_COMM_WORLD);
53 
55  explicit Pane_connectivity( const Simple_manifold_2 **mani2,
56  MPI_Comm c=MPI_COMM_WORLD);
57 
59  void compute_pconn( COM::Attribute *pconn_n,
60  COM::Attribute *pconn_f=NULL) throw(int);
61 
63  static void size_of_cpanes( const COM::Attribute *pconn, const int *pane_id,
64  int *npanes_total, int *npanes_ghost=NULL);
65 
70  static int pconn_nblocks( const COM::Attribute *pconn);
71 
74  static int pconn_offset() {
75  return _pconn_offset;
76  }
77 
78 protected:
79 
87  void create_b2map( COM::Attribute *pconn,
88  bool for_facet) throw(int);
89 
93  void create_b2map( std::vector< std::vector<int> > &b2,
94  bool for_facet) throw(int);
95 
98  double get_local_boundary_nodes( std::vector<int> &nodes,
99  std::vector<Point_3> &pnts,
100  bool for_facet) throw(int);
101 
105  double collect_boundary_nodes( std::vector<int> &nodes,
106  std::vector<Point_3> &pnts,
107  bool for_facet) throw(int);
108 
109  // Determine the nodes that coincide with given isolated points.
110  // If the last argument is present, then it is mapped to KD_tree.
111  void determine_coisolated_nodes( const COM::Pane &pn,
112  std::vector<Point_3> &pnts,
113  const double tol,
114  std::vector<bool> &is_co,
115  KD_tree_3 *tree=NULL) throw(int);
116 private:
117  void collect_nodes( const std::vector<std::vector<int> > &ns,
118  std::vector<int> &nodes,
119  std::vector<Point_3> &pnts,
120  bool for_facet);
121 
122  void collect_points( const std::vector<std::vector<int> > &ns,
123  std::vector<Point_3> &pnts);
124 
125 private:
126  const COM::Window * const _win;
129  MPI_Comm _comm;
130  static const int _pconn_offset;
131 
132 
133 };
134 
136 
137 #endif /* _PANE_CONNECTIVITY_H_ */
138 
139 
140 
141 
142 
143 
#define MAP_END_NAMESPACE
Definition: mapbasic.h:29
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_COMM_WORLD
void create_b2map(COM::Attribute *pconn, bool for_facet)
Create b2v mapping (pane connectivity) for nodes or edges and store the solution into the given Rocco...
void determine_coisolated_nodes(const COM::Pane &pn, std::vector< Point_3 > &pnts, const double tol, std::vector< bool > &is_co, KD_tree_3 *tree=NULL)
void collect_nodes(const std::vector< std::vector< int > > &ns, std::vector< int > &nodes, std::vector< Point_3 > &pnts, bool for_facet)
An Attribute object is a data member of a window.
Definition: Attribute.h:51
const Pane_set _panes
A Window object contains multiple panes and multiple data attributes.
Definition: Window.h:42
void compute_pconn(COM::Attribute *pconn_n, COM::Attribute *pconn_f=NULL)
Create b2v mapping for nodes and facets (edges or faces) correspondence.
void collect_points(const std::vector< std::vector< int > > &ns, std::vector< Point_3 > &pnts)
static const int _pconn_offset
static int pconn_offset()
Retrieve an offset to avoid the number of communicating panes when reading a pconn attribute...
MAP::Point_3< double > Point_3
double collect_boundary_nodes(std::vector< int > &nodes, std::vector< Point_3 > &pnts, bool for_facet)
Collect the boundary nodes of all panes that are coincident with the boundary nodes of local panes...
Contains declarations of MPI subroutines used in Roccom.
Provides a data structure accessing nodes, elements, and edges in a pane, in a manner similar to the ...
std::vector< const COM::Pane * > Pane_set
const COM::Window *const _win
Pane_connectivity(const COM::Attribute *mesh, MPI_Comm c=MPI_COMM_WORLD)
Constructors.
double get_local_boundary_nodes(std::vector< int > &nodes, std::vector< Point_3 > &pnts, bool for_facet)
Obtains the IDs and coordinates of boundary nodes of all local panes.
#define MAP_BEGIN_NAMESPACE
Definition: mapbasic.h:28
const Simple_manifold_2 ** _mani2
static void size_of_cpanes(const COM::Attribute *pconn, const int *pane_id, int *npanes_total, int *npanes_ghost=NULL)
Get the number of communicating panes.
static int pconn_nblocks(const COM::Attribute *pconn)
Determine the number of pconn blocks for all panes.