00001
00002
00003
00004
00005
00006
00007 #ifndef __Teko_ModALStrategy_hpp__
00008 #define __Teko_ModALStrategy_hpp__
00009
00010 #include "Teuchos_RCP.hpp"
00011
00012 #include "Thyra_LinearOpBase.hpp"
00013
00014 #include "Teko_Utilities.hpp"
00015 #include "Teko_InverseFactory.hpp"
00016 #include "Teko_BlockPreconditionerFactory.hpp"
00017
00018 #include "Teko_ALOperator.hpp"
00019
00020 namespace Teko
00021 {
00022
00023 namespace NS
00024 {
00025
00026 class ModALPrecondState;
00027
00028 class InvModALStrategy
00029 {
00030 public:
00031
00033 InvModALStrategy();
00034
00035 InvModALStrategy(const Teuchos::RCP<InverseFactory> & factory);
00036
00037 InvModALStrategy(const Teuchos::RCP<InverseFactory> & factory,
00038 LinearOp & pressureMassMatrix);
00039
00040 InvModALStrategy(const Teuchos::RCP<InverseFactory> & invFactA,
00041 const Teuchos::RCP<InverseFactory> & invFactS);
00042
00043 InvModALStrategy(const Teuchos::RCP<InverseFactory> & invFactA,
00044 const Teuchos::RCP<InverseFactory> & invFactS,
00045 LinearOp & pressureMassMatrix);
00046
00048 virtual
00049 ~InvModALStrategy()
00050 {
00051 }
00052
00060 virtual LinearOp
00061 getInvA11p(BlockPreconditionerState & state) const;
00062
00070 virtual LinearOp
00071 getInvA22p(BlockPreconditionerState & state) const;
00072
00080 virtual LinearOp
00081 getInvA33p(BlockPreconditionerState & state) const;
00082
00090 virtual LinearOp
00091 getInvS(BlockPreconditionerState & state) const;
00092
00100 virtual void
00101 buildState(const BlockedLinearOp & A, BlockPreconditionerState & state) const;
00102
00106 virtual void
00107 initializeState(const BlockedLinearOp & A, ModALPrecondState * state) const;
00108
00115 virtual void
00116 computeInverses(const BlockedLinearOp & A, ModALPrecondState * state) const;
00117
00123 void
00124 setPressureMassMatrix(const LinearOp & pressureMassMatrix);
00125
00131 void
00132 setGamma(double gamma);
00133
00138 virtual void
00139 setSymmetric(bool isSymmetric)
00140 {
00141 isSymmetric_ = isSymmetric;
00142 }
00143
00144 protected:
00145
00146
00147
00148
00149 Teuchos::RCP<InverseFactory> invFactoryA_;
00150 Teuchos::RCP<InverseFactory> invFactoryS_;
00151 LinearOp pressureMassMatrix_;
00152 double gamma_;
00153
00154 DiagonalType scaleType_;
00155 bool isSymmetric_;
00156 int dim_;
00157 };
00158
00159 }
00160
00161 }
00162
00163 #endif