Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
NonLinElasAssFE_decl.hpp
1#ifndef NonLinElasAssFE_decl_hpp
2#define NonLinElasAssFE_decl_hpp
3#include "feddlib/problems/abstract/NonLinearProblem.hpp"
4#include <Thyra_PreconditionerBase.hpp>
5#include <Thyra_ModelEvaluatorBase_decl.hpp>
14
15namespace FEDD{
16template <class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
17class NonLinElasAssFE : public NonLinearProblem<SC,LO,GO,NO> {
18
19public:
21
22 typedef Problem<SC,LO,GO,NO> Problem_Type;
23 typedef typename Problem_Type::Matrix_Type Matrix_Type;
24 typedef typename Problem_Type::MatrixPtr_Type MatrixPtr_Type;
25
26 typedef typename Problem_Type::MapConstPtr_Type MapConstPtr_Type;
27
28 typedef typename Problem_Type::BlockMatrix_Type BlockMatrix_Type;
29 typedef typename Problem_Type::BlockMatrixPtr_Type BlockMatrixPtr_Type;
30
31 typedef typename Problem_Type::MultiVector_Type MultiVector_Type;
32 typedef typename Problem_Type::MultiVectorPtr_Type MultiVectorPtr_Type;
33 typedef typename Problem_Type::MultiVectorConstPtr_Type MultiVectorConstPtr_Type;
34 typedef typename Problem_Type::BlockMultiVectorPtr_Type BlockMultiVectorPtr_Type;
35
36 typedef typename Problem_Type::DomainConstPtr_Type DomainConstPtr_Type;
37 typedef typename Problem_Type::CommConstPtr_Type CommConstPtr_Type;
38
39 typedef NonLinearProblem<SC,LO,GO,NO> NonLinearProblem_Type;
40 typedef typename NonLinearProblem_Type::BlockMultiVectorPtrArray_Type BlockMultiVectorPtrArray_Type;
41
42 typedef typename NonLinearProblem_Type::TpetraMatrix_Type TpetraMatrix_Type;
43
44 typedef typename NonLinearProblem_Type::ThyraVecSpace_Type ThyraVecSpace_Type;
45 typedef typename NonLinearProblem_Type::ThyraVec_Type ThyraVec_Type;
46 typedef typename NonLinearProblem_Type::ThyraOp_Type ThyraOp_Type;
47
48 typedef typename NonLinearProblem_Type::TpetraOp_Type TpetraOp_Type;
49
50 typedef Tpetra::CrsMatrix<SC, LO, GO, NO> tpetra_matrix;
51
52
54
56
57 NonLinElasAssFE( const DomainConstPtr_Type &domain, std::string FEType, ParameterListPtr_Type parameterList );
59 ~NonLinElasAssFE();
60
61 virtual void info();
62
63 virtual void assemble( std::string type = "" ) const;
64
65 void reAssemble(std::string type) const;
66
67 virtual void reAssemble( BlockMultiVectorPtr_Type previousSolution ) const{};
68
69 virtual void reAssemble( MatrixPtr_Type& massmatrix, std::string type ) const;
70
71 virtual void reAssembleExtrapolation(BlockMultiVectorPtrArray_Type previousSolutions);
72
73 virtual void calculateNonLinResidualVec(std::string type, double time=0.) const;
74
75 virtual void getValuesOfInterest( vec_dbl_Type& values ){};
76
77 virtual void computeValuesOfInterestAndExport() {};
78
79 void assembleSourceTermLoadstepping(double time=0.) const;
80
81 void updateTime() const;
82
83 void updateConcentration(MultiVectorConstPtr_Type concentration) {concentration_.reset(new MultiVector_Type (concentration));};
84// virtual void assembleExternal( std::string type ){};
85
86 Teuchos::RCP< Thyra::LinearOpBase<SC> > create_W_op() const;
87
88 Teuchos::RCP<Thyra::PreconditionerBase<SC> > create_W_prec() const;
89
90 mutable Teuchos::RCP<TimeSteppingTools> timeSteppingTool_;
91
92private:
93
94 virtual void evalModelImpl(
95 const ::Thyra::ModelEvaluatorBase::InArgs<SC> &inArgs,
96 const ::Thyra::ModelEvaluatorBase::OutArgs<SC> &outArgs
97 ) const;
98
99 mutable MultiVectorPtr_Type u_rep_;
100 MultiVectorPtr_Type concentration_;
101 double E_;
102 double mue_;
103 double C_;
104 double poissonRatio_;
105 double lambda_;
106 bool loadStepping_;
107 bool externalForce_;
108 bool nonlinearExternalForce_;
109
110 /*####################*/
111
112};
113}
114#endif
Definition Problem_decl.hpp:38
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5