Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef THYRA_ML_PRECONDITIONER_FACTORY_DECL_HPP
00031 #define THYRA_ML_PRECONDITIONER_FACTORY_DECL_HPP
00032
00033 #include "SundanceDefs.hpp"
00034
00035 #ifndef TRILINOS_6
00036
00037 #include "Thyra_PreconditionerFactoryBase.hpp"
00038 #include "Thyra_EpetraOperatorViewExtractorBase.hpp"
00039 #include "Teuchos_StandardCompositionMacros.hpp"
00040
00041 namespace Thyra {
00042
00043 using Teuchos::ParameterList;
00044 using Teuchos::RefCountPtr;
00045
00046
00047 enum EMLProblemType {ML_SmoothedAggregation,
00048 ML_DomainDecomposition,
00049 ML_DomainDecompositionML,
00050 ML_Maxwell};
00051
00052
00053
00054
00055
00056 class MLPreconditionerFactory : public PreconditionerFactoryBase<double> {
00057 public:
00058
00059
00060
00061
00062
00063 MLPreconditionerFactory(const RCP<ParameterList>& params);
00064
00065 MLPreconditionerFactory(const EMLProblemType& probType,
00066 const ParameterList& revisions=ParameterList());
00067
00068
00069 MLPreconditionerFactory(const std::string& probType,
00070 const ParameterList& revisions=ParameterList());
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080 STANDARD_COMPOSITION_MEMBERS( EpetraOperatorViewExtractorBase, epetraFwdOpViewExtractor )
00081
00082
00083
00084
00085
00086
00087
00088 bool isCompatible( const LinearOpBase<double> &fwdOp ) const;
00089
00090 bool applySupportsConj(EConj conj) const;
00091
00092 bool applyTransposeSupportsConj(EConj conj) const;
00093
00094 RCP<PreconditionerBase<double> > createPrec() const;
00095
00096 void initializePrec(
00097 const RCP<const LinearOpBase<double> > &fwdOp
00098 ,PreconditionerBase<double> *prec
00099 ,const ESupportSolveUse supportSolveUse
00100 ) const;
00101
00102 void uninitializePrec(
00103 PreconditionerBase<double> *prec
00104 ,RCP<const LinearOpBase<double> > *fwdOp
00105 ,ESupportSolveUse *supportSolveUse
00106 ) const;
00107
00108
00109
00110
00111
00112
00113
00114 void setParameterList(RCP<ParameterList> const& paramList);
00115
00116 RCP<ParameterList> getNonconstParameterList();
00117
00118 RCP<ParameterList> unsetParameterList();
00119
00120 RCP<const ParameterList> getParameterList() const;
00121
00122
00123
00124
00125
00126
00127 std::string description() const;
00128
00129
00130
00131 private:
00132
00133 RCP<ParameterList> reviseDefaultList(const ParameterList& defaults,
00134 const ParameterList& revisions) const;
00135
00136 std::string probToString(const EMLProblemType& probType) const ;
00137
00138 RCP<ParameterList> defaultParameters(const EMLProblemType& probType) const ;
00139
00140 RCP<ParameterList> defaultParameters(const std::string& probType) const ;
00141
00142
00143
00144
00145 RCP<ParameterList> paramList_;
00146
00147
00148
00149
00150
00151 static RCP<const ParameterList> generateAndGetValidParameters();
00152
00153 };
00154
00155 }
00156
00157 #endif
00158 #endif // THYRA_ML_PRECONDITIONER_FACTORY_DECL_HPP