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,
 
  173         bv->evaluateValuesCV(iv->ref_ip_coordinates,
 
  178         bv->evaluateValues(iv->cub_points,
 
  182                            iv->weighted_measure,
 
  187       _basis_map[basis_description.getKey()][integration_description.getKey()] = bv;
 
  196     auto points = point_description.getGenerator().getPoints(*cell_topology);
 
  222       bv->setupArrays(b_layout);
 
  224       bv->evaluateValues(pv->coords_ref,
 
  229       _basis_map[basis_description.getKey()][point_description.getKey()] = bv;
 
  248   return *(itr->second);
 
  256   return *(itr->second);
 
  265                               "Workset::getBasisValues: Can't find basis \"" + basis_description.
getType() + 
"\" "  
  266                               "of order " + std::to_string(basis_description.
getOrder()));
 
  267   const auto & integration_map = itr->second;
 
  268   const auto itr2 = integration_map.find(integration_description.
getKey());
 
  270                               "Workset::getBasisValues: Can't find integration " + std::to_string(integration_description.
getType()) + 
" "  
  271                               "of order " + std::to_string(integration_description.
getOrder()));
 
  272   return *(itr2->second);
 
  281                               "Workset::getBasisValues: Can't find basis \"" + basis_description.
getType() + 
"\" "  
  282                               "of order " + std::to_string(basis_description.
getOrder()));
 
  283   const auto & point_map = itr->second;
 
  284   const auto itr2 = point_map.find(point_description.
getKey());
 
  286                               "Workset::getBasisValues: Can't find point values \"" + point_description.
getType() + 
"\""); 
 
  287   return *(itr2->second);
 
  296                               "Workset::getBasisValues: Can't find basis \"" + basis_description.
getType() + 
"\" "  
  297                               "of order " + std::to_string(basis_description.
getOrder()));
 
  298   const auto & integration_map = itr->second;
 
  299   const auto itr2 = integration_map.find(integration_description.
getKey());
 
  301                               "Workset::getBasisValues: Can't find integration " + std::to_string(integration_description.
getType()) + 
" "  
  302                               "of order " + std::to_string(integration_description.
getOrder()));
 
  303   return *(itr2->second);
 
  311                               "Workset::getPointValues: Can't find point values \"" + point_description.
getType() + 
"\""); 
 
  312   return *(itr->second);
 
  320   return *(itr->second);
 
  327     os << 
"Workset" << endl;
 
  328     os << 
"  block_id=" << w.
block_id << endl;
 
  329     os << 
"  num_cells:" << w.
num_cells << endl;
 
  330     os << 
"  cell_local_ids (size=" << w.
cell_local_ids.size() << 
")" << endl;
 
  334     os << 
