Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
panzer::FieldAggPattern Class Reference

#include <Panzer_FieldAggPattern.hpp>

Inheritance diagram for panzer::FieldAggPattern:
Inheritance graph
[legend]

Classes

struct  LessThan
 

Public Member Functions

 FieldAggPattern ()
 
 FieldAggPattern (std::vector< std::tuple< int, panzer::FieldType, Teuchos::RCP< const FieldPattern > > > &patterns, const Teuchos::RCP< const FieldPattern > &geomAggPattern=Teuchos::null)
 
virtual ~FieldAggPattern ()
 
virtual Teuchos::RCP< const
FieldPattern
getGeometricAggFieldPattern () const
 
virtual void buildPattern (const std::vector< std::tuple< int, panzer::FieldType, Teuchos::RCP< const FieldPattern > > > &patterns, const Teuchos::RCP< const FieldPattern > &geomAggPattern=Teuchos::null)
 
virtual int getDimension () const
 
virtual int getSubcellCount (int dimension) const
 
virtual const std::vector< int > & getSubcellIndices (int dimension, int subcell) const
 
virtual void getSubcellClosureIndices (int, int, std::vector< int > &) const
 
virtual shards::CellTopology getCellTopology () const
 
virtual void print (std::ostream &os) const
 Print this pattern. More...
 
virtual Teuchos::RCP< const
FieldPattern
getFieldPattern (int fieldId) const
 
virtual FieldType getFieldType (int fieldId) const
 
const std::vector< int > & numFieldsPerId () const
 Lenght of vector is number of Ids, value is how many ids per field. More...
 
const std::vector< int > & fieldIds () const
 
const std::vector< int > & localOffsets (int fieldId) const
 
const PHX::View< const int * > localOffsetsKokkos (int fieldId) const
 
const std::pair< std::vector
< int >, std::vector< int > > & 
localOffsets_closure (int fieldId, int subcellDim, int subcellId) const
 
- Public Member Functions inherited from panzer::FieldPattern
virtual ~FieldPattern ()=0
 Do nothing destructor. More...
 
virtual int numberIds () const
 
virtual bool sameGeometry (const FieldPattern &fp) const
 
virtual bool consistentSubcells () const
 
virtual bool equals (const FieldPattern &fp) const
 

Protected Types

typedef Teuchos::RCP< const
FieldPattern
FPPtr
 

Protected Member Functions

void buildFieldIdToPatternIdx ()
 
void buildFieldIdsVector ()
 
void mergeFieldPatterns (const FieldType &fieldType)
 
void addAllPatternSubcellIndices (int dim, int sc, std::vector< int > &indices)
 
void buildFieldPatternData ()
 
void localOffsets_build (int fieldId, std::vector< int > &offsets) const
 

Protected Attributes

std::size_t dimension_
 
Teuchos::RCP< const FieldPatterngeomAggPattern_
 
std::vector< std::vector
< std::vector< int > > > 
patternData_
 
std::vector< int > numFields_
 
std::vector< int > fieldIds_
 
std::vector< std::tuple< int,
panzer::FieldType,
Teuchos::RCP< const
FieldPattern > > > 
patterns_
 
std::map< int, int > fieldIdToPatternIdx_
 
std::map< int, std::vector< int > > fieldOffsets_
 Stores the Field offsets for the fieldId key. Note that the key is the fieldId, not the index into the patterns_. More...
 
std::map< int, PHX::View< int * > > fieldOffsetsKokkos_
 Stores the Field offsets for the fieldId key. Note that the key is the fieldId, not the index into the patterns_. More...
 
std::map< Teuchos::Tuple< int, 3 >
, std::pair< std::vector< int >
, std::vector< int >
>, LessThan
fieldSubcellOffsets_closure_
 

Detailed Description

This class performs the interlacing between all the passed in field pattern. It is meant to be used internally and is specialized to return the FEI arrays required. Hence it requires a map containing both the desired field pattern objects and the integer used by FEI to specify the field.

Definition at line 66 of file Panzer_FieldAggPattern.hpp.

Member Typedef Documentation

Definition at line 199 of file Panzer_FieldAggPattern.hpp.

Constructor & Destructor Documentation

panzer::FieldAggPattern::FieldAggPattern ( )

