Panzer Version of the Day
Loading...
Searching...
No Matches
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
24
25#include <Tpetra_Map.hpp>
26#include <Tpetra_MultiVector.hpp>
27#include <Tpetra_Import.hpp>
28#include <Tpetra_Export.hpp>
29
30namespace panzer
31{
32
36template <typename LocalOrdinal,typename GlobalOrdinal>
38private:
39 FaceToElement(const FaceToElement &); // disallowed
40
41public:
42
44
45#ifndef PANZER_HIDE_DEPRECATED_CODE
50 [[deprecated]]
52#endif
53
55 const Teuchos::RCP<const Teuchos::Comm<int>> comm);
56
57#ifndef PANZER_HIDE_DEPRECATED_CODE
63 [[deprecated]]
65#endif
66
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
97protected:
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
111 Teuchos::RCP<const Map> face_map_;
112
113};
114
115}
116
117#endif
Pure virtual base class for supplying mesh connectivity information to the DOF Manager.
Teuchos::RCP< const Map > face_map_
Tpetra::MultiVector< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, NodeType > GOMultiVector
Tpetra::Export< LocalOrdinal, GlobalOrdinal, NodeType > Export
PHX::View< int *[2]> lidx_by_face_
GlobalOrdinal getLeftElem(GlobalOrdinal face_id) const
PHX::View< GlobalOrdinal *[2]> elems_by_face_
GlobalOrdinal getRightElem(GlobalOrdinal face_id) const
int getRightProc(GlobalOrdinal face_id) const
int getRightBlock(GlobalOrdinal face_id) const
int getLeftProc(GlobalOrdinal face_id) const
PHX::View< int *[2]> procs_by_face_
void initialize(panzer::ConnManager &conn)
PHX::View< const int *[2]> getFaceToCellLocalIdxMap() const
Tpetra::Map< LocalOrdinal, GlobalOrdinal, NodeType > Map
Tpetra::Import< LocalOrdinal, GlobalOrdinal, NodeType > Import
Tpetra::KokkosCompat::KokkosDeviceWrapperNode< PHX::Device > NodeType
int getLeftBlock(GlobalOrdinal face_id) const
PHX::View< int *[2]> blocks_by_face_
PHX::View< const GlobalOrdinal *[2]> getFaceToElementsMap() const
FaceToElement(const FaceToElement &)