Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
TriangleElements.hpp
1#ifndef SurfaceElements_hpp
2#define SurfaceElements_hpp
3#include "Elements.hpp"
4#include "EdgeElements.hpp"
5#include "feddlib/core/LinearAlgebra/Map.hpp"
6#include <Teuchos_OrdinalTraits.hpp>
15
16namespace FEDD {
17
18class SurfaceElements : public Elements {
19
20 public:
21 typedef default_lo LO;
22 typedef default_go GO;
23 typedef default_no NO;
24 typedef Elements Elements_Type;
25 typedef EdgeElements EdgeElements_Type;
26 typedef Teuchos::RCP<EdgeElements_Type> EdgeElementsPtr_Type;
27 typedef Map<LO,GO,NO> Map_Type;
28 typedef typename Map_Type::MapPtr_Type MapPtr_Type;
29 typedef typename Map_Type::MapConstPtr_Type MapConstPtr_Type;
30
31 SurfaceElements();
32
33 SurfaceElements( SurfaceElements& SurfaceElements );
34
35 void addSurface( FiniteElement& fe, GO globalID );
36
37 void addSurface( FiniteElement& fe, vec_GO_Type& elementsOfFace );
38
39 void setElementsSurface( vec2D_GO_Type& elementsOfSurface );
40
41 void partitionSurfaces( MapConstPtr_Type elementMap, MapConstPtr_Type nodeMapRepeated );
42
43 void sortUniqueAndSetGlobalIDs(vec2D_GO_Type &combinedElements);
44
45 void makeUniqueWithCombines( FE_vec_ptr_Type& elements, vec2D_GO_Type& combinedElements, vec2D_GO_Type& globaIDs );
46
47 FE_vec_ptr_Type sort_from_ref( FE_vec_ptr_Type& elements, std::vector<int> const& reference );
48
49 vec2D_GO_Type sort_from_ref( vec2D_GO_Type const& in, std::vector<int> const& reference );
50
51 const vec_LO_Type& getElementsOfSurfaceLocal( int i );
52
53 const vec_GO_Type& getElementsOfSurfaceGlobal( int i );
54
55 vec2D_GO_Type getElementsOfSurfaceGlobal(){return elementsOfSurfaceGlobal_;};
56
57 vec2D_LO_Type getElementsOfSurfaceLocal(){return elementsOfSurfaceLocal_;};
58
59 const vec_int_Type getSurfacesOfElement( int i ); // returns the Surfaces of Element i ( , , )
60
61 void matchSurfacesToElements(MapConstPtr_Type elementMap); // matches the corresponding Surfaces to the elements
62
63 void sortUniqueAndSetGlobalIDsParallel(MapConstPtr_Type elementMap, vec2D_GO_Type& combinedElements );
64
65 void setElementsOfSurfaceLocalEntry(int index, int entry);
66
67 void setElementsOfSurfaceGlobalEntry(int index, int entry);
68
69 void setUpElementsOfSurface( MapConstPtr_Type elementMap, MapConstPtr_Type edgeMap, EdgeElementsPtr_Type edgeElements);
70
71
72 private:
73
74 vec2D_GO_Type elementsOfSurfaceGlobal_;
75 vec2D_LO_Type elementsOfSurfaceLocal_;
76 vec2D_LO_Type surfacesOfElements_;
77
78};
79}
80#endif
Definition EdgeElements.hpp:17
Definition FiniteElement.hpp:17
Definition Map_decl.hpp:36
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5