Panzer Version of the Day
Loading...
Searching...
No Matches
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
17namespace panzer
18{
19
24
25IntegrationDescriptor::IntegrationDescriptor(const int cubature_order, const int integration_type, const int side)
26{
27 setup(cubature_order, integration_type, side);
28}
29
30void
31IntegrationDescriptor::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
47std::size_t
48std::hash<panzer::IntegrationDescriptor>::operator()(const panzer::IntegrationDescriptor& desc) const
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}
@ CV_BOUNDARY
Control volume side integral.
@ SIDE
Integral over all sides of cells (closed surface integral)
std::size_t _key
Unique key associated with integrator.
const int & getOrder() const
Get order of integrator.
int _side
Side associated with integration - this is for backward compatibility.
const int & getSide() const
Get side associated with integration - this is for backward compatibility.
const int & getType() const
Get type of integrator.
IntegrationDescriptor()
Constructor for empty integrator.
void setup(const int cubature_order, const int integration_type, const int side=-1)
Setup function.
int _cubature_order
Order of integration (Order of polynomial this integrator is designed for)
void hash_combine(std::size_t &seed, const T &v)