Panzer Version of the Day
Loading...
Searching...
No Matches
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
57namespace panzer {
58
59 class PointRule;
60 class CellTopologyInfo;
61 class BasisIRLayout;
62
64 Teuchos::RCP<panzer::BasisIRLayout>
65 basisIRLayout(std::string basis_type, const int basis_order, const PointRule& pt_rule);
66
68 Teuchos::RCP<panzer::BasisIRLayout>
69 basisIRLayout(const Teuchos::RCP<const PureBasis> & b, const PointRule& pt_rule);
70
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
97 Teuchos::RCP< Intrepid2::Basis<PHX::Device::execution_space,double,double> >
98 getIntrepid2Basis() const;
99
100 Teuchos::RCP<const PureBasis> getBasis() const;
101
102 void print(std::ostream & os) const;
103
104 Teuchos::RCP<const CellTopologyInfo> getCellTopologyInfo() const
105 { return cell_topo_info; }
106
107
108 public:
109
111 Teuchos::RCP<PHX::DataLayout> basis_ref;
113 Teuchos::RCP<PHX::DataLayout> basis;
115 Teuchos::RCP<PHX::DataLayout> basis_grad_ref;
117 Teuchos::RCP<PHX::DataLayout> basis_grad;
119 Teuchos::RCP<PHX::DataLayout> basis_D2_ref;
121 Teuchos::RCP<PHX::DataLayout> basis_D2;
122
124 Teuchos::RCP<PHX::DataLayout> functional;
126 Teuchos::RCP<PHX::DataLayout> functional_grad;
128 Teuchos::RCP<PHX::DataLayout> functional_D2;
129
130 private:
131 std::string basis_name_;
135
136 Teuchos::RCP<const PureBasis> basis_data_;
137
138 Teuchos::RCP<const CellTopologyInfo> cell_topo_info;
139 };
140
141 typedef std::pair<std::string,Teuchos::RCP<panzer::BasisIRLayout> > StrBasisPair;
142
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_grad
<Cell,BASIS,IP,Dim>
Teuchos::RCP< const PureBasis > basis_data_
std::string name() const
Unique key for workset indexing composed of basis name and point rule name.
std::string fieldNameD2() const
Teuchos::RCP< PHX::DataLayout > functional
<Cell,Basis>
Teuchos::RCP< const CellTopologyInfo > getCellTopologyInfo() const
BasisIRLayout(const Teuchos::RCP< const PureBasis > &b, const PointRule &int_rule)
Teuchos::RCP< const PureBasis > getBasis() const
Teuchos::RCP< const CellTopologyInfo > cell_topo_info
Teuchos::RCP< PHX::DataLayout > basis_D2
<Cell,BASIS,IP,Dim,Dim>
Teuchos::RCP< PHX::DataLayout > functional_D2
<Cell,Basis,Dim,Dim>
Teuchos::RCP< Intrepid2::Basis< PHX::Device::execution_space, double, double > > getIntrepid2Basis() const
Teuchos::RCP< PHX::DataLayout > basis_D2_ref
<BASIS,IP,Dim,Dim>
Teuchos::RCP< PHX::DataLayout > basis_grad_ref
<BASIS,IP,Dim>
std::string fieldNameD1() const
Teuchos::RCP< PHX::DataLayout > basis_ref
<BASIS,IP>
std::string fieldName() const
Teuchos::RCP< PHX::DataLayout > basis
<Cell,BASIS,IP>
void setup(const panzer::PointRule &int_rule)
void print(std::ostream &os) const
Teuchos::RCP< PHX::DataLayout > functional_grad
<Cell,Basis,Dim>
Teuchos::RCP< panzer::BasisIRLayout > basisIRLayout(std::string basis_type, const int basis_order, const PointRule &pt_rule)
Nonmember constructor.
std::pair< std::string, Teuchos::RCP< panzer::BasisIRLayout > > StrBasisPair
Simple binary comparison class to help with sorting.
bool operator()(const StrBasisPair &lhs, const StrBasisPair &rhs) const