"  ir_degrees: " << endl;
 
  335     for (std::vector<int>::const_iterator ir = w.
ir_degrees->begin();
 
  337       os << 
"    " << *ir << std::endl;
 
  339     std::vector<int>::const_iterator ir = w.
ir_degrees->begin();
 
  343       os << 
"  IR Values (Degree=" << *ir << 
"):" << endl;
 
  345       os << 
"    cub_points:" << endl;
 
  346       os << (*irv)->cub_points << endl;
 
  348       os << 
"    side_cub_points:" << endl;
 
  349       os << (*irv)->side_cub_points << endl;
 
  351       os << 
"    cub_weights:" << endl;
 
  352       os << (*irv)->cub_weights << endl;
 
  354       os << 
"    node_coordinates:" << endl;
 
  355       os << (*irv)->node_coordinates << endl;
 
  357       os << 
"    jac:" << endl;
 
  358       os << (*irv)->jac << endl;
 
  360       os << 
"    jac_inv:" << endl;
 
  361       os << (*irv)->jac_inv << endl;
 
  363       os << 
"    jac_det:" << endl;
 
  364       os << (*irv)->jac_det << endl;
 
  366       os << 
"    weighted_measure:" << endl;
 
  367       os << (*irv)->weighted_measure << endl;
 
  369       os << 
"    covarient:" << endl;
 
  370       os << (*irv)->covarient << endl;
 
  372       os << 
"    contravarient:" << endl;
 
  373       os << (*irv)->contravarient << endl;
 
  375       os << 
"    norm_contravarient:" << endl;
 
  376       os << (*irv)->norm_contravarient << endl;
 
  378       os << 
"    ip_coordinates:" << endl;
 
  379       os << (*irv)->ip_coordinates << endl;
 
  381       os << 
"    int_rule->getName():" << (*irv)->int_rule->getName() << endl;
 
  385     os << 
"  basis_names: " << endl;
 
  386     for (std::vector<std::string>::const_iterator b = w.
basis_names->begin();
 
  388       os << 
"    " << *b << std::endl;
 
  390     std::vector<std::string>::const_iterator b = w.
basis_names->begin();
 
  394       os << 
"  Basis Values (basis_name=" << *b << 
"):" << endl;
 
  422       os << 
"    basis_layout->name():" << (*bv)->basis_layout->name() << endl;
 
std::map< size_t, std::map< size_t, Teuchos::RCP< panzer::BasisValues2< double > > > > _basis_map
Control volume side integral. 
std::string element_block_name
std::map< size_t, Teuchos::RCP< const panzer::IntegrationRule > > _integration_rule_map
std::size_t getKey() const 
Get unique key associated with integrator of this order and type The key is used to sort through a ma...
std::size_t getKey() const 
Get unique key associated with integrator of this order and type The key is used to sort through a ma...
Integral over a specific side of cells (side must be set) 
std::size_t getKey() const 
Get unique key associated with basis of this order and type The key is used to sort through a map of ...
Teuchos::RCP< std::vector< int > > ir_degrees
If workset corresponds to a sub cell, what is the index? 
panzer::BasisValues2< double > & getBasisValues(const panzer::BasisDescriptor &basis_description, const panzer::IntegrationDescriptor &integration_description)
Grab the basis values for a given basis description and integration description (throws error if it d...
std::vector< Teuchos::RCP< panzer::BasisValues2< double > > > bases
Static basis function data, key is basis name, value is index in the static_bases vector...
Teuchos::RCP< std::vector< std::string > > basis_names
Value corresponds to basis type. Use the offest for indexing. 
std::map< size_t, Teuchos::RCP< const panzer::PureBasis > > _pure_basis_map
Generates a SubcellConnectivity associated with faces and cells given a partition of the local mesh...
Teuchos::RCP< const shards::CellTopology > cell_topology
const int & getType() const 
Get type of integrator. 
CellCoordArray cell_vertex_coordinates
Kokkos::View< LO * > local_cells
const std::vector< panzer::PointDescriptor > & getPoints() const 
Get a list of points being requested. 
const std::vector< panzer::BasisDescriptor > & getBases() const 
Get a list of bases being requested. 
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
const panzer::IntegrationValues2< double > & getIntegrationValues(const panzer::IntegrationDescriptor &description) const 
Grab the integration values for a given integration description (throws error if integration doesn't ...
const std::string & getType() const 
Get type of basis. 
#define TEUCHOS_TEST_FOR_EXCEPT_MSG(throw_exception_test, msg)
std::map< size_t, Teuchos::RCP< const panzer::PointRule > > _point_rule_map
void setupNeeds(Teuchos::RCP< const shards::CellTopology > cell_topology, const Kokkos::View< double ***, PHX::Device > &cell_vertices, const panzer::WorksetNeeds &needs)
const panzer::PureBasis & getBasis(const panzer::BasisDescriptor &description) const 
Grab the pure basis (contains data layouts) for a given basis description (throws error if integratio...
Teuchos::RCP< panzer::SubcellConnectivity > _face_connectivity
std::map< size_t, Teuchos::RCP< const panzer::IntegrationValues2< double > > > _integrator_map
std::vector< Teuchos::RCP< panzer::IntegrationValues2< double > > > int_rules
Kokkos::View< double ***, PHX::Device > cell_vertices
int getOrder() const 
Get order of basis. 
KOKKOS_INLINE_FUNCTION int numSubcells() const 
Gives number of subcells (e.g. faces) in connectivity. 
const panzer::IntegrationRule & getIntegrationRule(const panzer::IntegrationDescriptor &description) const 
Grab the integration rule (contains data layouts) for a given integration description (throws error i...
const std::vector< panzer::IntegrationDescriptor > & getIntegrators() const 
Get a list of integrators being requested. 
Kokkos::View< const int *, PHX::Device > cell_local_ids_k
const std::string & getType() const 
Get unique string associated with the type of point descriptor. This will be used generate a hash to ...
std::ostream & operator<<(std::ostream &os, const AssemblyEngineInArgs &in)
std::map< size_t, Teuchos::RCP< const panzer::PointValues2< double > > > _point_map
Description and data layouts associated with a particular basis. 
#define TEUCHOS_ASSERT(assertion_test)
void populateValueArrays(std::size_t num_cells, bool isSide, const WorksetNeeds &needs, WorksetDetails &details, const Teuchos::RCP< WorksetDetails > other_details)
const panzer::SubcellConnectivity & getFaceConnectivity() const 
Grab the face connectivity for this workset. 
const panzer::PointValues2< double > & getPointValues(const panzer::PointDescriptor &point_description) const 
Grab the basis values for a given basis description and integration description (throws error if it d...
std::vector< GO > cell_local_ids
const int & getOrder() const 
Get order of integrator. 
void setup(const panzer::LocalMeshPartition< int, panzer::Ordinal64 > &partition, const panzer::WorksetNeeds &needs)
Constructs the workset details from a given chunk of the mesh.