Loading...
Searching...
No Matches
solver_abtb.h
Go to the documentation of this file.
#ifndef _SKIT_SOLVER_ABTB_H
#define _SKIT_SOLVER_ABTB_H
//
// This file is part of Rheolef.
//
// Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
//
// Rheolef is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// Rheolef is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Rheolef; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// =========================================================================
// AUTHOR: Pierre.Saramito@imag.fr
// DATE: 19 january 2012
namespace rheolef {
} // namespace rheolef
#include "rheolef/solver.h"
#include "rheolef/mixed_solver.h"
#include "rheolef/csr.h"
namespace rheolef {
//<solver_abtb:
template <class T, class M = rheo_default_memory_model>
class solver_abtb_basic {
public:
// typedefs:
typedef typename csr<T,M>::size_type size_type;
// allocators:
solver_abtb_basic ();
solver_abtb_basic (const csr<T,M>& a, const csr<T,M>& b, const csr<T,M>& mp,
const solver_option& opt = solver_option());
solver_abtb_basic (const csr<T,M>& a, const csr<T,M>& b, const csr<T,M>& c, const csr<T,M>& mp,
const solver_option& opt = solver_option());
// accessors:
void solve (const vec<T,M>& f, const vec<T,M>& g, vec<T,M>& u, vec<T,M>& p) const;
bool initialized() const;
const solver_option& option() const { return _opt; }
void set_inner_solver (const solver_basic<T,M>& sa) { _sa = sa; }
void set_preconditioner (const solver_basic<T,M>& smp) { _smp = smp; }
std::string name() const { return _sA.name(); }
std::string inner_name() const { return _sa.name(); }
std::string preconditionner_name() const { return _sa.name(); }
//>solver_abtb:
protected:
// internal
void init();
// data:
mutable solver_option _opt;
csr<T,M> _a;
csr<T,M> _b;
csr<T,M> _c;
csr<T,M> _mp;
solver_basic<T,M> _sA;
mutable solver_basic<T,M> _sa;
mutable solver_basic<T,M> _smp;
bool _need_constraint;
};
//<solver_abtb:
typedef solver_abtb_basic<Float,rheo_default_memory_model> solver_abtb;
//>solver_abtb:
} // namespace rheolef
#endif // _SKIT_SOLVER_ABTB_H
rheolef::csr
see the csr page for the full documentation
Definition csr.h:317
rheolef::solver_abtb_basic::_mp
csr< T, M > _mp
Definition solver_abtb.h:150
rheolef::solver_abtb_basic::init
void init()
Definition solver_abtb.cc:79
rheolef::solver_abtb_basic::_a
csr< T, M > _a
Definition solver_abtb.h:147
rheolef::solver_abtb_basic::_b
csr< T, M > _b
Definition solver_abtb.h:148
rheolef::solver_abtb_basic::name
std::string name() const
Definition solver_abtb.h:137
rheolef::solver_abtb_basic::solve
void solve(const vec< T, M > &f, const vec< T, M > &g, vec< T, M > &u, vec< T, M > &p) const
Definition solver_abtb.cc:117
rheolef::solver_abtb_basic::_sA
solver_basic< T, M > _sA
Definition solver_abtb.h:151
rheolef::solver_abtb_basic::_opt
solver_option _opt
Definition solver_abtb.h:146
rheolef::solver_abtb_basic::solver_abtb_basic
solver_abtb_basic()
Definition solver_abtb.cc:27
rheolef::solver_abtb_basic::_need_constraint
bool _need_constraint
Definition solver_abtb.h:154
rheolef::solver_abtb_basic::_sa
solver_basic< T, M > _sa
Definition solver_abtb.h:152
rheolef::solver_abtb_basic::option
const solver_option & option() const
Definition solver_abtb.h:134
rheolef::solver_abtb_basic::_c
csr< T, M > _c
Definition solver_abtb.h:149
rheolef::solver_abtb_basic::preconditionner_name
std::string preconditionner_name() const
Definition solver_abtb.h:139
rheolef::solver_abtb_basic::size_type
csr< T, M >::size_type size_type
Definition solver_abtb.h:120
rheolef::solver_abtb_basic::set_inner_solver
void set_inner_solver(const solver_basic< T, M > &sa)
Definition solver_abtb.h:135
rheolef::solver_abtb_basic::inner_name
std::string inner_name() const
Definition solver_abtb.h:138
rheolef::solver_abtb_basic::set_preconditioner
void set_preconditioner(const solver_basic< T, M > &smp)
Definition solver_abtb.h:136
rheolef::solver_abtb_basic::_smp
solver_basic< T, M > _smp
Definition solver_abtb.h:153
rheolef::solver_abtb_basic::initialized
bool initialized() const
Definition solver_abtb.cc:156
rheolef::solver_basic
Definition solver.h:264
rheolef::solver_option
see the solver_option page for the full documentation
Definition solver_option.h:155
rheolef::vec
see the vec page for the full documentation
Definition vec.h:79
rheolef::solver_abtb
solver_abtb_basic< Float, rheo_default_memory_model > solver_abtb
Definition solver_abtb.h:157
rheolef
This file is part of Rheolef.
Definition compiler_eigen.h:39
f
Definition cavity_dg.h:29
g
Definition cavity_dg.h:25
p
Definition sphere.icc:25
u
Definition leveque.h:25