Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #if !defined(LCM_Topology_Types_h)
00008 #define LCM_Topology_Types_h
00009
00010
00011 #include <stk_mesh/base/BulkData.hpp>
00012 #include <stk_mesh/base/Entity.hpp>
00013 #include <stk_mesh/base/Field.hpp>
00014 #include <stk_mesh/base/GetEntities.hpp>
00015 #include <stk_mesh/base/Types.hpp>
00016 #include <stk_mesh/fem/CreateAdjacentEntities.hpp>
00017 #include <stk_mesh/fem/FEMMetaData.hpp>
00018 #include <stk_mesh/fem/SkinMesh.hpp>
00019
00020
00021 #include <boost/graph/adjacency_list.hpp>
00022 #include <boost/graph/properties.hpp>
00023 #include <boost/graph/connected_components.hpp>
00024 #include <boost/graph/graphviz.hpp>
00025
00026
00027 #include <Shards_CellTopology.hpp>
00028 #include <Shards_BasicTopologies.hpp>
00029
00030
00031 #include <Teuchos_RCP.hpp>
00032 #include <Teuchos_ArrayRCP.hpp>
00033 #include <Teuchos_ParameterList.hpp>
00034 #include <Teuchos_ScalarTraits.hpp>
00035 #include <Teuchos_CommandLineProcessor.hpp>
00036
00037
00038 #include "Albany_AbstractSTKFieldContainer.hpp"
00039 #include "Albany_AbstractDiscretization.hpp"
00040 #include "Albany_DiscretizationFactory.hpp"
00041 #include "Albany_STKDiscretization.hpp"
00042 #include "Albany_Utils.hpp"
00043
00044 using stk::mesh::Bucket;
00045 using stk::mesh::BulkData;
00046 using stk::mesh::Entity;
00047 using stk::mesh::EntityId;
00048 using stk::mesh::EntityKey;
00049 using stk::mesh::EntityRank;
00050 using stk::mesh::EntityVector;
00051 using stk::mesh::Field;
00052 using stk::mesh::PairIterRelation;
00053 using stk::mesh::Relation;
00054 using stk::mesh::RelationVector;
00055
00056 using Teuchos::RCP;
00057
00058 using Albany::STKDiscretization;
00059
00060 namespace LCM {
00061
00062 typedef stk::mesh::RelationIdentifier EdgeId;
00063
00064 typedef boost::vertex_name_t VertexName;
00065 typedef boost::edge_name_t EdgeName;
00066 typedef boost::property<VertexName, EntityRank> VertexProperty;
00067 typedef boost::property<EdgeName, EdgeId> EdgeProperty;
00068 typedef boost::listS List;
00069 typedef boost::vecS Vector;
00070 typedef boost::bidirectionalS Undirected;
00071
00072 typedef boost::adjacency_list<
00073 List, List, Undirected, VertexProperty, EdgeProperty> Graph;
00074
00075 typedef boost::property_map<Graph, VertexName>::type VertexNamePropertyMap;
00076 typedef boost::property_map<Graph, EdgeName>::type EdgeNamePropertyMap;
00077
00078 typedef boost::graph_traits<Graph>::vertex_descriptor Vertex;
00079 typedef boost::graph_traits<Graph>::edge_descriptor Edge;
00080 typedef boost::graph_traits<Graph>::vertex_iterator VertexIterator;
00081 typedef boost::graph_traits<Graph>::edge_iterator EdgeIterator;
00082 typedef boost::graph_traits<Graph>::out_edge_iterator OutEdgeIterator;
00083 typedef boost::graph_traits<Graph>::in_edge_iterator InEdgeIterator;
00084
00085 typedef Albany::AbstractSTKFieldContainer::IntScalarFieldType
00086 IntScalarFieldType;
00087
00088
00089 typedef std::pair<Entity*, Entity*> EntityPair;
00090
00091 enum FractureState {CLOSED = 0, OPEN = 1};
00092
00093 static EntityRank const
00094 INVALID_RANK = stk::mesh::fem::FEMMetaData::INVALID_RANK;
00095
00096 static EntityRank const
00097 NODE_RANK = stk::mesh::fem::FEMMetaData::NODE_RANK;
00098
00099 static EntityRank const
00100 EDGE_RANK = stk::mesh::fem::FEMMetaData::EDGE_RANK;
00101
00102 static EntityRank const
00103 FACE_RANK = stk::mesh::fem::FEMMetaData::FACE_RANK;
00104
00105 static EntityRank const
00106 VOLUME_RANK = stk::mesh::fem::FEMMetaData::VOLUME_RANK;
00107
00122 struct stkEdge {
00123 EntityKey source;
00124 EntityKey target;
00125 EdgeId local_id;
00126 };
00127
00131 struct EdgeLessThan
00132 {
00133 bool operator()(stkEdge const & a, stkEdge const & b) const
00134 {
00135 if (a.source < b.source) return true;
00136 if (a.source > b.source) return false;
00137
00138 return (a.target < b.target);
00139 }
00140 };
00141
00142 }
00143
00144 #endif // LCM_Topology_Types_h