Panzer
Version of the Day
|
#include <Panzer_STK_Interface.hpp>
Classes | |
struct | ElementBlockException |
class | LocalIdCompare |
struct | SidesetException |
Public Types | |
typedef double | ProcIdData |
typedef stk_classic::mesh::Field < double > | SolutionFieldType |
typedef stk_classic::mesh::Field < double, stk_classic::mesh::Cartesian > | VectorFieldType |
typedef stk_classic::mesh::Field < ProcIdData > | ProcIdFieldType |
Public Member Functions | |
STK_Interface () | |
STK_Interface (unsigned dim) | |
void | addElementBlock (const std::string &name, const CellTopologyData *ctData) |
void | addSideset (const std::string &name, const CellTopologyData *ctData) |
void | addNodeset (const std::string &name) |
void | addSolutionField (const std::string &fieldName, const std::string &blockId) |
void | addCellField (const std::string &fieldName, const std::string &blockId) |
void | addMeshCoordFields (const std::string &blockId, const std::vector< std::string > &coordField, const std::string &dispPrefix) |
void | initialize (stk_classic::ParallelMachine parallelMach, bool setupIO=true) |
void | instantiateBulkData (stk_classic::ParallelMachine parallelMach) |
void | beginModification () |
void | endModification () |
void | addNode (stk_classic::mesh::EntityId gid, const std::vector< double > &coord) |
void | addElement (const Teuchos::RCP< ElementDescriptor > &ed, stk_classic::mesh::Part *block) |
void | addEdges () |
void | addFaces () |
void | addEntityToSideset (stk_classic::mesh::Entity &entity, stk_classic::mesh::Part *sideset) |
void | addEntityToNodeset (stk_classic::mesh::Entity &entity, stk_classic::mesh::Part *nodeset) |
const VectorFieldType & | getCoordinatesField () const |
const VectorFieldType & | getEdgesField () const |
const VectorFieldType & | getFacesField () const |
const double * | getNodeCoordinates (stk_classic::mesh::EntityId nodeId) const |
const double * | getNodeCoordinates (stk_classic::mesh::Entity *node) const |
void | getSubcellIndices (unsigned entityRank, stk_classic::mesh::EntityId elementId, std::vector< stk_classic::mesh::EntityId > &subcellIds) const |
void | getMyElements (std::vector< stk_classic::mesh::Entity * > &elements) const |
void | getMyElements (const std::string &blockID, std::vector< stk_classic::mesh::Entity * > &elements) const |
void | getNeighborElements (std::vector< stk_classic::mesh::Entity * > &elements) const |
void | getNeighborElements (const std::string &blockID, std::vector< stk_classic::mesh::Entity * > &elements) const |
void | getMySides (const std::string &sideName, std::vector< stk_classic::mesh::Entity * > &sides) const |
void | getMySides (const std::string &sideName, const std::string &blockName, std::vector< stk_classic::mesh::Entity * > &sides) const |
void | getAllSides (const std::string &sideName, std::vector< stk_classic::mesh::Entity * > &sides) const |
void | getAllSides (const std::string &sideName, const std::string &blockName, std::vector< stk_classic::mesh::Entity * > &sides) const |
void | getMyNodes (const std::string &sideName, const std::string &blockName, std::vector< stk_classic::mesh::Entity * > &nodes) const |
void | writeToExodus (const std::string &filename) |
void | setupTransientExodusFile (const std::string &filename) |
void | writeToExodus (double timestep) |
Teuchos::RCP < stk_classic::mesh::BulkData > | getBulkData () const |
Teuchos::RCP < stk_classic::mesh::fem::FEMMetaData > | getMetaData () const |
bool | isWritable () const |
bool | isModifiable () const |
unsigned | getDimension () const |
get the dimension More... | |
std::size_t | getNumElementBlocks () const |
get the block count More... | |
void | getElementBlockNames (std::vector< std::string > &names) const |
void | getSidesetNames (std::vector< std::string > &name) const |
void | getNodesetNames (std::vector< std::string > &name) const |
stk_classic::mesh::Part * | getOwnedPart () const |
Get a pointer to the locally owned part. More... | |
stk_classic::mesh::Part * | getElementBlockPart (const std::string &name) const |
get the block count More... | |
std::size_t | getNumSidesets () const |
get the side set count More... | |
stk_classic::mesh::Part * | getSideset (const std::string &name) const |
std::size_t | getNumNodesets () const |
get the side set count More... | |
stk_classic::mesh::Part * | getNodeset (const std::string &name) const |
std::size_t | getEntityCounts (unsigned entityRank) const |
get the global counts for the entity of specified rank More... | |
stk_classic::mesh::EntityId | getMaxEntityId (unsigned entityRank) const |
get max entity ID of type entityRank More... | |
void | getElementsSharingNode (stk_classic::mesh::EntityId nodeId, std::vector< stk_classic::mesh::Entity * > &elements) const |
get a set of elements sharing a single node More... | |
void | getOwnedElementsSharingNode (stk_classic::mesh::Entity *node, std::vector< stk_classic::mesh::Entity * > &elements, std::vector< int > &localNodeId) const |
void | getOwnedElementsSharingNode (stk_classic::mesh::EntityId nodeId, std::vector< stk_classic::mesh::Entity * > &elements, std::vector< int > &localNodeId, unsigned int matchType) const |
void | getElementsSharingNodes (const std::vector< stk_classic::mesh::EntityId > nodeId, std::vector< stk_classic::mesh::Entity * > &elements) const |
get a set of elements sharing multiple nodes More... | |
void | buildSubcells () |
force the mesh to build subcells: edges and faces More... | |
std::size_t | elementLocalId (stk_classic::mesh::Entity *elmt) const |
std::size_t | elementLocalId (stk_classic::mesh::EntityId gid) const |
stk_classic::mesh::EntityId | elementGlobalId (std::size_t lid) const |
stk_classic::mesh::EntityId | elementGlobalId (stk_classic::mesh::Entity *elmt) const |
std::string | containingBlockId (stk_classic::mesh::Entity *elmt) |
stk_classic::mesh::Field < double > * | getSolutionField (const std::string &fieldName, const std::string &blockId) const |
stk_classic::mesh::Field < double > * | getCellField (const std::string &fieldName, const std::string &blockId) const |
ProcIdFieldType * | getProcessorIdField () |
bool | isInitialized () const |
Has initialize been called on this mesh object? More... | |
Teuchos::RCP< const std::vector < stk_classic::mesh::Entity * > > | getElementsOrderedByLID () const |
template<typename ArrayT > | |
void | setSolutionFieldData (const std::string &fieldName, const std::string &blockId, const std::vector< std::size_t > &localElementIds, const ArrayT &solutionValues, double scaleValue=1.0) |
template<typename ArrayT > | |
void | getSolutionFieldData (const std::string &fieldName, const std::string &blockId, const std::vector< std::size_t > &localElementIds, ArrayT &solutionValues) const |
template<typename ArrayT > | |
void | setCellFieldData (const std::string &fieldName, const std::string &blockId, const std::vector< std::size_t > &localElementIds, const ArrayT &solutionValues, double scaleValue=1.0) |
template<typename ArrayT > | |
void | getElementVertices (const std::vector< std::size_t > &localIds, ArrayT &vertices) const |
template<typename ArrayT > | |
void | getElementVertices (const std::vector< stk_classic::mesh::Entity * > &elements, ArrayT &vertices) const |
template<typename ArrayT > | |
void | getElementVertices (const std::vector< std::size_t > &localIds, const std::string &eBlock, ArrayT &vertices) const |
template<typename ArrayT > | |
void | getElementVertices (const std::vector< stk_classic::mesh::Entity * > &elements, const std::string &eBlock, ArrayT &vertices) const |
stk_classic::mesh::EntityRank | getElementRank () const |
stk_classic::mesh::EntityRank | getSideRank () const |
stk_classic::mesh::EntityRank | getFaceRank () const |
stk_classic::mesh::EntityRank | getEdgeRank () const |
stk_classic::mesh::EntityRank | getNodeRank () const |
void | initializeFromMetaData () |
void | buildLocalElementIDs () |
const std::vector < Teuchos::RCP< const PeriodicBC_MatcherBase > > & | getPeriodicBCVector () const |
std::vector< Teuchos::RCP < const PeriodicBC_MatcherBase > > & | getPeriodicBCVector () |
void | addPeriodicBC (const Teuchos::RCP< const PeriodicBC_MatcherBase > &bc) |
void | addPeriodicBCs (const std::vector< Teuchos::RCP< const PeriodicBC_MatcherBase > > &bc_vec) |
std::pair< Teuchos::RCP < std::vector< std::pair < std::size_t, std::size_t > > >, Teuchos::RCP < std::vector< unsigned int > > > | getPeriodicNodePairing () const |
bool | validBlockId (const std::string &blockId) const |
void | print (std::ostream &os) const |
void | printMetaData (std::ostream &os) const |
Teuchos::RCP< const shards::CellTopology > | getCellTopology (const std::string &eBlock) const |
double | getCurrentStateTime () const |
double | getInitialStateTime () const |
void | setInitialStateTime (double value) |
void | rebalance (const Teuchos::ParameterList ¶ms) |
void | setBlockWeight (const std::string &blockId, double weight) |
void | setUseFieldCoordinates (bool useFieldCoordinates) |
bool | getUseFieldCoordinates () const |
void | setUseLowerCaseForIO (bool useLowerCase) |
bool | getUseLowerCaseForIO () const |
template<typename ArrayT > | |
void | getElementVertices_FromField (const std::vector< stk_classic::mesh::Entity * > &elements, const std::string &eBlock, ArrayT &vertices) const |
template<typename ArrayT > | |
void | getElementVertices_FromCoords (const std::vector< stk_classic::mesh::Entity * > &elements, ArrayT &vertices) const |
template<typename ArrayT > | |
void | getElementVertices_FromCoordsNoResize (const std::vector< stk_classic::mesh::Entity * > &elements, ArrayT &vertices) const |
Static Public Attributes | |
static const std::string | coordsString = "coordinates" |
static const std::string | nodesString = "nodes" |
static const std::string | edgesString = "edges" |
static const std::string | facesString = "faces" |
Protected Member Functions | |
void | buildEntityCounts () |
void | buildMaxEntityIds () |
void | initializeFieldsInSTK (const std::map< std::pair< std::string, std::string >, SolutionFieldType * > &nameToField, stk_classic::mesh::EntityRank rank, bool setupIO) |
Teuchos::RCP< Teuchos::MpiComm < int > > | getSafeCommunicator (stk_classic::ParallelMachine parallelMach) const |
void | applyElementLoadBalanceWeights () |
bool | isMeshCoordField (const std::string &eBlock, const std::string &fieldName, int &axis) const |
template<typename ArrayT > | |
void | setDispFieldData (const std::string &fieldName, const std::string &blockId, int axis, const std::vector< std::size_t > &localElementIds, const ArrayT &solutionValues) |
Protected Attributes | |
std::vector< Teuchos::RCP < const PeriodicBC_MatcherBase > > | periodicBCs_ |
Teuchos::RCP < stk_classic::mesh::fem::FEMMetaData > | metaData_ |
Teuchos::RCP < stk_classic::mesh::BulkData > | bulkData_ |
std::map< std::string, stk_classic::mesh::Part * > | elementBlocks_ |
std::map< std::string, stk_classic::mesh::Part * > | sidesets_ |
std::map< std::string, stk_classic::mesh::Part * > | nodesets_ |
std::map< std::string, Teuchos::RCP < shards::CellTopology > > | elementBlockCT_ |
stk_classic::mesh::Part * | nodesPart_ |
std::vector < stk_classic::mesh::Part * > | nodesPartVec_ |
stk_classic::mesh::Part * | edgesPart_ |
std::vector < stk_classic::mesh::Part * > | edgesPartVec_ |
stk_classic::mesh::Part * | facesPart_ |
std::vector < stk_classic::mesh::Part * > | facesPartVec_ |
VectorFieldType * | coordinatesField_ |
VectorFieldType * | edgesField_ |
VectorFieldType * | facesField_ |
ProcIdFieldType * | processorIdField_ |
SolutionFieldType * | loadBalField_ |
std::map< std::pair < std::string, std::string > , SolutionFieldType * > | fieldNameToSolution_ |
std::map< std::pair < std::string, std::string > , SolutionFieldType * > | fieldNameToCellField_ |
unsigned | dimension_ |
bool | initialized_ |
std::vector< std::size_t > | entityCounts_ |
std::vector < stk_classic::mesh::EntityId > | maxEntityId_ |
unsigned | procRank_ |
std::size_t | currentLocalId_ |
Teuchos::RCP< Teuchos::MpiComm < int > > | mpiComm_ |
double | initialStateTime_ |
double | currentStateTime_ |
Teuchos::RCP< std::vector < stk_classic::mesh::Entity * > > | orderedElementVector_ |
std::map< std::string, double > | blockWeights_ |
boost::unordered_map < stk_classic::mesh::EntityId, std::size_t > | localIDHash_ |
std::map< std::string, std::vector< std::string > > | meshCoordFields_ |
std::map< std::string, std::vector< std::string > > | meshDispFields_ |
bool | useFieldCoordinates_ |
bool | useLowerCase_ |
Definition at line 94 of file Panzer_STK_Interface.hpp.
typedef double panzer_stk_classic::STK_Interface::ProcIdData |
Definition at line 96 of file Panzer_STK_Interface.hpp.
typedef stk_classic::mesh::Field<double> panzer_stk_classic::STK_Interface::SolutionFieldType |
Definition at line 97 of file Panzer_STK_Interface.hpp.
typedef stk_classic::mesh::Field<double,stk_classic::mesh::Cartesian> panzer_stk_classic::STK_Interface::VectorFieldType |
Definition at line 98 of file Panzer_STK_Interface.hpp.
typedef stk_classic::mesh::Field<ProcIdData> panzer_stk_classic::STK_Interface::ProcIdFieldType |
Definition at line 99 of file Panzer_STK_Interface.hpp.
panzer_stk_classic::STK_Interface::STK_Interface | ( | ) |
Definition at line 96 of file Panzer_STK_Interface.cpp.
panzer_stk_classic::STK_Interface::STK_Interface | ( | unsigned | dim | ) |
Default constructor
Definition at line 102 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::addElementBlock | ( | const std::string & | name, |
const CellTopologyData * | ctData | ||
) |
Add an element block with a string name
Definition at line 936 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::addSideset | ( | const std::string & | name, |
const CellTopologyData * | ctData | ||
) |
Add a side set with a string name
Definition at line 114 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::addNodeset | ( | const std::string & | name | ) |
Add a node set with a string name
Definition at line 125 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::addSolutionField | ( | const std::string & | fieldName, |
const std::string & | blockId | ||
) |
Add a solution field
Definition at line 138 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::addCellField | ( | const std::string & | fieldName, |
const std::string & | blockId | ||
) |
Add a solution field
Definition at line 154 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::addMeshCoordFields | ( | const std::string & | blockId, |
const std::vector< std::string > & | coordField, | ||
const std::string & | dispPrefix | ||
) |
Add a solution field for coordinates with a particular prefix, force it to be outputed as a to be mesh displacement field. This is really only relevant for I/O and how the field is stored internally in the mesh.
[in] | blockId | Element block to use |
[in] | coordPrefix | Prefix for solution coordinate field (assumes using "X","Y","Z" as postfix) |
[in] | dispPrefix | Prefix for displacment (output) field |
Definition at line 170 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::initialize | ( | stk_classic::ParallelMachine | parallelMach, |
bool | setupIO = true |
||
) |
Initialize the mesh with the current dimension This also calls commit on the meta data causing it to be frozen. Information about elements blocks has to be commited before this. If parallel machine has already been specified through instantiateBulkData
that communicator is used. Otherwise a new copy is constructed and will be used through out this mesh object's lifetime.
Definition at line 214 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::instantiateBulkData | ( | stk_classic::ParallelMachine | parallelMach | ) |
Build a bulk data object but don't do anything with it. If parallel machine has already been specified through initialize
that communicator is used. Otherwise a new copy is constructed and will be used by default throughout the lifetime of this object.
Definition at line 311 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::beginModification | ( | ) |
Put the bulk data manager in modification mode.
Definition at line 320 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::endModification | ( | ) |
Take the bulk data manager out of modification mode.
Definition at line 328 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::addNode | ( | stk_classic::mesh::EntityId | gid, |
const std::vector< double > & | coord | ||
) |
Add a node to the mesh with a specific set of coordinates to the mesh.
coord.size()==getDimension()
isModifiable()==true
Definition at line 339 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::addElement | ( | const Teuchos::RCP< ElementDescriptor > & | ed, |
stk_classic::mesh::Part * | block | ||
) |
Definition at line 373 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::addEdges | ( | ) |
Definition at line 396 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::addFaces | ( | ) |
Definition at line 425 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::addEntityToSideset | ( | stk_classic::mesh::Entity & | entity, |
stk_classic::mesh::Part * | sideset | ||
) |
Addes an entity to a specified side set.
Definition at line 357 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::addEntityToNodeset | ( | stk_classic::mesh::Entity & | entity, |
stk_classic::mesh::Part * | nodeset | ||
) |
Addes an entity to a specified node set.
Definition at line 365 of file Panzer_STK_Interface.cpp.
|
inline |
Grab the coordinates field
Definition at line 204 of file Panzer_STK_Interface.hpp.
|
inline |
Grab the edges field
Definition at line 209 of file Panzer_STK_Interface.hpp.
|
inline |
Definition at line 212 of file Panzer_STK_Interface.hpp.
const double * panzer_stk_classic::STK_Interface::getNodeCoordinates | ( | stk_classic::mesh::EntityId | nodeId | ) | const |
Look up a global node and get the coordinate.
Definition at line 676 of file Panzer_STK_Interface.cpp.
const double * panzer_stk_classic::STK_Interface::getNodeCoordinates | ( | stk_classic::mesh::Entity * | node | ) | const |
Look up a global node and get the coordinate.
Definition at line 682 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::getSubcellIndices | ( | unsigned | entityRank, |
stk_classic::mesh::EntityId | elementId, | ||
std::vector< stk_classic::mesh::EntityId > & | subcellIds | ||
) | const |
Get subcell global IDs
Definition at line 687 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::getMyElements | ( | std::vector< stk_classic::mesh::Entity * > & | elements | ) | const |
Get a vector of elements owned by this processor
Definition at line 708 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::getMyElements | ( | const std::string & | blockID, |
std::vector< stk_classic::mesh::Entity * > & | elements | ||
) | const |
Get a vector of elements owned by this processor on a particular block ID
Definition at line 718 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::getNeighborElements | ( | std::vector< stk_classic::mesh::Entity * > & | elements | ) | const |
Get a vector of elements that share an edge/face with an owned element. Note that these elements are not owned.
Definition at line 733 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::getNeighborElements | ( | const std::string & | blockID, |
std::vector< stk_classic::mesh::Entity * > & | elements | ||
) | const |
Get a vector of elements not owned by this processor but in a particular block
Definition at line 743 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::getMySides | ( | const std::string & | sideName, |
std::vector< stk_classic::mesh::Entity * > & | sides | ||
) | const |
Get Entities corresponding to the side set requested. The Entites in the vector should be a dimension lower then getDimension()
.
[in] | sideName | Name of side set |
[in,out] | sides | Vector of entities containing the requested sides. |
Definition at line 757 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::getMySides | ( | const std::string & | sideName, |
const std::string & | blockName, | ||
std::vector< stk_classic::mesh::Entity * > & | sides | ||
) | const |
Get Entities corresponding to the locally owned part of the side set requested. This also limits the entities to be in a particular element block. The Entites in the vector should be a dimension lower then getDimension()
.
[in] | sideName | Name of side set |
[in] | blockName | Name of block |
[in,out] | sides | Vector of entities containing the requested sides. |
Definition at line 770 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::getAllSides | ( | const std::string & | sideName, |
std::vector< stk_classic::mesh::Entity * > & | sides | ||
) | const |
Get Entities corresponding to the locally owned part of the side set requested. The Entites in the vector should be a dimension lower then getDimension()
.
[in] | sideName | Name of side set |
[in,out] | sides | Vector of entities containing the requested sides. |
Definition at line 787 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::getAllSides | ( | const std::string & | sideName, |
const std::string & | blockName, | ||
std::vector< stk_classic::mesh::Entity * > & | sides | ||
) | const |
Get Entities corresponding to the side set requested. This also limits the entities to be in a particular element block. The Entites in the vector should be a dimension lower then getDimension()
.
[in] | sideName | Name of side set |
[in] | blockName | Name of block |
[in,out] | sides | Vector of entities containing the requested sides. |
Definition at line 799 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::getMyNodes | ( | const std::string & | sideName, |
const std::string & | blockName, | ||
std::vector< stk_classic::mesh::Entity * > & | nodes | ||
) | const |
Get Entities corresponding to the node set requested. This also limits the entities to be in a particular element block. The Entites in the vector should be ofdimension 0
.
[in] | nodesetName | Name of side set |
[in] | blockName | Name of block |
[in,out] | sides | Vector of entities containing the requested sides. |
Definition at line 816 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::writeToExodus | ( | const std::string & | filename | ) |
Write this mesh to exodus. This is a one shot function that will write to a particular exodus output file.
Definition at line 455 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::setupTransientExodusFile | ( | const std::string & | filename | ) |
This simply sets up a transient exodus file for writing. No work is performed at this stage. This is used in combination with writeToExodus(double timestep)
.
Definition at line 474 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::writeToExodus | ( | double | timestep | ) |
Write this timestep to the exodus file specified in the setupTransientExodusFile
. This uses the current state of the STK fields as the time step.
Definition at line 491 of file Panzer_STK_Interface.cpp.
|
inline |
Definition at line 318 of file Panzer_STK_Interface.hpp.
|
inline |
Definition at line 319 of file Panzer_STK_Interface.hpp.
bool panzer_stk_classic::STK_Interface::isWritable | ( | ) | const |
Definition at line 510 of file Panzer_STK_Interface.cpp.
|
inline |
Definition at line 323 of file Panzer_STK_Interface.hpp.
|
inline |
get the dimension
Definition at line 328 of file Panzer_STK_Interface.hpp.
|
inline |
get the block count
Definition at line 332 of file Panzer_STK_Interface.hpp.
void panzer_stk_classic::STK_Interface::getElementBlockNames | ( | std::vector< std::string > & | names | ) | const |
Get a vector containing the names of the element blocks. This function always returns the current set of element blocks in lexiographic order (uses the sorting built into the std::map). This method can only be called after initialize
.
[in,out] | names | Vector of names of the element blocks. |
Definition at line 833 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::getSidesetNames | ( | std::vector< std::string > & | name | ) | const |
Get a vector containing the names of the side sets. This function always returns the current set of side sets in lexiographic order (uses the sorting built into the std::map). This method can only be called after initialize
.
[in,out] | names | Vector of names of the side sets |
Definition at line 845 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::getNodesetNames | ( | std::vector< std::string > & | name | ) | const |
Get a vector containing the names of the node sets. This function always returns the current set of node sets in lexiographic order (uses the sorting built into the std::map). This method can only be called after initialize
.
[in,out] | names | Vector of names of the element blocks. |
Definition at line 857 of file Panzer_STK_Interface.cpp.
|
inline |
Get a pointer to the locally owned part.
Definition at line 363 of file Panzer_STK_Interface.hpp.
|
inline |
get the block count
Definition at line 367 of file Panzer_STK_Interface.hpp.
|
inline |
get the side set count
Definition at line 375 of file Panzer_STK_Interface.hpp.
|
inline |
Definition at line 378 of file Panzer_STK_Interface.hpp.
|
inline |
get the side set count
Definition at line 382 of file Panzer_STK_Interface.hpp.
|
inline |
Definition at line 385 of file Panzer_STK_Interface.hpp.
std::size_t panzer_stk_classic::STK_Interface::getEntityCounts | ( | unsigned | entityRank | ) | const |
get the global counts for the entity of specified rank
Definition at line 648 of file Panzer_STK_Interface.cpp.
stk_classic::mesh::EntityId panzer_stk_classic::STK_Interface::getMaxEntityId | ( | unsigned | entityRank | ) | const |
get max entity ID of type entityRank
Definition at line 656 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::getElementsSharingNode | ( | stk_classic::mesh::EntityId | nodeId, |
std::vector< stk_classic::mesh::Entity * > & | elements | ||
) | const |
get a set of elements sharing a single node
Definition at line 519 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::getOwnedElementsSharingNode | ( | stk_classic::mesh::Entity * | node, |
std::vector< stk_classic::mesh::Entity * > & | elements, | ||
std::vector< int > & | localNodeId | ||
) | const |
Get set of element sharing a single node and its local node id.
Definition at line 535 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::getOwnedElementsSharingNode | ( | stk_classic::mesh::EntityId | nodeId, |
std::vector< stk_classic::mesh::Entity * > & | elements, | ||
std::vector< int > & | localNodeId, | ||
unsigned int | matchType | ||
) | const |
Get set of element sharing a single node and its local node id.
Definition at line 557 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::getElementsSharingNodes | ( | const std::vector< stk_classic::mesh::EntityId > | nodeId, |
std::vector< stk_classic::mesh::Entity * > & | elements | ||
) | const |
get a set of elements sharing multiple nodes
Definition at line 575 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::buildSubcells | ( | ) |
force the mesh to build subcells: edges and faces
Definition at line 664 of file Panzer_STK_Interface.cpp.
std::size_t panzer_stk_classic::STK_Interface::elementLocalId | ( | stk_classic::mesh::Entity * | elmt | ) | const |
Get an elements local index
Definition at line 867 of file Panzer_STK_Interface.cpp.
std::size_t panzer_stk_classic::STK_Interface::elementLocalId | ( | stk_classic::mesh::EntityId | gid | ) | const |
Get an elements local index
Definition at line 874 of file Panzer_STK_Interface.cpp.
|
inline |
Get an elements global index
Definition at line 427 of file Panzer_STK_Interface.hpp.
|
inline |
Get an elements global index
Definition at line 432 of file Panzer_STK_Interface.hpp.
std::string panzer_stk_classic::STK_Interface::containingBlockId | ( | stk_classic::mesh::Entity * | elmt | ) |
Get the containing block ID of this element.
Definition at line 886 of file Panzer_STK_Interface.cpp.
stk_classic::mesh::Field< double > * panzer_stk_classic::STK_Interface::getSolutionField | ( | const std::string & | fieldName, |
const std::string & | blockId | ||
) | const |
Get the stk mesh field pointer associated with a particular solution value Assumes there is a field associated with "fieldName,blockId" pair. If none is found an exception (std::runtime_error) is raised.
Definition at line 895 of file Panzer_STK_Interface.cpp.
stk_classic::mesh::Field< double > * panzer_stk_classic::STK_Interface::getCellField | ( | const std::string & | fieldName, |
const std::string & | blockId | ||
) | const |
Get the stk mesh field pointer associated with a particular value Assumes there is a field associated with "fieldName,blockId" pair. If none is found an exception (std::runtime_error) is raised.
Definition at line 909 of file Panzer_STK_Interface.cpp.
|
inline |
Definition at line 453 of file Panzer_STK_Interface.hpp.
|
inline |
Has initialize
been called on this mesh object?
Definition at line 456 of file Panzer_STK_Interface.hpp.
Teuchos::RCP< const std::vector< stk_classic::mesh::Entity * > > panzer_stk_classic::STK_Interface::getElementsOrderedByLID | ( | ) | const |
Get Vector of element entities ordered by their LID, returns an RCP so that it is easily stored by the caller.
Definition at line 923 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::setSolutionFieldData | ( | const std::string & | fieldName, |
const std::string & | blockId, | ||
const std::vector< std::size_t > & | localElementIds, | ||
const ArrayT & | solutionValues, | ||
double | scaleValue = 1.0 |
||
) |
Writes a particular field to an array. Notice this is setup to work with the worksets associated with Panzer.
[in] | fieldName | Name of field to be filled |
[in] | blockId | Name of block this set of elements belongs to |
[in] | localElementIds | Local element IDs for this set of solution values |
[in] | solutionValues | An two dimensional array object sized by (Cells,Basis Count) |
Definition at line 849 of file Panzer_STK_Interface.hpp.
void panzer_stk_classic::STK_Interface::getSolutionFieldData | ( | const std::string & | fieldName, |
const std::string & | blockId, | ||
const std::vector< std::size_t > & | localElementIds, | ||
ArrayT & | solutionValues | ||
) | const |
Reads a particular field into an array. Notice this is setup to work with the worksets associated with Panzer.
[in] | fieldName | Name of field to be filled |
[in] | blockId | Name of block this set of elements belongs to |
[in] | localElementIds | Local element IDs for this set of solution values |
[in] | solutionValues | An two dimensional array object sized by (Cells,Basis Count) |
Definition at line 907 of file Panzer_STK_Interface.hpp.
void panzer_stk_classic::STK_Interface::setCellFieldData | ( | const std::string & | fieldName, |
const std::string & | blockId, | ||
const std::vector< std::size_t > & | localElementIds, | ||
const ArrayT & | solutionValues, | ||
double | scaleValue = 1.0 |
||
) |
Writes a particular field to a cell array. Notice this is setup to work with the worksets associated with Panzer.
[in] | fieldName | Name of field to be filled |
[in] | blockId | Name of block this set of elements belongs to |
[in] | localElementIds | Local element IDs for this set of solution values |
[in] | solutionValues | A one dimensional array object sized by (Cells) |
Definition at line 933 of file Panzer_STK_Interface.hpp.
void panzer_stk_classic::STK_Interface::getElementVertices | ( | const std::vector< std::size_t > & | localIds, |
ArrayT & | vertices | ||
) | const |
Get vertices associated with a number of elements of the same geometry.
[in] | localIds | Element local IDs to construct vertices |
[out] | vertices | Output array that will be sized (localIds.size() ,#Vertices,#Dim) |
localIds
is 0, the function will silently return Definition at line 951 of file Panzer_STK_Interface.hpp.
void panzer_stk_classic::STK_Interface::getElementVertices | ( | const std::vector< stk_classic::mesh::Entity * > & | elements, |
ArrayT & | vertices | ||
) | const |
Get vertices associated with a number of elements of the same geometry.
[in] | elements | Element entities to construct vertices |
[out] | vertices | Output array that will be sized (localIds.size() ,#Vertices,#Dim) |
localIds
is 0, the function will silently return Definition at line 975 of file Panzer_STK_Interface.hpp.
void panzer_stk_classic::STK_Interface::getElementVertices | ( | const std::vector< std::size_t > & | localIds, |
const std::string & | eBlock, | ||
ArrayT & | vertices | ||
) | const |
Get vertices associated with a number of elements of the same geometry.
[in] | localIds | Element local IDs to construct vertices |
[in] | eBlock | Element block the elements are in |
[out] | vertices | Output array that will be sized (localIds.size() ,#Vertices,#Dim) |
localIds
is 0, the function will silently return Definition at line 999 of file Panzer_STK_Interface.hpp.
void panzer_stk_classic::STK_Interface::getElementVertices | ( | const std::vector< stk_classic::mesh::Entity * > & | elements, |
const std::string & | eBlock, | ||
ArrayT & | vertices | ||
) | const |
Get vertices associated with a number of elements of the same geometry.
[in] | elements | Element entities to construct vertices |
[in] | eBlock | Element block the elements are in |
[out] | vertices | Output array that will be sized (localIds.size() ,#Vertices,#Dim) |
localIds
is 0, the function will silently return Definition at line 988 of file Panzer_STK_Interface.hpp.
|
inline |
Definition at line 566 of file Panzer_STK_Interface.hpp.
|
inline |
Definition at line 567 of file Panzer_STK_Interface.hpp.
|
inline |
Definition at line 568 of file Panzer_STK_Interface.hpp.
|
inline |
Definition at line 569 of file Panzer_STK_Interface.hpp.
|
inline |
Definition at line 570 of file Panzer_STK_Interface.hpp.
void panzer_stk_classic::STK_Interface::initializeFromMetaData | ( | ) |
Build fields and parts from the meta data
Definition at line 954 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::buildLocalElementIDs | ( | ) |
Setup local element IDs
Definition at line 975 of file Panzer_STK_Interface.cpp.
|
inline |
Return a vector containing all the periodic boundary conditions.
Definition at line 583 of file Panzer_STK_Interface.hpp.
|
inline |
Return a vector containing all the periodic boundary conditions.
Definition at line 589 of file Panzer_STK_Interface.hpp.
|
inline |
Add a periodic boundary condition.
Definition at line 597 of file Panzer_STK_Interface.hpp.
|
inline |
Add a set of periodic boundary conditions.
Definition at line 605 of file Panzer_STK_Interface.hpp.
std::pair< Teuchos::RCP< std::vector< std::pair< std::size_t, std::size_t > > >, Teuchos::RCP< std::vector< unsigned int > > > panzer_stk_classic::STK_Interface::getPeriodicNodePairing | ( | ) | const |
Definition at line 1062 of file Panzer_STK_Interface.cpp.
bool panzer_stk_classic::STK_Interface::validBlockId | ( | const std::string & | blockId | ) | const |
check for a valid block id
Definition at line 1086 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::print | ( | std::ostream & | os | ) | const |
Print a brief description of the STK mesh to a stream.
Definition at line 1093 of file Panzer_STK_Interface.cpp.
void panzer_stk_classic::STK_Interface::printMetaData | ( | std::ostream & | os | ) | const |
Print a brief description of the STK mesh to a stream.
Definition at line 1143 of file Panzer_STK_Interface.cpp.
Teuchos::RCP< const shards::CellTopology > panzer_stk_classic::STK_Interface::getCellTopology | ( | const std::string & | eBlock | ) | const |
Get the cell topology from the element block.
Definition at line 1183 of file Panzer_STK_Interface.cpp.
|
inline |
Get the value of the time-stamp the last time this object was written to Exodus (default 0.0)
Definition at line 631 of file Panzer_STK_Interface.hpp.
|
inline |
Get the value of the time-stamp when this object was created (default 0.0) or when setInitialStateTime was called.
Definition at line 638 of file Panzer_STK_Interface.hpp.
|
inline |
Set the value of the initial time-stamp
Definition at line 644 of file Panzer_STK_Interface.hpp.
void panzer_stk_classic::STK_Interface::rebalance | ( | const Teuchos::ParameterList & | params | ) |
Rebalance using zoltan. Note that this will void the local element ids.
Definition at line 1210 of file Panzer_STK_Interface.cpp.
|
inline |
Set the weight for a particular element block. Larger means more costly to assemble and evaluate.
Definition at line 653 of file Panzer_STK_Interface.hpp.
|
inline |
When coordinates are returned in the getElementVertices method, extract coordinates using a specified field (not the intrinsic coordinates) where available (where unavailable the intrinsic coordinates are used. Note that this does not change the behavior of getNodeCoordinates. This is set to false by default.
Definition at line 662 of file Panzer_STK_Interface.hpp.
|
inline |
Return the use field coordinates flag
Definition at line 666 of file Panzer_STK_Interface.hpp.
|
inline |
Use lower case (or not) for I/O
Definition at line 670 of file Panzer_STK_Interface.hpp.
|
inline |
Use lower case (or not) for I/O
Definition at line 674 of file Panzer_STK_Interface.hpp.
void panzer_stk_classic::STK_Interface::getElementVertices_FromField | ( | const std::vector< stk_classic::mesh::Entity * > & | elements, |
const std::string & | eBlock, | ||
ArrayT & | vertices | ||
) | const |
Get vertices associated with a number of elements of the same geometry, note that a coordinate field will be used (if not is available an exception will be thrown).
[in] | elements | Element entities to construct vertices |
[in] | eBlock | Element block the elements are in |
[out] | vertices | Output array that will be sized (localIds.size() ,#Vertices,#Dim) |
localIds
is 0, the function will silently return Definition at line 1107 of file Panzer_STK_Interface.hpp.
void panzer_stk_classic::STK_Interface::getElementVertices_FromCoords | ( | const std::vector< stk_classic::mesh::Entity * > & | elements, |
ArrayT & | vertices | ||
) | const |
Get vertices associated with a number of elements of the same geometry. This access the true mesh coordinates array.
[in] | elements | Element entities to construct vertices |
[out] | vertices | Output array that will be sized (localIds.size() ,#Vertices,#Dim) |
localIds
is 0, the function will silently return Definition at line 1017 of file Panzer_STK_Interface.hpp.
void panzer_stk_classic::STK_Interface::getElementVertices_FromCoordsNoResize | ( | const std::vector< stk_classic::mesh::Entity * > & | elements, |
ArrayT & | vertices | ||
) | const |
Definition at line 1064 of file Panzer_STK_Interface.hpp.
|
protected |
Compute global entity counts.
Definition at line 607 of file Panzer_STK_Interface.cpp.
|
protected |
Compute global entity counts.
Definition at line 613 of file Panzer_STK_Interface.cpp.
|
protected |
Initialize STK fields using a map (allocate space for storage and writing) to a specific entity rank.
Definition at line 287 of file Panzer_STK_Interface.cpp.
|
protected |
Build a safely handled Teuchos MPI communicator from a parallel machine. This object asserts ownership of the communicator so that we can gurantee existence so the outer user can do whatever they'd like with the original.
Definition at line 1199 of file Panzer_STK_Interface.cpp.
|
protected |
In a pure local operation apply the user specified block weights for each element block to the field that defines the load balance weighting. This uses the blockWeights_ member to determine the user value that has been set for a particular element block.
Definition at line 1018 of file Panzer_STK_Interface.cpp.
|
protected |
Determine if a particular field in an element block is a displacement field. Return the displacement field name in the requested argument if so.
Definition at line 1040 of file Panzer_STK_Interface.cpp.
|
protected |
Writes a particular field to an array as a coordinate diplacement. Notice this is setup to work with the worksets associated with Panzer.
[in] | fieldName | Name of field to be filled |
[in] | blockId | Name of block this set of elements belongs to |
[in] | dimension | What coordinate axis to write to |
[in] | localElementIds | Local element IDs for this set of solution values |
[in] | solutionValues | An two dimensional array object sized by (Cells,Basis Count) |
Definition at line 879 of file Panzer_STK_Interface.hpp.
|
static |
Definition at line 706 of file Panzer_STK_Interface.hpp.
|
static |
Definition at line 707 of file Panzer_STK_Interface.hpp.
|
static |
Definition at line 708 of file Panzer_STK_Interface.hpp.
|
static |
Definition at line 709 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 764 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 766 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 767 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 769 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 770 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 771 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 772 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 775 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 776 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 777 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 778 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 779 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 780 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 782 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 783 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 784 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 785 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 786 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 789 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 790 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 792 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 794 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 797 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 800 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 802 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 803 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 805 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 807 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 808 of file Panzer_STK_Interface.hpp.
|
mutableprotected |
Definition at line 816 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 819 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 821 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 826 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 827 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 829 of file Panzer_STK_Interface.hpp.
|
protected |
Definition at line 831 of file Panzer_STK_Interface.hpp.