Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_BasisIRLayout.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Panzer: A partial differential equation assembly
5 // engine for strongly coupled complex multiphysics systems
6 // Copyright (2011) Sandia Corporation
7 //
8 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 // the U.S. Government retains certain rights in this software.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact Roger P. Pawlowski (rppawlo@sandia.gov) and
39 // Eric C. Cyr (eccyr@sandia.gov)
40 // ***********************************************************************
41 // @HEADER
42 
43 
44 #ifndef PANZER_BASIS_HPP
45 #define PANZER_BASIS_HPP
46 
47 #include <string>
48 #include "Teuchos_RCP.hpp"
49 #include "Phalanx_DataLayout.hpp"
50 #include "Kokkos_DynRankView.hpp"
51 #include "Intrepid2_Basis.hpp"
52 
53 #include "Panzer_Dimension.hpp"
54 #include "Panzer_PureBasis.hpp"
56 
57 namespace panzer {
58 
59  class PointRule;
60  class CellTopologyInfo;
61  class BasisIRLayout;
62 
65  basisIRLayout(std::string basis_type, const int basis_order, const PointRule& pt_rule);
66 
69  basisIRLayout(const Teuchos::RCP<const PureBasis> & b, const PointRule& pt_rule);
70 
71  class BasisIRLayout {
72 
73  public:
74 
75  BasisIRLayout(std::string basis_type, const int basis_order, const PointRule& int_rule);
76  BasisIRLayout(const Teuchos::RCP<const PureBasis> & b, const PointRule& int_rule);
77 
78  void setup(const panzer::PointRule & int_rule);
79 
80  int cardinality() const;
81 
82  int numCells() const;
83 
84  int numPoints() const;
85 
86  int dimension() const;
87 
89  std::string name() const;
90 
91  std::string fieldName() const;
92 
93  std::string fieldNameD1() const;
94 
95  std::string fieldNameD2() const;
96 
98  getIntrepid2Basis() const;
99 
101 
102  void print(std::ostream & os) const;
103 
105  { return cell_topo_info; }
106 
107 
108  public:
109 
122 
129 
130  private:
131  std::string basis_name_;
135 
137 
139  };
140 
141  typedef std::pair<std::string,Teuchos::RCP<panzer::BasisIRLayout> > StrBasisPair;
142 
144  struct StrBasisComp {
145  bool operator() (const StrBasisPair & lhs, const StrBasisPair & rhs) const
146  {return lhs.first<rhs.first;}
147  };
148 
149 }
150 
151 #endif
Teuchos::RCP< PHX::DataLayout > basis_ref
&lt;BASIS,IP&gt;
Teuchos::RCP< PHX::DataLayout > basis_D2_ref
&lt;BASIS,IP,Dim,Dim&gt;
Teuchos::RCP< PHX::DataLayout > functional_D2
&lt;Cell,Basis,Dim,Dim&gt;
Teuchos::RCP< Intrepid2::Basis< PHX::Device::execution_space, double, double > > getIntrepid2Basis() const
Teuchos::RCP< const CellTopologyInfo > getCellTopologyInfo() const
BasisIRLayout(std::string basis_type, const int basis_order, const PointRule &int_rule)
void print(std::ostream &os) const
Teuchos::RCP< PHX::DataLayout > basis_grad
&lt;Cell,BASIS,IP,Dim&gt;
Teuchos::RCP< const PureBasis > getBasis() const
Teuchos::RCP< panzer::BasisIRLayout > basisIRLayout(std::string basis_type, const int basis_order, const PointRule &pt_rule)
Nonmember constructor.
std::string fieldNameD2() const
Teuchos::RCP< PHX::DataLayout > functional_grad
&lt;Cell,Basis,Dim&gt;
bool operator()(const StrBasisPair &lhs, const StrBasisPair &rhs) const
Teuchos::RCP< const CellTopologyInfo > cell_topo_info
std::string fieldName() const
Teuchos::RCP< PHX::DataLayout > basis_grad_ref
&lt;BASIS,IP,Dim&gt;
Teuchos::RCP< PHX::DataLayout > basis_D2
&lt;Cell,BASIS,IP,Dim,Dim&gt;
std::string name() const
Unique key for workset indexing composed of basis name and point rule name.
Teuchos::RCP< PHX::DataLayout > basis
&lt;Cell,BASIS,IP&gt;
std::string fieldNameD1() const
Simple binary comparison class to help with sorting.
void setup(const panzer::PointRule &int_rule)
std::pair< std::string, Teuchos::RCP< panzer::BasisIRLayout > > StrBasisPair
Teuchos::RCP< PHX::DataLayout > functional
&lt;Cell,Basis&gt;
Teuchos::RCP< const PureBasis > basis_data_