Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_IntegrationDescriptor.cpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Panzer: A partial differential equation assembly
4 // engine for strongly coupled complex multiphysics systems
5 //
6 // Copyright 2011 NTESS and the Panzer contributors.
7 // SPDX-License-Identifier: BSD-3-Clause
8 // *****************************************************************************
9 // @HEADER
10 
12 
13 #include "Panzer_HashUtils.hpp"
14 
15 #include "Teuchos_Assert.hpp"
16 
17 namespace panzer
18 {
19 
21 {
22  setup(-1, NONE);
23 }
24 
25 IntegrationDescriptor::IntegrationDescriptor(const int cubature_order, const int integration_type, const int side)
26 {
27  setup(cubature_order, integration_type, side);
28 }
29 
30 void
31 IntegrationDescriptor::setup(const int cubature_order, const int integration_type, const int side)
32 {
33  _integration_type = integration_type;
34  _cubature_order = cubature_order;
35  _side = side;
36 
38  TEUCHOS_ASSERT(side >= 0);
39  } else {
40  TEUCHOS_ASSERT(side == -1);
41  }
42  _key = std::hash<IntegrationDescriptor>()(*this);
43 }
44 
45 }
46 
47 std::size_t
49 {
50  std::size_t seed = 0;
51 
52  panzer::hash_combine(seed,desc.getType());
53  panzer::hash_combine(seed,desc.getOrder());
54  panzer::hash_combine(seed,desc.getSide());
55 
56  return seed;
57 }
int _cubature_order
Order of integration (Order of polynomial this integrator is designed for)
IntegrationDescriptor()
Constructor for empty integrator.
const int & getType() const
Get type of integrator.
std::size_t operator()(const panzer::IntegrationDescriptor &desc) const
void setup(const int cubature_order, const int integration_type, const int side=-1)
Setup function.
std::size_t _key
Unique key associated with integrator.
const int & getSide() const
Get side associated with integration - this is for backward compatibility.
Integral over all sides of cells (closed surface integral)
void hash_combine(std::size_t &seed, const T &v)
#define TEUCHOS_ASSERT(assertion_test)
int _side
Side associated with integration - this is for backward compatibility.
const int & getOrder() const
Get order of integrator.