Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
Elements.hpp
1#ifndef Elements_hpp
2#define Elements_hpp
3#include "feddlib/core/FEDDCore.hpp"
4#include "feddlib/core/Utils/FEDDUtils.hpp"
5#include "feddlib/core/General/DefaultTypeDefs.hpp"
6#include "feddlib/core/LinearAlgebra/Map.hpp"
7#include "feddlib/core/General/SmallMatrix.hpp"
8#include "FiniteElement.hpp"
9#include <Teuchos_RCPDecl.hpp>
10#include <Teuchos_RCPBoostSharedPtrConversions.hpp>
11
20
21namespace FEDD {
22class FiniteElement;
23class Elements {
24
25public:
26
27 typedef std::vector<FiniteElement> FE_vec_Type;
28 typedef Teuchos::RCP<FE_vec_Type> FE_vec_ptr_Type;
29 typedef default_lo LO;
30 typedef default_go GO;
31 typedef default_sc SC;
32 typedef default_no NO;
33
34 typedef Teuchos::RCP<const Map<LO,GO,NO> > MapConstPtr_Type;
35
36 typedef SmallMatrix<SC> SM_SC_Type;
37 typedef std::vector<SM_SC_Type> vecSM_SC_Type;
38
39 Elements();
40
41 Elements( std::string feType );
42
43 Elements( std::string feType, int dim );
44
45 Elements( Elements& Elements );
46
47 int numberElements();
48
49 void addElement( FiniteElement& fe );
50
51 void addElement( FiniteElement& fe, GO globalID );
52
53 void switchElement( int loc, FiniteElement& fe );
54
55 const FiniteElement& getElement( int i ) const;
56
57 FiniteElement& getElement( int i );
58
59 GO getGlobalID( LO i ) const;
60
61 void setFiniteElementType( std::string feType ){ FEType_ = feType; }
62
63 std::string getFiniteElementType( ){ return FEType_; }
64
65 void setDimension( int dim ){ dim_ = dim; }
66
67 int getDimension() {return dim_;}
68
69 int nodesPerElement();
70
71 void sortUnique();
72
73 void sortUnique(vec2D_GO_Type &combinedElements);
74
75 void sortUniqueAndSetGlobalIDs();
76
77 void sortUniqueAndSetGlobalIDs(vec2D_GO_Type &combinedElements);
78
79 void print();
80
81 void globalToLocalIDs( MapConstPtr_Type map );
82
85
86 vec2D_int_Type getElementEdgePermutation();
87
88 vec2D_int_Type getSubElementPermutation();
89
90 vec2D_LO_Type getElementsNodeList();
91
92 void setElementsNodeList();
94 void initializeFEData( vec2D_dbl_ptr_Type pointsRep );
95
96 void buildTransformation( const vec_int_Type& element,
97 vec2D_dbl_ptr_Type pointsRep,
98 SM_SC_Type& B );
99
100 const SM_SC_Type& getBTinv(int i);
101
102 const double& getDetBTinv(int i);
103
104 FE_vec_ptr_Type elements_;
105 vec_GO_ptr_Type globalIDs_;
106 std::string FEType_;
107 int dim_;
108
109 vecSM_SC_Type vecBTinv_;
110 vec_dbl_Type vecDetBTinv_;
111 bool feDataInitialized_;
112
113 vec2D_LO_Type elementsNodeList_;
114
115};
116}
117#endif
void setToCorrectElement(FiniteElement &feSub)
Definition Elements.cpp:203
void initializeFEData(vec2D_dbl_ptr_Type pointsRep)
Definition Elements.cpp:307
Definition FiniteElement.hpp:17
This class represents a templated small Matrix of type T. Primarily created for 2x2 and 3x3 matrices....
Definition SmallMatrix.hpp:20
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement_decl.hpp:36