MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_RefMaxwell_decl.hpp
Go to the documentation of this file.
1 // @HEADER
2 //
3 // ***********************************************************************
4 //
5 // MueLu: A package for multigrid based preconditioning
6 // Copyright 2012 Sandia Corporation
7 //
8 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 // the U.S. Government retains certain rights in this software.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact
39 // Jonathan Hu (jhu@sandia.gov)
40 // Andrey Prokopenko (aprokop@sandia.gov)
41 // Ray Tuminaro (rstumin@sandia.gov)
42 //
43 // ***********************************************************************
44 //
45 // @HEADER
46 #ifndef MUELU_REFMAXWELL_DECL_HPP
47 #define MUELU_REFMAXWELL_DECL_HPP
48 
49 #include "MueLu_ConfigDefs.hpp"
50 #include "MueLu_BaseClass.hpp"
51 
56 #include "MueLu_SaPFactory_fwd.hpp"
59 #include "MueLu_Utilities_fwd.hpp"
60 
61 #include "MueLu_MasterList.hpp"
62 #include "MueLu_FactoryManager.hpp"
65 #include "MueLu_PerfUtils_fwd.hpp"
66 #include "MueLu_RAPFactory_fwd.hpp"
67 
70 
77 
80 #include "MueLu_Hierarchy_fwd.hpp"
81 
82 #include "Xpetra_Operator.hpp"
83 #include "Xpetra_Map_fwd.hpp"
84 #include "Xpetra_Matrix_fwd.hpp"
90 
91 namespace MueLu {
92 
252 template <class Scalar,
253  class LocalOrdinal,
254  class GlobalOrdinal,
255  class Node>
256 class RefMaxwell : public VerboseObject, public Xpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
257 #undef MUELU_REFMAXWELL_SHORT
258 #include "MueLu_UseShortNames.hpp"
259 
260  public:
264 
267  : HierarchyCoarse11_(Teuchos::null)
268  , Hierarchy22_(Teuchos::null)
269  , disable_addon_(MasterList::getDefault<bool>("refmaxwell: disable addon"))
270  , mode_(MasterList::getDefault<std::string>("refmaxwell: mode")) {
271  }
272 
275  : HierarchyCoarse11_(HH)
276  , Hierarchy22_(H22)
277  , disable_addon_(MasterList::getDefault<bool>("refmaxwell: disable addon"))
278  , mode_(MasterList::getDefault<std::string>("refmaxwell: mode")) {
279  }
280 
282  const Teuchos::RCP<Matrix> &Dk_1,
283  const Teuchos::RCP<Matrix> &Dk_2,
284  const Teuchos::RCP<Matrix> &D0,
285  const Teuchos::RCP<Matrix> &M1_beta,
286  const Teuchos::RCP<Matrix> &M1_alpha,
287  const Teuchos::RCP<Matrix> &Mk_one,
288  const Teuchos::RCP<Matrix> &Mk_1_one,
289  const Teuchos::RCP<Matrix> &invMk_1_invBeta,
290  const Teuchos::RCP<Matrix> &invMk_2_invAlpha,
291  const Teuchos::RCP<MultiVector> &Nullspace11,
292  const Teuchos::RCP<MultiVector> &Nullspace22,
293  const Teuchos::RCP<RealValuedMultiVector> &NodalCoords,
295  bool ComputePrec = true) {
296  int spaceNumber = List.get<int>("refmaxwell: space number", 1);
297  initialize(spaceNumber,
298  Dk_1, Dk_2, D0,
299  M1_beta, M1_alpha,
300  Mk_one, Mk_1_one,
301  invMk_1_invBeta, invMk_2_invAlpha,
302  Nullspace11, Nullspace22, NodalCoords,
303  List);
304  resetMatrix(SM_Matrix, ComputePrec);
305  }
306 
320  const Teuchos::RCP<Matrix> &D0_Matrix,
321  const Teuchos::RCP<Matrix> &Ms_Matrix,
322  const Teuchos::RCP<Matrix> &M0inv_Matrix,
323  const Teuchos::RCP<Matrix> &M1_Matrix,
324  const Teuchos::RCP<MultiVector> &Nullspace11,
325  const Teuchos::RCP<RealValuedMultiVector> &NodalCoords,
327  bool ComputePrec = true) {
328  initialize(D0_Matrix, Ms_Matrix, M0inv_Matrix, M1_Matrix, Nullspace11, NodalCoords, List);
329  resetMatrix(SM_Matrix, ComputePrec);
330  }
331 
344  const Teuchos::RCP<Matrix> &D0_Matrix,
345  const Teuchos::RCP<Matrix> &M0inv_Matrix,
346  const Teuchos::RCP<Matrix> &M1_Matrix,
347  const Teuchos::RCP<MultiVector> &Nullspace11,
348  const Teuchos::RCP<RealValuedMultiVector> &NodalCoords,
350  bool ComputePrec = true) {
351  initialize(D0_Matrix, M1_Matrix, M0inv_Matrix, M1_Matrix, Nullspace11, NodalCoords, List);
352  resetMatrix(SM_Matrix, ComputePrec);
353  }
354 
365  const Teuchos::RCP<Matrix> &M0inv_Matrix,
366  const Teuchos::RCP<Matrix> &M1_Matrix,
367  const Teuchos::RCP<MultiVector> &Nullspace11,
368  const Teuchos::RCP<RealValuedMultiVector> &NodalCoords,
370  : SM_Matrix_(Teuchos::null) {
371  initialize(D0_Matrix, M1_Matrix, M0inv_Matrix, M1_Matrix, Nullspace11, NodalCoords, List);
372  }
373 
385  const Teuchos::RCP<Matrix> &D0_Matrix,
386  const Teuchos::RCP<Matrix> &M1_Matrix,
387  const Teuchos::RCP<MultiVector> &Nullspace11,
388  const Teuchos::RCP<RealValuedMultiVector> &NodalCoords,
390  bool ComputePrec) {
391  initialize(D0_Matrix, M1_Matrix, Teuchos::null, M1_Matrix, Nullspace11, NodalCoords, List);
392  resetMatrix(SM_Matrix, ComputePrec);
393  }
394 
404  const Teuchos::RCP<Matrix> &M1_Matrix,
405  const Teuchos::RCP<MultiVector> &Nullspace11,
406  const Teuchos::RCP<RealValuedMultiVector> &NodalCoords,
408  : SM_Matrix_(Teuchos::null) {
409  initialize(D0_Matrix, M1_Matrix, Teuchos::null, M1_Matrix, Nullspace11, NodalCoords, List);
410  }
411 
418  RefMaxwell(const Teuchos::RCP<Matrix> &SM_Matrix,
420  bool ComputePrec = true);
421 
423  virtual ~RefMaxwell() {}
424 
427 
429  const Teuchos::RCP<const Map> getRangeMap() const;
430 
433  return SM_Matrix_;
434  }
435 
438 
440  void compute(bool reuse = false);
441 
443  void resetMatrix(Teuchos::RCP<Matrix> SM_Matrix_new, bool ComputePrec = true);
444 
448  void apply(const MultiVector &X, MultiVector &Y,
452 
454  bool hasTransposeApply() const;
455 
457 
459  void residual(const MultiVector &X,
460  const MultiVector &B,
461  MultiVector &R) const {
462  using STS = Teuchos::ScalarTraits<Scalar>;
463  R.update(STS::one(), B, STS::zero());
464  this->apply(X, R, Teuchos::NO_TRANS, -STS::one(), STS::one());
465  }
466 
467  private:
469 
482  void initialize(const Teuchos::RCP<Matrix> &D0_Matrix,
483  const Teuchos::RCP<Matrix> &Ms_Matrix,
484  const Teuchos::RCP<Matrix> &M0inv_Matrix,
485  const Teuchos::RCP<Matrix> &M1_Matrix,
486  const Teuchos::RCP<MultiVector> &Nullspace11,
487  const Teuchos::RCP<RealValuedMultiVector> &NodalCoords,
488  Teuchos::ParameterList &List);
489 
507  void initialize(const int k,
508  const Teuchos::RCP<Matrix> &Dk_1,
509  const Teuchos::RCP<Matrix> &Dk_2,
510  const Teuchos::RCP<Matrix> &D0,
511  const Teuchos::RCP<Matrix> &M1_beta,
512  const Teuchos::RCP<Matrix> &M1_alpha,
513  const Teuchos::RCP<Matrix> &Mk_one,
514  const Teuchos::RCP<Matrix> &Mk_1_one,
515  const Teuchos::RCP<Matrix> &invMk_1_invBeta,
516  const Teuchos::RCP<Matrix> &invMk_2_invAlpha,
517  const Teuchos::RCP<MultiVector> &Nullspace11,
518  const Teuchos::RCP<MultiVector> &Nullspace22,
519  const Teuchos::RCP<RealValuedMultiVector> &NodalCoords,
520  Teuchos::ParameterList &List);
521 
523  void determineSubHierarchyCommSizes(bool &doRebalancing, int &rebalanceStriding, int &numProcsCoarseA11, int &numProcsA22);
524 
526  void buildCoarse11Matrix();
527 
529  void rebalanceCoarse11Matrix(const int rebalanceStriding, const int numProcsCoarseA11);
530 
532  void build22Matrix(const bool reuse, const bool doRebalancing, const int rebalanceStriding, const int numProcsA22);
533 
534  public: // due to Cuda build errors otherwise
536  RCP<MultiVector> buildNullspace(const int spaceNumber, const Kokkos::View<bool *, typename Node::device_type> &bcs, const bool applyBCs);
537 
539  Teuchos::RCP<Matrix> buildProjection(const int spaceNumber, const RCP<MultiVector> &EdgeNullspace) const;
540 
547  void buildNodalProlongator(const Teuchos::RCP<Matrix> &A_nodal,
548  Teuchos::RCP<Matrix> &P_nodal,
549  Teuchos::RCP<MultiVector> &Nullspace_nodal,
550  Teuchos::RCP<RealValuedMultiVector> &Coords_nodal) const;
551 
558 
568  void buildProlongator(const int spaceNumber,
569  const Teuchos::RCP<Matrix> &A_nodal_Matrix,
570  const RCP<MultiVector> &EdgeNullspace,
571  Teuchos::RCP<Matrix> &edgeProlongator,
572  Teuchos::RCP<MultiVector> &coarseEdgeNullspace,
573  Teuchos::RCP<RealValuedMultiVector> &coarseNodalCoords) const;
574 
579  RCP<Matrix> buildAddon(const int spaceNumber);
580 
581  private:
583  void setupSubSolve(Teuchos::RCP<Hierarchy> &hierarchy,
584  Teuchos::RCP<Operator> &thyraPrecOp,
585  const Teuchos::RCP<Matrix> &A,
586  const Teuchos::RCP<MultiVector> &Nullspace,
588  Teuchos::ParameterList &params,
589  std::string &label,
590  const bool reuse,
591  const bool isSingular = false);
592 
594  void setFineLevelSmoother11();
595 
597  void applyInverseAdditive(const MultiVector &RHS, MultiVector &X) const;
598 
600  void solveH(const MultiVector &RHS, MultiVector &X) const;
601 
603  void solve22(const MultiVector &RHS, MultiVector &X) const;
604 
606  void allocateMemory(int numVectors) const;
607 
609  void dump(const RCP<Matrix> &A, std::string name) const;
610 
612  void dump(const RCP<MultiVector> &X, std::string name) const;
613 
615  void dumpCoords(const RCP<RealValuedMultiVector> &X, std::string name) const;
616 
618  void dump(const Teuchos::ArrayRCP<bool> &v, std::string name) const;
619 
621  void dump(const Kokkos::View<bool *, typename Node::device_type> &v, std::string name) const;
622 
624  Teuchos::RCP<Teuchos::TimeMonitor> getTimer(std::string name, RCP<const Teuchos::Comm<int> > comm = Teuchos::null) const;
625 
634  std::string solverName_;
636  size_t dim_;
664  Kokkos::View<bool *, typename Node::device_type::memory_space> BCrows11_, BCcols22_, BCdomain22_;
686  std::string mode_;
687 
690 };
691 
692 } // namespace MueLu
693 
694 #define MUELU_REFMAXWELL_SHORT
695 #endif // MUELU_REFMAXWELL_DECL_HPP
const Teuchos::RCP< Matrix > & getJacobian() const
Returns Jacobian matrix SM.
Teuchos::RCP< const Import > Importer22_
size_t dim_
The spatial dimension.
RCP< Matrix > buildAddon(const int spaceNumber)
Teuchos::RCP< SmootherPrototype > PreSmootherData11_
Teuchos::RCP< Matrix > R22_
MueLu::DefaultLocalOrdinal LocalOrdinal
Kokkos::View< bool *, typename Node::device_type::memory_space > BCdomain22_
void solve22(const MultiVector &RHS, MultiVector &X) const
apply solve to 2-2 block only
Teuchos::RCP< SmootherBase > PreSmoother11_
Teuchos::RCP< Teuchos::ParameterList > A22_RAP_reuse_data_
void dumpCoords(const RCP< RealValuedMultiVector > &X, std::string name) const
dump out real-valued multivector
const Teuchos::RCP< const Map > getRangeMap() const
Returns the Xpetra::Map object associated with the range of this operator.
Xpetra::MultiVector< coordinateType, LO, GO, NO > RealValuedMultiVector
Kokkos::View< bool *, typename Node::device_type::memory_space > BCrows11_
Vectors for BCs.
Teuchos::RCP< MultiVector > CoarseNullspace22_
Nullspace for coarse (2,2) problem.
T & get(const std::string &name, T def_value)
void setFineLevelSmoother11()
Set the fine level smoother.
Teuchos::RCP< Matrix > SM_Matrix_
The system that is getting preconditioned.
Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > MultiVector
Teuchos::RCP< Matrix > Mk_one_
mass matrices with unit weight on k-th and (k-1)-th spaces
std::string solverName_
The name of the solver.
Teuchos::RCP< Matrix > buildProjection(const int spaceNumber, const RCP< MultiVector > &EdgeNullspace) const
Builds a projection from a vector values space into a vector valued nodal space.
Teuchos::RCP< MultiVector > DxIntermediate_
void buildNodalProlongator(const Teuchos::RCP< Matrix > &A_nodal, Teuchos::RCP< Matrix > &P_nodal, Teuchos::RCP< MultiVector > &Nullspace_nodal, Teuchos::RCP< RealValuedMultiVector > &Coords_nodal) const
Teuchos::RCP< Matrix > A22_
void determineSubHierarchyCommSizes(bool &doRebalancing, int &rebalanceStriding, int &numProcsCoarseA11, int &numProcsA22)
Determine how large the sub-communicators for the two hierarchies should be.
Teuchos::RCP< SmootherBase > PostSmoother11_
void solveH(const MultiVector &RHS, MultiVector &X) const
apply solve to 1-1 block only
Teuchos::RCP< Matrix > Addon11_
the addon for the 11 block
Teuchos::RCP< Matrix > Mk_1_one_
void setParameters(Teuchos::ParameterList &list)
Set parameters.
MueLu::DefaultNode Node
Teuchos::RCP< Matrix > invMk_2_invAlpha_
Teuchos::ScalarTraits< Scalar >::magnitudeType magnitudeType
Teuchos::RCP< Matrix > D0_
D_0 matrix.
Teuchos::RCP< MultiVector > P11res_
Temporary memory.
RCP< MultiVector > buildNullspace(const int spaceNumber, const Kokkos::View< bool *, typename Node::device_type > &bcs, const bool applyBCs)
Builds a nullspace.
Verbose class for MueLu classes.
Static class that holds the complete list of valid MueLu parameters.
Preconditioner (wrapped as a Xpetra::Operator) for Maxwell&#39;s equations in curl-curl form...
Teuchos::RCP< const Import > ImporterCoarse11_
Importer to coarse (1,1) hierarchy.
RefMaxwell(const Teuchos::RCP< Matrix > &SM_Matrix, const Teuchos::RCP< Matrix > &D0_Matrix, const Teuchos::RCP< Matrix > &M1_Matrix, const Teuchos::RCP< MultiVector > &Nullspace11, const Teuchos::RCP< RealValuedMultiVector > &NodalCoords, Teuchos::ParameterList &List, bool ComputePrec)
Teuchos::RCP< MultiVector > P11resSubComm_
RefMaxwell(const Teuchos::RCP< Matrix > &SM_Matrix, const Teuchos::RCP< Matrix > &D0_Matrix, const Teuchos::RCP< Matrix > &M0inv_Matrix, const Teuchos::RCP< Matrix > &M1_Matrix, const Teuchos::RCP< MultiVector > &Nullspace11, const Teuchos::RCP< RealValuedMultiVector > &NodalCoords, Teuchos::ParameterList &List, bool ComputePrec=true)
void allocateMemory(int numVectors) const
allocate multivectors for solve
Teuchos::RCP< Matrix > coarseA22_
Teuchos::RCP< MultiVector > residual_
Teuchos::RCP< MultiVector > DxSubComm_
void applyInverseAdditive(const MultiVector &RHS, MultiVector &X) const
apply additive algorithm for 2x2 solve
Teuchos::RCP< MultiVector > P11resTmp_
Teuchos::RCP< Matrix > Dk_2_
D_{k-2} matrix.
Teuchos::RCP< Matrix > invMk_1_invBeta_
inverse of mass matrices on (k-1)-th and (k-2)-th space with weights 1/beta and 1/alpha respectively ...
Kokkos::View< bool *, typename Node::device_type::memory_space > BCcols22_
MueLu::DefaultScalar Scalar
void resetMatrix(Teuchos::RCP< Matrix > SM_Matrix_new, bool ComputePrec=true)
Reset system matrix.
MueLu::DefaultGlobalOrdinal GlobalOrdinal
void rebalanceCoarse11Matrix(const int rebalanceStriding, const int numProcsCoarseA11)
rebalance the coarse A11 matrix, as well as P11, CoordsCoarse11 and Addon11
Teuchos::ParameterList precList11_
Teuchos::RCP< const Import > DorigImporter_
Teuchos::RCP< Matrix > P11_
special prolongator for 11 block and its transpose
void initialize(const Teuchos::RCP< Matrix > &D0_Matrix, const Teuchos::RCP< Matrix > &Ms_Matrix, const Teuchos::RCP< Matrix > &M0inv_Matrix, const Teuchos::RCP< Matrix > &M1_Matrix, const Teuchos::RCP< MultiVector > &Nullspace11, const Teuchos::RCP< RealValuedMultiVector > &NodalCoords, Teuchos::ParameterList &List)
Teuchos::RCP< Hierarchy > Hierarchy22_
RCP< Matrix > buildVectorNodalProlongator(const Teuchos::RCP< Matrix > &P_nodal) const
Teuchos::RCP< MultiVector > Dres_
void dump(const RCP< Matrix > &A, std::string name) const
dump out matrix
void buildCoarse11Matrix()
Compute coarseA11 = P11^{T}*SM*P11 + addon efficiently.
int spaceNumber_
The number of the space in the deRham complex.
Teuchos::RCP< Teuchos::ParameterList > coarseA11_RAP_reuse_data_
Teuchos::RCP< Hierarchy > HierarchyCoarse11_
Two hierarchies: one for the coarse (1,1)-block, another for the (2,2)-block.
Teuchos::RCP< MultiVector > DTR11Tmp_
RefMaxwell(const Teuchos::RCP< Matrix > &SM_Matrix, const Teuchos::RCP< Matrix > &Dk_1, const Teuchos::RCP< Matrix > &Dk_2, const Teuchos::RCP< Matrix > &D0, const Teuchos::RCP< Matrix > &M1_beta, const Teuchos::RCP< Matrix > &M1_alpha, const Teuchos::RCP< Matrix > &Mk_one, const Teuchos::RCP< Matrix > &Mk_1_one, const Teuchos::RCP< Matrix > &invMk_1_invBeta, const Teuchos::RCP< Matrix > &invMk_2_invAlpha, const Teuchos::RCP< MultiVector > &Nullspace11, const Teuchos::RCP< MultiVector > &Nullspace22, const Teuchos::RCP< RealValuedMultiVector > &NodalCoords, Teuchos::ParameterList &List, bool ComputePrec=true)
Teuchos::RCP< Matrix > Dk_1_T_
RCP< Operator > thyraPrecOp22_
void build22Matrix(const bool reuse, const bool doRebalancing, const int rebalanceStriding, const int numProcsA22)
Setup A22 = D0^T SM D0 and rebalance it, as well as D0 and Coords_.
Teuchos::RCP< RealValuedMultiVector > CoordsCoarse11_
Teuchos::RCP< MultiVector > NullspaceCoarse11_
Nullspace for coarse (1,1) problem.
Teuchos::RCP< Matrix > M1_alpha_
Teuchos::RCP< Teuchos::TimeMonitor > getTimer(std::string name, RCP< const Teuchos::Comm< int > > comm=Teuchos::null) const
get a (synced) timer
void compute(bool reuse=false)
Setup the preconditioner.
Teuchos::RCP< MultiVector > P11xSubComm_
Teuchos::RCP< const Map > DorigDomainMap_
Teuchos::RCP< Teuchos::ParameterList > getValidParamterList()
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_HIGH) const
bool disable_addon_
Some options.
RefMaxwell(const Teuchos::RCP< Matrix > &D0_Matrix, const Teuchos::RCP< Matrix > &M1_Matrix, const Teuchos::RCP< MultiVector > &Nullspace11, const Teuchos::RCP< RealValuedMultiVector > &NodalCoords, Teuchos::ParameterList &List)
RefMaxwell(const Teuchos::RCP< Matrix > &SM_Matrix, const Teuchos::RCP< Matrix > &D0_Matrix, const Teuchos::RCP< Matrix > &Ms_Matrix, const Teuchos::RCP< Matrix > &M0inv_Matrix, const Teuchos::RCP< Matrix > &M1_Matrix, const Teuchos::RCP< MultiVector > &Nullspace11, const Teuchos::RCP< RealValuedMultiVector > &NodalCoords, Teuchos::ParameterList &List, bool ComputePrec=true)
virtual ~RefMaxwell()
Destructor.
Teuchos::RCP< Matrix > M1_beta_
mass matrices on first space with weights beta and alpha respectively
Teuchos::RCP< Matrix > coarseA11_
coarse 11, 22 and coarse 22 blocks
void setupSubSolve(Teuchos::RCP< Hierarchy > &hierarchy, Teuchos::RCP< Operator > &thyraPrecOp, const Teuchos::RCP< Matrix > &A, const Teuchos::RCP< MultiVector > &Nullspace, const Teuchos::RCP< RealValuedMultiVector > &Coords, Teuchos::ParameterList &params, std::string &label, const bool reuse, const bool isSingular=false)
Setup a subsolve.
Teuchos::ParameterList parameterList_
Parameter lists.
Teuchos::RCP< Matrix > P22_
special prolongator for 22 block and its transpose
Teuchos::RCP< RealValuedMultiVector > Coords22_
Teuchos::RCP< MultiVector > Nullspace11_
Nullspace for (1.1) block.
Teuchos::RCP< MultiVector > Nullspace22_
Teuchos::RCP< MultiVector > DresIntermediate_
Teuchos::RCP< MultiVector > P11x_
Teuchos::RCP< Matrix > R11_
void apply(const MultiVector &X, MultiVector &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar alpha=Teuchos::ScalarTraits< Scalar >::one(), Scalar beta=Teuchos::ScalarTraits< Scalar >::zero()) const
RefMaxwell(const Teuchos::RCP< Matrix > &D0_Matrix, const Teuchos::RCP< Matrix > &M0inv_Matrix, const Teuchos::RCP< Matrix > &M1_Matrix, const Teuchos::RCP< MultiVector > &Nullspace11, const Teuchos::RCP< RealValuedMultiVector > &NodalCoords, Teuchos::ParameterList &List)
const Teuchos::RCP< const Map > getDomainMap() const
Returns the Xpetra::Map object associated with the domain of this operator.
void residual(const MultiVector &X, const MultiVector &B, MultiVector &R) const
Compute a residual R = B - (*this) * X.
Teuchos::RCP< MultiVector > DresSubComm_
Teuchos::RCP< Teuchos::ParameterList > coarseA11_AP_reuse_data_
Teuchos::RCP< MultiVector > DresTmp_
Teuchos::RCP< Matrix > Addon22_
the addon for the 22 block
RCP< Operator > thyraPrecOpH_
Teuchos::ScalarTraits< Scalar >::coordinateType coordinateType
RefMaxwell(Teuchos::RCP< Hierarchy > HH, Teuchos::RCP< Hierarchy > H22)
Constructor with Hierarchies.
void buildProlongator(const int spaceNumber, const Teuchos::RCP< Matrix > &A_nodal_Matrix, const RCP< MultiVector > &EdgeNullspace, Teuchos::RCP< Matrix > &edgeProlongator, Teuchos::RCP< MultiVector > &coarseEdgeNullspace, Teuchos::RCP< RealValuedMultiVector > &coarseNodalCoords) const
Teuchos::RCP< Teuchos::ParameterList > A22_AP_reuse_data_
Teuchos::RCP< SmootherPrototype > PostSmootherData11_
Teuchos::RCP< MultiVector > Dx_
Teuchos::RCP< RealValuedMultiVector > NodalCoords_
Coordinates.
Teuchos::ParameterList precList22_
Teuchos::RCP< Matrix > Dk_1_
D_{k-1} matrix and its transpose.
bool hasTransposeApply() const
Indicates whether this operator supports applying the adjoint operator.