Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_FaceToElement.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Panzer: A partial differential equation assembly
4 // engine for strongly coupled complex multiphysics systems
5 //
6 // Copyright 2011 NTESS and the Panzer contributors.
7 // SPDX-License-Identifier: BSD-3-Clause
8 // *****************************************************************************
9 // @HEADER
10 
11 /*
12  * FaceToElement.hpp
13  *
14  * Created on: Nov 15, 2016
15  * Author: mbetten
16  */
17 
18 #ifndef PANZER_FACE_TO_ELEMENT_HPP
19 #define PANZER_FACE_TO_ELEMENT_HPP
20 
21 #include "Phalanx_KokkosDeviceTypes.hpp"
22 
23 #include "Panzer_ConnManager.hpp"
24 
25 #include <Tpetra_Map.hpp>
26 #include <Tpetra_MultiVector.hpp>
27 #include <Tpetra_Import.hpp>
28 #include <Tpetra_Export.hpp>
29 
30 namespace panzer
31 {
32 
36 template <typename LocalOrdinal,typename GlobalOrdinal>
38 private:
39  FaceToElement(const FaceToElement &); // disallowed
40 
41 public:
42 
43  FaceToElement();
44 
45 #ifndef PANZER_HIDE_DEPRECATED_CODE
46 
50  [[deprecated]]
52 #endif
53 
55  const Teuchos::RCP<const Teuchos::Comm<int>> comm);
56 
57 #ifndef PANZER_HIDE_DEPRECATED_CODE
58 
63  [[deprecated]]
64  void initialize(panzer::ConnManager & conn);
65 #endif
66 
69  void initialize(panzer::ConnManager & conn,
70  const Teuchos::RCP<const Teuchos::Comm<int>> comm);
71 
72 
73  GlobalOrdinal getLeftElem (GlobalOrdinal face_id) const
74  {LocalOrdinal lid = face_map_->getLocalElement(face_id); return elems_by_face_(lid,0);}
75 
76  GlobalOrdinal getRightElem(GlobalOrdinal face_id) const
77  {LocalOrdinal lid = face_map_->getLocalElement(face_id); return elems_by_face_(lid,1);}
78 
79  int getLeftBlock (GlobalOrdinal face_id) const
80  {LocalOrdinal lid = face_map_->getLocalElement(face_id); return blocks_by_face_(lid,0);}
81 
82  int getRightBlock(GlobalOrdinal face_id) const
83  {LocalOrdinal lid = face_map_->getLocalElement(face_id); return blocks_by_face_(lid,1);}
84 
85  int getLeftProc (GlobalOrdinal face_id) const
86  {LocalOrdinal lid = face_map_->getLocalElement(face_id); return procs_by_face_(lid,0);}
87 
88  int getRightProc (GlobalOrdinal face_id) const
89  {LocalOrdinal lid = face_map_->getLocalElement(face_id); return procs_by_face_(lid,1);}
90 
91  PHX::View<const GlobalOrdinal*[2]> getFaceToElementsMap() const
92  { return elems_by_face_; }
93 
94  PHX::View<const int*[2]> getFaceToCellLocalIdxMap() const
95  { return lidx_by_face_; }
96 
97 protected:
98 
99  PHX::View<GlobalOrdinal *[2]> elems_by_face_;
100  PHX::View<int *[2]> lidx_by_face_;
101  PHX::View<int *[2]> blocks_by_face_;
102  PHX::View<int *[2]> procs_by_face_;
103 
104  typedef Tpetra::KokkosCompat::KokkosDeviceWrapperNode<PHX::Device> NodeType;
105  typedef Tpetra::Map<LocalOrdinal, GlobalOrdinal, NodeType> Map;
106  typedef Tpetra::Export<LocalOrdinal, GlobalOrdinal, NodeType> Export;
107  typedef Tpetra::Import<LocalOrdinal, GlobalOrdinal, NodeType> Import;
108  typedef Tpetra::MultiVector<GlobalOrdinal, LocalOrdinal, GlobalOrdinal, NodeType> GOMultiVector;
109 
110 
112 
113 };
114 
115 }
116 
117 #endif
Teuchos::RCP< const Map > face_map_
PHX::View< int *[2]> blocks_by_face_
GlobalOrdinal getRightElem(GlobalOrdinal face_id) const
GlobalOrdinal getLeftElem(GlobalOrdinal face_id) const
Tpetra::Import< LocalOrdinal, GlobalOrdinal, NodeType > Import
PHX::View< int *[2]> procs_by_face_
Tpetra::KokkosCompat::KokkosDeviceWrapperNode< PHX::Device > NodeType
void initialize(panzer::ConnManager &conn)
Tpetra::Map< LocalOrdinal, GlobalOrdinal, NodeType > Map
PHX::View< const GlobalOrdinal *[2]> getFaceToElementsMap() const
int getRightProc(GlobalOrdinal face_id) const
PHX::View< GlobalOrdinal *[2]> elems_by_face_
Pure virtual base class for supplying mesh connectivity information to the DOF Manager.
int getLeftBlock(GlobalOrdinal face_id) const
PHX::View< int *[2]> lidx_by_face_
int getLeftProc(GlobalOrdinal face_id) const
Tpetra::Export< LocalOrdinal, GlobalOrdinal, NodeType > Export
Tpetra::MultiVector< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, NodeType > GOMultiVector
PHX::View< const int *[2]> getFaceToCellLocalIdxMap() const
int getRightBlock(GlobalOrdinal face_id) const