13#include "function/vector.hh"
17#define ComposeConstr_D 0
18#define ComposeAppl_D 0
19#define SchurComplContr_D 0
34 class HashedSparseMatrix;
47 typedef typename Realtype<F>::type
r_type;
49 typedef typename Cmplxtype<F>::type
c_type;
98 virtual inline const uint dimY()
const {
return dimY_; }
100 virtual void show_messages() { }
102 virtual std::ostream&
info(std::ostream&
os)
const;
120 typedef typename Cmplxtype<F>::type
c_type;
167 virtual std::ostream&
info(std::ostream&
os)
const;
189 template<
class F,
class H = F>
209 virtual std::ostream&
info(std::ostream&
os)
const;
221 template<
class F,
class H>
223 :
Operator<F>(A.dimX(),
B.dimY()), A_(A), B_(
B), f_(
B.dimX()) {
225 "A is (" << A.
dimX() <<
"x" << A.
dimY() <<
") *" <<
226 "B is (" <<
B.dimX() <<
"x" <<
B.dimY() <<
")");
230 template<
class F,
class H>
233 DEBUGL(ComposeAppl_D, *
this);
235 "fncY.dim = " <<
fncY.dim() <<
", dimY = " <<
this->dimY());
237 "fncX.dim = " <<
fncX.dim() <<
", dimX = " <<
this->dimX());
240 DEBUGL(ComposeAppl_D,
"f = " << f_);
254 typedef typename Realtype<F>::type
r_type;
256 typedef typename Cmplxtype<F>::type
c_type;
278 virtual std::ostream&
info(std::ostream&
os)
const;
285 template<
class H,
class I>
290 template<
class H,
class I>
309 typedef typename Realtype<F>::type
r_type;
311 typedef typename Cmplxtype<F>::type
c_type;
345 virtual std::ostream&
info(std::ostream&
os)
const;
367 typedef typename Realtype<F>::type
r_type;
369 typedef typename Cmplxtype<F>::type
c_type;
419 virtual std::ostream&
info(std::ostream&
os)
const;
430 template<
class H,
class I>
435 template<
class H,
class I>
463 delete D_;
delete C_;
478 DEBUGL(SchurComplContr_D,
"A_II_inv = " <<
480 DEBUGL(SchurComplContr_D,
"A_IB = " <<
482 DEBUGL(SchurComplContr_D,
"A_BI = " <<
484 DEBUGL(SchurComplContr_D,
"A_BB = " <<
486 DEBUGL(SchurComplContr_D,
"C_ = AII^-1 * AIB = " <<
488 DEBUGL(SchurComplContr_D,
"D_ = ABI * AII^-1 * AIB = " <<
490 DEBUGL(SchurComplContr_D,
"S_ = A_BB - A_BI * A_II^-1 * A_IB = " <<
bool collapse(Matrix< F > &dest) const
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Compose(Operator< F > &A, Operator< H > &B)
Constructor.
virtual void operator()(const Function< c_type > &fncY, Function< c_type > &fncX)
Cmplxtype< F >::type c_type
Real type of data type.
bool collapse(Matrix< F > &dest, const F fact=1.0) const
virtual void operator()(const Function< r_type > &fncY, Function< F > &fncX)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Realtype< F >::type r_type
Real type of data type.
void operator()(const Function< r_type > &fncY, Function< F > &fncX)
bool collapse(Matrix< F > &dest, const F fact=1.0) const
Cmplxtype< F >::type c_type
Real type of data type.
Realtype< F >::type r_type
Real type of data type.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
LiCo(Operator< F > &A, Operator< F > &B, F a=1.0, F b=1.0)
void operator()(const Function< c_type > &fncY, Function< c_type > &fncX)
Cmplxtype< F >::type c_type
Real type of data type.
Realtype< F >::type r_type
Real type of data type.
void operator()(const Function< r_type > &fncY, Function< F > &fncX)
void operator()(const Function< c_type > &fncY, Function< c_type > &fncX)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual const uint dimY() const
virtual void operator()(const Function< c_type > &fncY, Function< c_type > &fncX)
Realtype< F >::type r_type
Real type of data type.
F type
Type of data, e.g. matrix entries.
Cmplxtype< F >::type c_type
Real type of data type.
virtual const uint dimX() const
virtual void operator()()
virtual void operator()(const Function< r_type > &fncY, Function< F > &fncX)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
uint dimX_
Dimension of image space and the source space.
SchurCompl(Operator< F > &A_II_inv, Operator< F > &A_IB, Operator< F > &A_BI, Operator< F > &A_BB)
Constructor.
Realtype< F >::type r_type
Real type of data type.
void operator()(const Matrix< r_type > &mX, Matrix< F > &mY)
Application method to real matrices. Calls function apply()
virtual void apply_(const Vector< F > &fncY, Vector< F > &fncX)=0
Cmplxtype< F >::type c_type
Real type of data type.
virtual void operator()(const Function< c_type > &fncY, Function< c_type > &fncX)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
void operator()()
Application method without second argument. Used for parallel solvers.
virtual void operator()(const Vector< c_type > &fncY, Vector< c_type > &fncX)
virtual void operator()(const Vector< r_type > &fncY, Vector< F > &fncX)
void operator()(const Matrix< c_type > &mX, Matrix< c_type > &mY)
Application method to complex matrices. Calls apply_()
#define conceptsAssert(cond, exc)
#define DEBUGL(doit, msg)
#define conceptsAssert3(cond, exc, msg)
Set< F > makeSet(uint n, const F &first,...)