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
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 #ifndef __Teko_PCDStrategy_hpp__
00048 #define __Teko_PCDStrategy_hpp__
00049
00050 #include "Teko_LU2x2Strategy.hpp"
00051
00052
00053 #include "Teuchos_Time.hpp"
00054
00055 namespace Teko {
00056 namespace NS {
00057
00066 class PCDStrategy : public LU2x2Strategy {
00067 public:
00069 PCDStrategy();
00070
00072 PCDStrategy(const Teuchos::RCP<InverseFactory> & invFA,
00073 const Teuchos::RCP<InverseFactory> & invS);
00074
00076 virtual ~PCDStrategy() {}
00077
00079 virtual const Teko::LinearOp
00080 getHatInvA00(const Teko::BlockedLinearOp & A,BlockPreconditionerState & state) const;
00081
00083 virtual const Teko::LinearOp
00084 getTildeInvA00(const Teko::BlockedLinearOp & A,BlockPreconditionerState & state) const;
00085
00087 virtual const Teko::LinearOp
00088 getInvS(const Teko::BlockedLinearOp & A,BlockPreconditionerState & state) const;
00089
00097 virtual void initializeFromParameterList(const Teuchos::ParameterList & settings,
00098 const InverseLibrary & invLib);
00099
00123 virtual Teuchos::RCP<Teuchos::ParameterList> getRequestedParameters() const;
00124
00147 virtual bool updateRequestedParameters(const Teuchos::ParameterList & pl);
00148
00149 protected:
00152 static void buildTimers();
00153
00160 void initializeState(const Teko::BlockedLinearOp & A,BlockPreconditionerState & state) const;
00161
00162
00163 Teuchos::RCP<InverseFactory> invFactoryF_;
00164 Teuchos::RCP<InverseFactory> invFactoryS_;
00165
00166 DiagonalType massInverseType_;
00167
00169 Teuchos::RCP<Teuchos::ParameterList> lapParams_;
00170
00172 Teuchos::RCP<Teuchos::ParameterList> pcdParams_;
00173
00174 bool schurCompOrdering_;
00175
00176 static Teuchos::RCP<Teuchos::Time> initTimer_;
00177 static Teuchos::RCP<Teuchos::Time> invSTimer_;
00178 static Teuchos::RCP<Teuchos::Time> invFTimer_;
00179 static Teuchos::RCP<Teuchos::Time> opsTimer_;
00180
00181 public:
00182
00183
00184 static std::string getPCDString() { return "PCD Operator"; }
00185 static std::string getPressureLaplaceString() { return "Pressure Laplace Operator"; }
00186 static std::string getPressureMassString() { return "Pressure Mass Matrix"; }
00187 };
00188
00189 }
00190 }
00191
00192 #endif