45 #include "Phalanx_DataLayout.hpp"
46 #include "Phalanx_DataLayout_MDALayout.hpp"
49 #include "Panzer_Workset_Builder.hpp"
58 #include "Shards_CellTopology.hpp"
68 const size_t num_cells = partition.
local_cells.extent(0);
77 Kokkos::View<int*, PHX::Device> cell_ids = Kokkos::View<int*, PHX::Device>(
"cell_ids",num_cells);
82 for(
size_t cell=0;cell<num_cells;++cell){
95 const Kokkos::View<double***,PHX::Device> & cell_vertices,
99 const size_t num_cells = cell_vertices.extent(0);
100 const size_t num_vertices_per_cell = cell_vertices.extent(1);
101 const size_t num_dims_per_vertex = cell_vertices.extent(2);
108 cell_vertex_coordinates = af.template buildStaticArray<double, Cell, NODE, Dim>(
"cell_vertices",num_cells, num_vertices_per_cell, num_dims_per_vertex);
110 for(
size_t i=0;i<num_cells;++i)
111 for(
size_t j=0;j<num_vertices_per_cell;++j)
112 for(
size_t k=0;k<num_dims_per_vertex;++k)
120 const std::vector<panzer::BasisDescriptor> & basis_descriptors = needs.
getBases();
121 const std::vector<panzer::IntegrationDescriptor> & integration_descriptors = needs.
getIntegrators();
122 const std::vector<panzer::PointDescriptor> & point_descriptors = needs.
getPoints();
160 bv->setupArrays(b_layout);
162 bv->evaluateValues(iv->ref_ip_coordinates,
166 iv->weighted_measure,
171 bv->evaluateValuesCV(iv->ref_ip_coordinates,
176 bv->evaluateValues(iv->cub_points,
180 iv->weighted_measure,
183 _basis_map[basis_description.getKey()][integration_description.getKey()] = bv;
192 auto points = point_description.getGenerator().getPoints(*cell_topology);
218 bv->setupArrays(b_layout);
220 bv->evaluateValues(pv->coords_ref,
225 _basis_map[basis_description.getKey()][point_description.getKey()] = bv;
244 return *(itr->second);
252 return *(itr->second);
261 "Workset::getBasisValues: Can't find basis \"" + basis_description.
getType() +
"\" "
262 "of order " + std::to_string(basis_description.
getOrder()));
263 const auto & integration_map = itr->second;
264 const auto itr2 = integration_map.find(integration_description.
getKey());
266 "Workset::getBasisValues: Can't find integration " + std::to_string(integration_description.
getType()) +
" "
267 "of order " + std::to_string(integration_description.
getOrder()));
268 return *(itr2->second);
277 "Workset::getBasisValues: Can't find basis \"" + basis_description.
getType() +
"\" "
278 "of order " + std::to_string(basis_description.
getOrder()));
279 const auto & point_map = itr->second;
280 const auto itr2 = point_map.find(point_description.
getKey());
282 "Workset::getBasisValues: Can't find point values \"" + point_description.
getType() +
"\"");
283 return *(itr2->second);
292 "Workset::getBasisValues: Can't find basis \"" + basis_description.
getType() +
"\" "
293 "of order " + std::to_string(basis_description.
getOrder()));
294 const auto & integration_map = itr->second;
295 const auto itr2 = integration_map.find(integration_description.
getKey());
297 "Workset::getBasisValues: Can't find integration " + std::to_string(integration_description.
getType()) +
" "
298 "of order " + std::to_string(integration_description.
getOrder()));
299 return *(itr2->second);
307 "Workset::getPointValues: Can't find point values \"" + point_description.
getType() +
"\"");
308 return *(itr->second);
316 return *(itr->second);
323 os <<
"Workset" << endl;
324 os <<
" block_id=" << w.
block_id << endl;
325 os <<
" num_cells:" << w.
num_cells << endl;
326 os <<
" cell_local_ids (size=" << w.
cell_local_ids.size() <<
")" << endl;
330 os <<
" ir_degrees: " << endl;
331 for (std::vector<int>::const_iterator ir = w.
ir_degrees->begin();
333 os <<
" " << *ir << std::endl;
335 std::vector<int>::const_iterator ir = w.
ir_degrees->begin();
339 os <<
" IR Values (Degree=" << *ir <<
"):" << endl;
341 os <<
" cub_points:" << endl;
342 os << (*irv)->cub_points << endl;
344 os <<
" side_cub_points:" << endl;
345 os << (*irv)->side_cub_points << endl;
347 os <<
" cub_weights:" << endl;
348 os << (*irv)->cub_weights << endl;
350 os <<
" node_coordinates:" << endl;
351 os << (*irv)->node_coordinates << endl;
353 os <<
" jac:" << endl;
354 os << (*irv)->jac << endl;
356 os <<
" jac_inv:" << endl;
357 os << (*irv)->jac_inv << endl;
359 os <<
" jac_det:" << endl;
360 os << (*irv)->jac_det << endl;
362 os <<
" weighted_measure:" << endl;
363 os << (*irv)->weighted_measure << endl;
365 os <<
" covarient:" << endl;
366 os << (*irv)->covarient << endl;
368 os <<
" contravarient:" << endl;
369 os << (*irv)->contravarient << endl;
371 os <<
" norm_contravarient:" << endl;
372 os << (*irv)->norm_contravarient << endl;
374 os <<
" ip_coordinates:" << endl;
375 os << (*irv)->ip_coordinates << endl;
377 os <<
" int_rule->getName():" << (*irv)->int_rule->getName() << endl;
381 os <<
" basis_names: " << endl;
382 for (std::vector<std::string>::const_iterator b = w.
basis_names->begin();
384 os <<
" " << *b << std::endl;
386 std::vector<std::string>::const_iterator b = w.
basis_names->begin();
390 os <<
" Basis Values (basis_name=" << *b <<
"):" << endl;
418 os <<
" basis_layout->name():" << (*bv)->basis_layout->name() << endl;