Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
NonLinElasticity_decl.hpp
1#ifndef NonLinElasticity_decl_hpp
2#define NonLinElasticity_decl_hpp
3#include "feddlib/problems/abstract/NonLinearProblem.hpp"
4#include "feddlib/problems/Solver/TimeSteppingTools.hpp"
5#include <Thyra_PreconditionerBase.hpp>
6#include <Thyra_ModelEvaluatorBase_decl.hpp>
15
16namespace FEDD{
17template <class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
18class NonLinElasticity : public NonLinearProblem<SC,LO,GO,NO> {
19
20public:
22
23 typedef Problem<SC,LO,GO,NO> Problem_Type;
24 typedef typename Problem_Type::Matrix_Type Matrix_Type;
25 typedef typename Problem_Type::MatrixPtr_Type MatrixPtr_Type;
26
27 typedef typename Problem_Type::MapConstPtr_Type MapConstPtr_Type;
28
29 typedef typename Problem_Type::BlockMatrix_Type BlockMatrix_Type;
30 typedef typename Problem_Type::BlockMatrixPtr_Type BlockMatrixPtr_Type;
31
32 typedef typename Problem_Type::MultiVector_Type MultiVector_Type;
33 typedef typename Problem_Type::MultiVectorPtr_Type MultiVectorPtr_Type;
34 typedef typename Problem_Type::MultiVectorConstPtr_Type MultiVectorConstPtr_Type;
35 typedef typename Problem_Type::BlockMultiVectorPtr_Type BlockMultiVectorPtr_Type;
36
37 typedef typename Problem_Type::DomainConstPtr_Type DomainConstPtr_Type;
38 typedef typename Problem_Type::CommConstPtr_Type CommConstPtr_Type;
39
40 typedef NonLinearProblem<SC,LO,GO,NO> NonLinearProblem_Type;
41 typedef typename NonLinearProblem_Type::BlockMultiVectorPtrArray_Type BlockMultiVectorPtrArray_Type;
42
44
46
47 NonLinElasticity( const DomainConstPtr_Type &domain, std::string FEType, ParameterListPtr_Type parameterList );
49 ~NonLinElasticity();
50
51 virtual void info();
52
53 virtual void assemble( std::string type = "" ) const;
54
55 void reAssemble(std::string type) const;
56
57 void reAssemble( BlockMultiVectorPtr_Type previousSolution ) const override{}
58
59 virtual void reAssemble( MatrixPtr_Type& massmatrix, std::string type ) const;
60
61 virtual void reAssembleExtrapolation(BlockMultiVectorPtrArray_Type previousSolutions);
62
63 virtual void calculateNonLinResidualVec(std::string type, double time=0.) const;
64
65 void getValuesOfInterest( vec_dbl_Type& values ) override {}
66
67 void computeValuesOfInterestAndExport() override {}
68
69 void assembleSourceTermLoadstepping(double time=0.) const;
70
71 void updateTime() const;
72
73 void updateConcentration(MultiVectorConstPtr_Type concentration) {concentration_.reset(new MultiVector_Type (concentration));}
74
75 mutable Teuchos::RCP<TimeSteppingTools> timeSteppingTool_;
76
77
78private:
79
80 mutable MultiVectorPtr_Type u_rep_;
81 MultiVectorPtr_Type concentration_;
82 double E_;
83 double mue_;
84 double C_;
85 double poissonRatio_;
86 double lambda_;
87 bool loadStepping_;
88 bool externalForce_;
89 bool nonlinearExternalForce_;
90 /*####################*/
91
92};
93}
94#endif
void getValuesOfInterest(vec_dbl_Type &values) override
Virtual class to extract values of interest that are computed during the solve.
Definition NonLinElasticity_decl.hpp:65
virtual void calculateNonLinResidualVec(std::string type, double time=0.) const
Virtual function which is implemented in the specific non-linear problem classes to calculate the non...
Definition NonLinElasticity_def.hpp:247
virtual void assemble(std::string type="") const
assemble of type exectuted by the derived specific non-linear problem classes
Definition NonLinElasticity_def.hpp:57
NonLinearProblem(CommConstPtr_Type comm)
Definition NonLinearProblem_def.hpp:23
Definition Problem_decl.hpp:42
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement_decl.hpp:36