Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_BasisInformation.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_BasisInformation_HPP
12 #define PANZER_BasisInformation_HPP
13 
14 #include <string>
15 #include "Teuchos_RCP.hpp"
16 
17 #include "Shards_CellTopology.hpp"
18 
19 namespace panzer {
20 
23 
24  public:
25  typedef enum { HGRAD=0, HCURL=1, HDIV=2, CONST=3 } EElementSpace;
26 
32  BasisInformation(const std::string & basis_type,const int basis_order,
33  const shards::CellTopology & cell_topo);
34 
36  std::string type() const
37  { return basis_type_; }
38 
40  int order() const
41  { return basis_order_; }
42 
43  const shards::CellTopology & getCellTopology() const
44  { return topology_; }
45 
47  int dimension() const
48  { return topology_.getDimension(); }
49 
51  { return element_space_; }
52 
53  bool requiresOrientations() const
54  { return getElementSpace()==HCURL || getElementSpace()==HDIV || (getElementSpace()==HGRAD && basis_order_ > 2) ; }
55 
56  bool supportsGrad() const
57  { return getElementSpace()==HGRAD; }
58 
59  bool supportsCurl() const
60  { return getElementSpace()==HCURL; }
61 
62  bool supportsDiv() const
63  { return getElementSpace()==HDIV; }
64 
65  bool isVectorBasis() const
66  { return getElementSpace()==HCURL || getElementSpace()==HDIV; }
67 
68  bool isScalarBasis() const
69  { return getElementSpace()==HGRAD || getElementSpace()==CONST; }
70 
71  private:
72 
73  shards::CellTopology topology_;
74 
75  std::string basis_type_;
77 
79  };
80 
81 }
82 
83 #endif
const shards::CellTopology & getCellTopology() const
BasisInformation(const std::string &basis_type, const int basis_order, const shards::CellTopology &cell_topo)
EElementSpace getElementSpace() const
int order() const
Returns the polynomial order of the basis.
Description and data layouts associated with a particular basis.
std::string type() const
Returns the basis type.
int dimension() const
Returns the dimension of the basis from the topology.