48 #include "Teuchos_Assert.hpp"
49 #include "Phalanx_DataLayout_MDALayout.hpp"
54 const int basis_order,
57 topology_(cell_topology),
64 PureBasis(
const std::string & basis_type,
const int basis_order,
const CellData & cell_data) :
65 topology_(cell_data.getCellTopology()),
66 num_cells_(cell_data.numCells())
75 topology_(cell_topology),
84 std::string basis_type = in_basis_type;
85 int basis_order = in_basis_order;
87 if (basis_type==
"Q1" || basis_type==
"T1") {
91 else if (basis_type ==
"Q2" || basis_type==
"T2") {
95 else if (basis_type ==
"TEdge1" || basis_type==
"QEdge1") {
99 else if(basis_type ==
"Const") {
100 basis_type =
"Const";
105 intrepid_basis_ = panzer::createIntrepid2Basis<PHX::Device::execution_space,double,double>(basis_type, basis_order, *topology_);
107 basis_type_ = basis_type;
109 std::ostringstream os;
110 os << basis_type_ <<
":" << basis_order;
111 basis_name_ = os.str();
113 field_basis_name_ =
"Basis: " + basis_name_;
114 field_basis_name_D1_ =
"Grad Basis: " + basis_name_;
115 field_basis_name_D2_ =
"D2 Basis: " + basis_name_;
117 if( basis_type_ ==
"HGrad")
118 element_space_ = HGRAD;
119 else if(basis_type_==
"HCurl")
120 element_space_ = HCURL;
121 else if(basis_type_==
"HDiv")
122 element_space_ = HDIV;
123 else if(basis_type_==
"Const")
124 element_space_ = CONST;
126 "PureBasis::initializeIntrospection - Invalid basis name \""
127 << basis_type_ <<
"\""); }
129 switch(getElementSpace()) {
148 using PHX::MDALayout;
150 cell_data =
rcp(
new MDALayout<Cell>(numCells()));
152 functional =
rcp(
new MDALayout<Cell,BASIS>(numCells(), cardinality()));
154 functional_grad =
rcp(
new MDALayout<Cell,BASIS,Dim>(numCells(),
158 coordinates =
rcp(
new MDALayout<Cell,BASIS,Dim>(numCells(),
162 functional_D2 =
rcp(
new MDALayout<Cell,BASIS,Dim,Dim>(numCells(),
167 local_mat_layout =
Teuchos::rcp(
new PHX::MDALayout<panzer::Cell, panzer::BASIS, panzer::BASIS>(
168 this->numCells(), this->cardinality(), this->cardinality()));
174 return intrepid_basis_->getCardinality();
184 return topology_->getDimension();
194 return intrepid_basis_->getDegree();
204 return field_basis_name_;
209 return field_basis_name_D1_;
214 return field_basis_name_D2_;
220 return intrepid_basis_;