Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_ElemFieldPattern.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 "Teuchos_Assert.hpp"
14#include "Shards_CellTopology.hpp"
15
16namespace panzer {
17
18ElemFieldPattern::ElemFieldPattern(const shards::CellTopology & ct)
19{
21}
22
23void ElemFieldPattern::setCellTopology(const shards::CellTopology & ct)
24{
25 cellTopo_ = ct;
26
27 // allocate the space and setup the indices
28 ElemIndices_.clear();
29 ElemIndices_.resize(1);
30 for(std::size_t n=0;n<ElemIndices_.size();n++)
31 ElemIndices_[n].push_back(n);
32}
33
35{
36 const shards::CellTopology ct = getCellTopology();
37 return ct.getSubcellCount(dim);
38}
39
40const std::vector<int> & ElemFieldPattern::getSubcellIndices(int dim,int cellIndex) const
41{
42 if(dim==getDimension())
43 return ElemIndices_[cellIndex];
44
45 // only Elems
46 return empty_;
47}
48
49void ElemFieldPattern::getSubcellClosureIndices(int /* dim */, int /* cellIndex */, std::vector<int>& /* indices */) const
50{
51 TEUCHOS_TEST_FOR_EXCEPTION(true,std::logic_error,
52 "ElemFieldPattern::getSubcellClosureIndices should not be called");
53}
54
56{
57 const shards::CellTopology ct = getCellTopology();
58 return ct.getDimension();
59}
60
61}
std::vector< std::vector< int > > ElemIndices_
virtual const std::vector< int > & getSubcellIndices(int dim, int cellIndex) const
virtual void getSubcellClosureIndices(int dim, int cellIndex, std::vector< int > &indices) const
virtual shards::CellTopology getCellTopology() const
void setCellTopology(const shards::CellTopology &ct)
Set the cell topology for this field pattern.
virtual int getSubcellCount(int dim) const