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 <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 NonLinElasticity : 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 NonLinElasticity( const DomainConstPtr_Type &domain, std::string FEType, ParameterListPtr_Type parameterList );
59 ~NonLinElasticity();
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// virtual void assembleExternal( std::string type ){};
80
81 Teuchos::RCP< Thyra::LinearOpBase<SC> > create_W_op() const;
82
83 Teuchos::RCP<Thyra::PreconditionerBase<SC> > create_W_prec() const;
84
85private:
86
87 virtual void evalModelImpl(
88 const ::Thyra::ModelEvaluatorBase::InArgs<SC> &inArgs,
89 const ::Thyra::ModelEvaluatorBase::OutArgs<SC> &outArgs
90 ) const;
91
92 mutable MultiVectorPtr_Type u_rep_;
93 double E_;
94 double mue_;
95 double C_;
96 double poissonRatio_;
97 double lambda_;
98 /*####################*/
99
100};
101}
102#endif
Definition Problem_decl.hpp:38
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5