Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
EdgeElements.hpp
1#ifndef EdgeElements_hpp
2#define EdgeElements_hpp
3#include "Elements.hpp"
4#include "feddlib/core/LinearAlgebra/Map.hpp"
5#include <Teuchos_OrdinalTraits.hpp>
14
15namespace FEDD {
16
17class EdgeElements : public Elements {
18
19 public:
20 typedef default_lo LO;
21 typedef default_go GO;
22 typedef default_no NO;
23 typedef Elements Elements_Type;
24 typedef Map<LO,GO,NO> Map_Type;
25 typedef typename Map_Type::MapPtr_Type MapPtr_Type;
26 typedef typename Map_Type::MapConstPtr_Type MapConstPtr_Type;
27 typedef Teuchos::RCP<FE_vec_Type> FE_vec_ptr_Type;
28
29 EdgeElements();
30
31 EdgeElements( EdgeElements& EdgeElements );
32
33 void addEdge( FiniteElement& fe, GO globalID );
34
35 void setElementsEdges( vec2D_GO_Type& elementsOfEdge );
36
37 void partitionEdges( MapConstPtr_Type elementMap, MapConstPtr_Type nodeMapRepeated);
38
39 void sortUniqueAndSetGlobalIDs(vec2D_GO_Type &combinedElements);
40
41 void makeUniqueWithCombines( FE_vec_ptr_Type& elements, vec2D_GO_Type& combinedElements, vec2D_GO_Type& globaIDs );
42
43 FE_vec_ptr_Type sort_from_ref( FE_vec_ptr_Type& elements, std::vector<int> const& reference );
44
45 vec2D_GO_Type sort_from_ref( vec2D_GO_Type const& in, std::vector<int> const& reference );
46
47 const vec_LO_Type& getElementsOfEdge( int i );
48
49 const vec_GO_Type& getElementsOfEdgeGlobal( int i );
50
51 vec2D_GO_Type getElementsOfEdgeGlobal(){return elementsOfEdgeGlobal_;};
52
53 vec2D_LO_Type getElementsOfEdgeLocal(){return elementsOfEdgeLocal_;};
54
55 const vec_int_Type getEdgesOfElement( int i ); // returns the edges of Element i ( , , )
56
57 void matchEdgesToElements( MapConstPtr_Type elementMap ); // matches the corresponding edges to the elements
58
59 void setMidpoint( LO edgeId, LO localID );
60
61 int getMidpoint( LO edgeId );
62
63 LO findEdgeId ( LO nodeId1, LO nodeID2);
64
65 void sortUniqueAndSetGlobalIDsParallel( MapConstPtr_Type elementMap, vec2D_GO_Type& combinedElements );
66
67 void setElementsOfEdgeLocalEntry(int index, int entry);
68
69 void setElementsOfEdgeGlobalEntry(int index, int entry);
70
71 void setUpElementsOfEdge( MapConstPtr_Type elementMap, MapConstPtr_Type edgeMap );
72
73 vec_GO_Type determineInterfaceEdges( MapConstPtr_Type edgeMap );
74
75
76
77 private:
78
79 vec2D_GO_Type elementsOfEdgeGlobal_;
80 vec2D_LO_Type elementsOfEdgeLocal_;
81 vec2D_int_Type edgesOfElements_; // Edges of Element i are being stored in row i of edgesOfElements_
82 vec_LO_Type midPointsLocalID_; // Returns the local index of the Node that is the midpoint of edge 'i'
83
84};
85}
86#endif
Definition FiniteElement.hpp:17
Definition Map_decl.hpp:36
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5