Definition at line 52 of file Panzer_FieldAggPattern.cpp.

panzer::FieldAggPattern::FieldAggPattern ( std::vector< std::tuple< int, panzer::FieldType, Teuchos::RCP< const FieldPattern > > > &  patterns,
const Teuchos::RCP< const FieldPattern > &  geomAggPattern = Teuchos::null 
)

Automatically calls buildPattern

Definition at line 56 of file Panzer_FieldAggPattern.cpp.

virtual panzer::FieldAggPattern::~FieldAggPattern ( )
inlinevirtual

Definition at line 78 of file Panzer_FieldAggPattern.hpp.

Member Function Documentation

Teuchos::RCP< const FieldPattern > panzer::FieldAggPattern::getGeometricAggFieldPattern ( ) const
virtual

Return the geometric field pattern associated with the set of field patterns.

Definition at line 62 of file Panzer_FieldAggPattern.cpp.

void panzer::FieldAggPattern::buildPattern ( const std::vector< std::tuple< int, panzer::FieldType, Teuchos::RCP< const FieldPattern > > > &  patterns,
const Teuchos::RCP< const FieldPattern > &  geomAggPattern = Teuchos::null 
)
virtual

Build the pattern associated with a set of patterns with their field IDs. Patterns must be on the same geometry, otherwise this function throws a std::logic_error

Definition at line 67 of file Panzer_FieldAggPattern.cpp.

int panzer::FieldAggPattern::getDimension ( ) const
virtual

What is the dimension of this pattern. For instance a "quad" element is two dimensional. This is a purely geometric quantity.

Implements panzer::FieldPattern.

Definition at line 94 of file Panzer_FieldAggPattern.cpp.

int panzer::FieldAggPattern::getSubcellCount ( int  dim) const
virtual

How many sub cells of a particular dimension are there? For instance a "quad" element as four sub cells of dimension 0 (node type),four sub cells of dimension one (edge type), and one sub cell of dimension two (area type).

Parameters
[in]dimDimension of the sub cell of interest
Returns
Number of sub cells of dimension dim

Implements panzer::FieldPattern.

Definition at line 112 of file Panzer_FieldAggPattern.cpp.

const std::vector< int > & panzer::FieldAggPattern::getSubcellIndices ( int  dim,
int  cellIndex 
) const
virtual

Get the local indices associated with a particular sub cell. The sub cell is specified through its dimension and cell index. A vector is returned that gives the indices.

