Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_PointDescriptor.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 #ifndef __Panzer_PointDescriptor_hpp__
12 #define __Panzer_PointDescriptor_hpp__
13 
14 #include <string>
15 
16 #include "Teuchos_RCP.hpp"
17 
18 // forward declarations
19 namespace panzer {
20 class PointGenerator;
21 }
22 
23 // class declarations
24 namespace panzer {
25 
27 {
28 public:
29 
31  PointDescriptor() = delete;
32 
39  PointDescriptor(const std::string & type,const Teuchos::RCP<PointGenerator> & generator);
40 
42  virtual ~PointDescriptor() = default;
43 
47  bool
48  hasGenerator() const
49  {return _generator != Teuchos::null;}
50 
56  const PointGenerator & getGenerator() const { return *_generator; }
57 
64  const std::string & getType() const { return _type; }
65 
71  std::size_t getKey() const {return _key;}
72 
73 protected:
74 
81  void setup(const std::string & type,const Teuchos::RCP<PointGenerator> & generator);
82 
84  std::string _type;
85 
87  std::size_t _key;
88 
91 };
92 
93 }
94 
95 
96 namespace std {
97 
98 template <>
99 struct hash<panzer::PointDescriptor>
100 {
101  std::size_t operator()(const panzer::PointDescriptor& desc) const;
102 };
103 
104 }
105 
106 
107 #endif
std::size_t getKey() const
Get unique key associated with integrator of this order and type The key is used to sort through a ma...
virtual ~PointDescriptor()=default
Destructor.
bool hasGenerator() const
Check if the point descriptor has a generator for generating point values.
Teuchos::RCP< PointGenerator > _generator
PointGenerator object to build the points.
std::size_t _key
Unique key associated with integrator.
PointDescriptor()=delete
Default constructor, no version.
void setup(const std::string &type, const Teuchos::RCP< PointGenerator > &generator)
Setup the point descriptor. Protected and used by constructors.
std::string _type
Type string.
const PointGenerator & getGenerator() const
const std::string & getType() const
Get unique string associated with the type of point descriptor. This will be used generate a hash to ...