18 : patternBuilt_(false), dimension_(0)
22 : patternBuilt_(false), dimension_(0)
29 : patternBuilt_(false), dimension_(0)
36 std::size_t numPat = patterns.size();
40 bool no_patterns_to_construct =
true;
42 "GeometricAggFieldPattern::buildPattern requires at least one field pattern");
47 for(std::size_t i=1;i<patterns.size();i++)
48 sameGeometry &= patterns[0].second->sameGeometry(*(patterns[i].second));
50 "GeometricAggFieldPattern::buildPattern(): Patterns must "
51 "have the same geometry!");
54 cellTopo_ = patterns[0].second->getCellTopology();
57 dimension_ = patterns[0].second->getDimension();
63 subcellCount[d] = patterns[0].second->getSubcellCount(d);
72 for(std::size_t d=0;d<dimension_+1;d++) {
73 for(
int s=0;s<subcellCount[d];s++) {
75 for(std::size_t p=0;p<patterns.size();p++) {
79 const std::size_t num = ( (field->getSubcellIndices(d,s).size() > 0) ? 1 : 0 );
80 if(current.size()<num) {
81 for(
int i=num-current.size();i>0;i--,counter++)
82 current.push_back(counter);
92 for(std::size_t d=0;d<dimension_+1;d++) {
93 for(
int s=0;s<subcellCount[d];s++) {
95 for(std::size_t p=0;p<patterns.size();p++) {
99 const std::size_t num = ( (field->getSubcellIndices(d,s).size() > 0) ? 1 : 0 );
100 if(current.size()<num) {
101 for(
int i=num-current.size();i>0;i--,counter++)
102 current.push_back(counter);
116 std::vector<std::pair<FieldType,Teuchos::RCP<const FieldPattern>>> patterns;
117 patterns.push_back(std::make_pair(fieldType,pattern));
126 "GeometricAggFieldPattern::getSubcellCount() cannot be called before "
127 "GeometricAggFieldPattern::buildPattern()");
135 "GeometricAggFieldPattern::getSubcellIndices() cannot be called before "
136 "GeometricAggFieldPattern::buildPattern()");
144 "GeometricAggFieldPattern::getDimension() cannot be called before "
145 "GeometricAggFieldPattern::buildPattern()");
153 "GeometricAggFieldPattern::getCellTopology() cannot be called before "
154 "GeometricAggFieldPattern::buildPattern()");
virtual int getDimension() const
std::vector< std::vector< std::vector< int > > > patternData_
virtual const std::vector< int > & getSubcellIndices(int dim, int cellIndex) const
virtual bool sameGeometry(const FieldPattern &fp) const
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
GeometricAggFieldPattern()
FieldType
The type of discretization to use for a field pattern.
virtual int getSubcellCount(int dim) const
Continuous Galerkin Formulation.
PHX::MDField< ScalarT, panzer::Cell, panzer::BASIS > field
A field to which we'll contribute, or in which we'll store, the result of computing this integral...
virtual void buildPattern(const std::vector< std::pair< FieldType, Teuchos::RCP< const FieldPattern >>> &patterns)
virtual shards::CellTopology getCellTopology() const
shards::CellTopology cellTopo_