Parameters
[in]dimDimension of the sub cell of interest
[in]cellIndexIndex of the sub cell (must be lest than getSubcellCount(dim) and greater than or equal to 0.
Returns
A vector of indices for the specified sub cell.

Implements panzer::FieldPattern.

Definition at line 117 of file Panzer_FieldAggPattern.cpp.

void panzer::FieldAggPattern::getSubcellClosureIndices ( int  dim,
int  cellIndex,
std::vector< int > &  indices 
) const
virtual

Get the set of indices that are on the sub cell. The ``closure'' means that this set includes indices of all the child sub cells as well.

Parameters
[in]dimDimension of the sub cell of interest
[in]cellIndexIndex of the sub cell (must be lest than getSubcellCount(dim) and greater than or equal to 0.
[out]indicesVector, to be overwritten, containing the closure indices on return.

Implements panzer::FieldPattern.

Definition at line 122 of file Panzer_FieldAggPattern.cpp.

shards::CellTopology panzer::FieldAggPattern::getCellTopology ( ) const
virtual

Get the cell topology associated with this field pattern.

Implements panzer::FieldPattern.

Definition at line 103 of file Panzer_FieldAggPattern.cpp.

void panzer::FieldAggPattern::print ( std::ostream &  os) const
virtual

Print this pattern.

Reimplemented from panzer::FieldPattern.

Definition at line 128 of file Panzer_FieldAggPattern.cpp.

Teuchos::RCP< const FieldPattern > panzer::FieldAggPattern::getFieldPattern ( int  fieldId) const
virtual

Extract the field pattern associated with an argument

Parameters
[in]fieldIdID for field to lookup
Returns
Field pattern associated with a particular ID

Definition at line 159 of file Panzer_FieldAggPattern.cpp.

FieldType panzer::FieldAggPattern::getFieldType ( int  fieldId) const
virtual

Extract the field type associated with an argument

Parameters
[in]fieldIdID for field to lookup
Returns
Field type associated with a particular ID

Definition at line 168 of file Panzer_FieldAggPattern.cpp.

void panzer::FieldAggPattern::buildFieldIdToPatternIdx ( )
protected

Build the map that takes a field ID and maps it to a particular index in the patterns vector

Definition at line 177 of file Panzer_FieldAggPattern.cpp.

void panzer::FieldAggPattern::buildFieldIdsVector ( )
protected

Merge the current set of patterns in the patterns_ vector into the numFields_ and fieldIds_ vectors. This looks at the patterns_ vector and has side effects, wiping out any previous state stored in those vectors.

Definition at line 186 of file Panzer_FieldAggPattern.cpp.

void panzer::FieldAggPattern::mergeFieldPatterns ( const FieldType fieldType)
protected

Merge the current set of CG or DG patterns in the patterns_ vector into the numFields_ and fieldIds_ vectors. This looks at the patterns_ vector and has side effects. This merges all the field patterns for only ONE FieldType (CG or DG) AT AT TIME. This that allows for easier mapping of the internal DG indices to subcells.

Parameters
[in]fieldType- The type of field to build data for.

Definition at line 204 of file Panzer_FieldAggPattern.cpp.

void panzer::FieldAggPattern::addAllPatternSubcellIndices ( int  dim,
int  sc,
std::vector< int > &  indices 
)
protected

Adds all the pattern's sub cell indices to the vector specified. The sub cell (dim and sub cell ordinal) is also specified.

void panzer::FieldAggPattern::buildFieldPatternData ( )
protected

Build Pattern data vectors.

Definition at line 248 of file Panzer_FieldAggPattern.cpp.

void panzer::FieldAggPattern::localOffsets_build ( int  fieldId,
std::vector< int > &  offsets 
) const
protected

Helper function that builds the local offsets for this field.

Definition at line 369 of file Panzer_FieldAggPattern.cpp.

Member Data Documentation

std::size_t panzer::FieldAggPattern::dimension_
protected

Definition at line 238 of file Panzer_FieldAggPattern.hpp.

Teuchos::RCP<const FieldPattern> panzer::FieldAggPattern::geomAggPattern_
protected

Definition at line 239 of file Panzer_FieldAggPattern.hpp.

std::vector<std::vector<std::vector<int> > > panzer::FieldAggPattern::patternData_
protected

Stores the local cell DOF indices for each (dim,subcell_id) that are returned by calls to getSubcellIndices().

Definition at line 243 of file Panzer_FieldAggPattern.hpp.

std::vector<int> panzer::FieldAggPattern::numFields_
protected

Definition at line 246 of file Panzer_FieldAggPattern.hpp.

std::vector<int> panzer::FieldAggPattern::fieldIds_
protected

Definition at line 247 of file Panzer_FieldAggPattern.hpp.

std::vector<std::tuple<int,panzer::FieldType,Teuchos::RCP<const FieldPattern> > > panzer::FieldAggPattern::patterns_
protected

Definition at line 250 of file Panzer_FieldAggPattern.hpp.

std::map<int,int> panzer::FieldAggPattern::fieldIdToPatternIdx_
protected

Definition at line 251 of file Panzer_FieldAggPattern.hpp.

std::map<int, std::vector<int> > panzer::FieldAggPattern::fieldOffsets_
mutableprotected

Stores the Field offsets for the fieldId key. Note that the key is the fieldId, not the index into the patterns_.

Definition at line 254 of file Panzer_FieldAggPattern.hpp.

std::map<int, PHX::View<int*> > panzer::FieldAggPattern::fieldOffsetsKokkos_
mutableprotected

Stores the Field offsets for the fieldId key. Note that the key is the fieldId, not the index into the patterns_.

Definition at line 257 of file Panzer_FieldAggPattern.hpp.

std::map<Teuchos::Tuple<int,3>, std::pair<std::vector<int>,std::vector<int> >,LessThan> panzer::FieldAggPattern::fieldSubcellOffsets_closure_
mutableprotected

Definition at line 262 of file Panzer_FieldAggPattern.hpp.


The documentation for this class was generated from the following files: