Panzer
Version of the Day
|
#include <Panzer_FieldAggPattern.hpp>
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 Kokkos::View< const int *, PHX::Device > | 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 FieldPattern > | geomAggPattern_ |
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, Kokkos::View < int *, PHX::Device > > | 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_ |
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.
|
protected |
Definition at line 199 of file Panzer_FieldAggPattern.hpp.
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.
|
inlinevirtual |
Definition at line 78 of file Panzer_FieldAggPattern.hpp.
|
virtual |
Return the geometric field pattern associated with the set of field patterns.
Definition at line 62 of file Panzer_FieldAggPattern.cpp.
|
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.
|
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.
|
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).
[in] | dim | Dimension of the sub cell of interest |
dim
Implements panzer::FieldPattern.
Definition at line 112 of file Panzer_FieldAggPattern.cpp.
|
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.
[in] | dim | Dimension of the sub cell of interest |
[in] | cellIndex | Index of the sub cell (must be lest than getSubcellCount(dim) and greater than or equal to 0. |
Implements panzer::FieldPattern.
Definition at line 117 of file Panzer_FieldAggPattern.cpp.
|
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.
[in] | dim | Dimension of the sub cell of interest |
[in] | cellIndex | Index of the sub cell (must be lest than getSubcellCount(dim) and greater than or equal to 0. |
[out] | indices | Vector, to be overwritten, containing the closure indices on return. |
Implements panzer::FieldPattern.
Definition at line 122 of file Panzer_FieldAggPattern.cpp.
|
virtual |
Get the cell topology associated with this field pattern.
Implements panzer::FieldPattern.
Definition at line 103 of file Panzer_FieldAggPattern.cpp.
|
virtual |
Print this pattern.
Reimplemented from panzer::FieldPattern.
Definition at line 128 of file Panzer_FieldAggPattern.cpp.
|
virtual |
Extract the field pattern associated with an argument
[in] | fieldId | ID for field to lookup |
Definition at line 159 of file Panzer_FieldAggPattern.cpp.
|
virtual |
Extract the field type associated with an argument
[in] | fieldId | ID for field to lookup |
Definition at line 168 of file Panzer_FieldAggPattern.cpp.
|
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.
|
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.
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.
[in] | fieldType | - The type of field to build data for. |
Definition at line 204 of file Panzer_FieldAggPattern.cpp.
|
protected |
Adds all the pattern's sub cell indices to the vector specified. The sub cell (dim and sub cell ordinal) is also specified.
|
protected |
Build Pattern data vectors.
Definition at line 248 of file Panzer_FieldAggPattern.cpp.
|
protected |
Helper function that builds the local offsets for this field.
Definition at line 371 of file Panzer_FieldAggPattern.cpp.
|
protected |
Definition at line 238 of file Panzer_FieldAggPattern.hpp.
|
protected |
Definition at line 239 of file Panzer_FieldAggPattern.hpp.
|
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.
|
protected |
Definition at line 246 of file Panzer_FieldAggPattern.hpp.
|
protected |
Definition at line 247 of file Panzer_FieldAggPattern.hpp.
|
protected |
Definition at line 250 of file Panzer_FieldAggPattern.hpp.
|
protected |
Definition at line 251 of file Panzer_FieldAggPattern.hpp.
|
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.
|
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.
|
mutableprotected |
Definition at line 262 of file Panzer_FieldAggPattern.hpp.