50 : patternBuilt_(false), dimension_(0)
54 : patternBuilt_(false), dimension_(0)
61 : patternBuilt_(false), dimension_(0)
68 std::size_t numPat = patterns.size();
72 bool no_patterns_to_construct =
true;
74 "GeometricAggFieldPattern::buildPattern requires at least one field pattern");
79 for(std::size_t i=1;i<patterns.size();i++)
80 sameGeometry &= patterns[0].second->sameGeometry(*(patterns[i].second));
82 "GeometricAggFieldPattern::buildPattern(): Patterns must "
83 "have the same geometry!");
86 cellTopo_ = patterns[0].second->getCellTopology();
89 dimension_ = patterns[0].second->getDimension();
95 subcellCount[d] = patterns[0].second->getSubcellCount(d);
104 for(std::size_t d=0;d<dimension_+1;d++) {
105 for(
int s=0;s<subcellCount[d];s++) {
107 for(std::size_t p=0;p<patterns.size();p++) {
111 const std::size_t num = ( (field->getSubcellIndices(d,s).size() > 0) ? 1 : 0 );
112 if(current.size()<num) {
113 for(
int i=num-current.size();i>0;i--,counter++)
114 current.push_back(counter);
124 for(std::size_t d=0;d<dimension_+1;d++) {
125 for(
int s=0;s<subcellCount[d];s++) {
127 for(std::size_t p=0;p<patterns.size();p++) {
131 const std::size_t num = ( (field->getSubcellIndices(d,s).size() > 0) ? 1 : 0 );
132 if(current.size()<num) {
133 for(
int i=num-current.size();i>0;i--,counter++)
134 current.push_back(counter);
148 std::vector<std::pair<FieldType,Teuchos::RCP<const FieldPattern>>> patterns;
149 patterns.push_back(std::make_pair(fieldType,pattern));
158 "GeometricAggFieldPattern::getSubcellCount() cannot be called before "
159 "GeometricAggFieldPattern::buildPattern()");
167 "GeometricAggFieldPattern::getSubcellIndices() cannot be called before "
168 "GeometricAggFieldPattern::buildPattern()");
176 "GeometricAggFieldPattern::getDimension() cannot be called before "
177 "GeometricAggFieldPattern::buildPattern()");
185 "GeometricAggFieldPattern::getCellTopology() cannot be called before "
186 "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_