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 "FiniteElement.hpp"
8#include <Teuchos_RCPDecl.hpp>
9#include <Teuchos_RCPBoostSharedPtrConversions.hpp>
10
19
20namespace FEDD {
21class FiniteElement;
22class Elements {
23
24public:
25
26 typedef std::vector<FiniteElement> FE_vec_Type;
27 typedef Teuchos::RCP<FE_vec_Type> FE_vec_ptr_Type;
28 typedef default_lo LO;
29 typedef default_go GO;
30 typedef default_sc SC;
31 typedef default_no NO;
32
33 typedef Teuchos::RCP<const Map<LO,GO,NO> > MapConstPtr_Type;
34
35 typedef SmallMatrix<SC> SM_SC_Type;
36 typedef std::vector<SM_SC_Type> vecSM_SC_Type;
37
38 Elements();
39
40 Elements( std::string feType );
41
42 Elements( std::string feType, int dim );
43
44 Elements( Elements& Elements );
45
46 int numberElements();
47
48 void addElement( FiniteElement& fe );
49
50 void addElement( FiniteElement& fe, GO globalID );
51
52 void switchElement( int loc, FiniteElement& fe );
53
54 const FiniteElement& getElement( int i ) const;
55
56 FiniteElement& getElement( int i );
57
58 GO getGlobalID( LO i ) const;
59
60 void setFiniteElementType( std::string feType ){ FEType_ = feType; };
61
62 std::string getFiniteElementType( ){ return FEType_; };
63
64 void setDimension( int dim ){ dim_ = dim; };
65
66 int getDimension() {return dim_;};
67
68 int nodesPerElement();
69
70 void sortUnique();
71
72 void sortUnique(vec2D_GO_Type &combinedElements);
73
74 void sortUniqueAndSetGlobalIDs();
75
76 void sortUniqueAndSetGlobalIDs(vec2D_GO_Type &combinedElements);
77
78 void print();
79
80 void globalToLocalIDs( MapConstPtr_Type map );
81
84
85 vec2D_int_Type getElementEdgePermutation();
86
87 vec2D_int_Type getSubElementPermutation();
88
89 vec2D_LO_Type getElementsNodeList();
90
91 void setElementsNodeList();
93 void initializeFEData( vec2D_dbl_ptr_Type pointsRep );
94
95 void buildTransformation( const vec_int_Type& element,
96 vec2D_dbl_ptr_Type pointsRep,
97 SM_SC_Type& B );
98
99 const SM_SC_Type& getBTinv(int i);
100
101 const double& getDetBTinv(int i);
102
103 FE_vec_ptr_Type elements_;
104 vec_GO_ptr_Type globalIDs_;
105 std::string FEType_;
106 int dim_;
107
108 vecSM_SC_Type vecBTinv_;
109 vec_dbl_Type vecDetBTinv_;
110 bool feDataInitialized_;
111
112 vec2D_LO_Type elementsNodeList_;
113
114};
115}
116#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:22
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5