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#include "Panzer_NodeType.hpp"
25
26#include <Tpetra_Map.hpp>
27#include <Tpetra_MultiVector.hpp>
28#include <Tpetra_Import.hpp>
29#include <Tpetra_Export.hpp>
30
31namespace panzer
32{
33
37template <typename LocalOrdinal,typename GlobalOrdinal>
39private:
40 FaceToElement(const FaceToElement &); // disallowed
41
42public:
43
45
47 const Teuchos::RCP<const Teuchos::Comm<int>> comm);
48
52 const Teuchos::RCP<const Teuchos::Comm<int>> comm);
53
54
55 GlobalOrdinal getLeftElem (GlobalOrdinal face_id) const
56 {LocalOrdinal lid = face_map_->getLocalElement(face_id); return elems_by_face_(lid,0);}
57
58 GlobalOrdinal getRightElem(GlobalOrdinal face_id) const
59 {LocalOrdinal lid = face_map_->getLocalElement(face_id); return elems_by_face_(lid,1);}
60
61 int getLeftBlock (GlobalOrdinal face_id) const
62 {LocalOrdinal lid = face_map_->getLocalElement(face_id); return blocks_by_face_(lid,0);}
63
64 int getRightBlock(GlobalOrdinal face_id) const
65 {LocalOrdinal lid = face_map_->getLocalElement(face_id); return blocks_by_face_(lid,1);}
66
67 int getLeftProc (GlobalOrdinal face_id) const
68 {LocalOrdinal lid = face_map_->getLocalElement(face_id); return procs_by_face_(lid,0);}
69
70 int getRightProc (GlobalOrdinal face_id) const
71 {LocalOrdinal lid = face_map_->getLocalElement(face_id); return procs_by_face_(lid,1);}
72
73 PHX::View<const GlobalOrdinal*[2]> getFaceToElementsMap() const
74 { return elems_by_face_; }
75
76 PHX::View<const int*[2]> getFaceToCellLocalIdxMap() const
77 { return lidx_by_face_; }
78
79protected:
80
81 PHX::View<GlobalOrdinal *[2]> elems_by_face_;
82 PHX::View<int *[2]> lidx_by_face_;
83 PHX::View<int *[2]> blocks_by_face_;
84 PHX::View<int *[2]> procs_by_face_;
85
87 typedef Tpetra::Map<LocalOrdinal, GlobalOrdinal, NodeType> Map;
88 typedef Tpetra::Export<LocalOrdinal, GlobalOrdinal, NodeType> Export;
89 typedef Tpetra::Import<LocalOrdinal, GlobalOrdinal, NodeType> Import;
90 typedef Tpetra::MultiVector<GlobalOrdinal, LocalOrdinal, GlobalOrdinal, NodeType> GOMultiVector;
91
92
93 Teuchos::RCP<const Map> face_map_;
94
95};
96
97}
98
99#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_
panzer::TpetraNodeType NodeType
GlobalOrdinal getLeftElem(GlobalOrdinal face_id) const
void initialize(panzer::ConnManager &conn, const Teuchos::RCP< const Teuchos::Comm< int > > comm)
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_
PHX::View< const int *[2]> getFaceToCellLocalIdxMap() const
Tpetra::Map< LocalOrdinal, GlobalOrdinal, NodeType > Map
Tpetra::Import< LocalOrdinal, GlobalOrdinal, NodeType > Import
int getLeftBlock(GlobalOrdinal face_id) const
PHX::View< int *[2]> blocks_by_face_
PHX::View< const GlobalOrdinal *[2]> getFaceToElementsMap() const
FaceToElement(const FaceToElement &)
Tpetra::KokkosCompat::KokkosDeviceWrapperNode< PHX::ExecutionSpace, PHX::MemorySpace > TpetraNodeType
The Kokkos node type used to instantiate all Tpetra objects (Map, MultiVector, CrsGraph,...