BiCG class
BiCG Charm++ chare array used to perform a distributed linear solve with the conjugate gradients algorithm.
Contents
Constructors, destructors, conversion operators
-
BiCG(std::tuple<tk::
CSR, std::vector<tk:: real>, std::vector<tk:: real>>&& system, const std::vector<std::size_t>& gid, const std::unordered_map<std::size_t, std::size_t>& lid, const NodeCommMap& nodecommmap) explicit - Constructor taking a tuple of {A,x,b} by rvalue reference.
- BiCG(CkMigrateMessage*) explicit
- Migrate constructor.
Public functions
-
auto BiCG(const CSR& A,
const std::vector<tk::
real>& x, const std::vector<tk:: real>& b, const std::vector<std::size_t>& gid, const std::unordered_map<std::size_t, std::size_t>& lid, const NodeCommMap& nodecommmap) -> BiCG_SDAG_CODE explicit - Constructor.
-
void solve(std::size_t maxit,
tk::
real tol, CkCallback c) - Solve linear system.
-
void init(const std::vector<tk::
real>& x, const std::vector<tk:: real>& b, const std::unordered_map<std::size_t, std::vector<std::pair<bool, tk:: real>>>& bc, std::size_t ignorebc, CkCallback cb) - Initialize linear solve: set initial guess and boundary conditions.
- void setup(CkCallback c)
- Setup solver.
-
void normb(tk::
real n) - Compute the norm of the right hand side.
-
void rho(tk::
real r) - Compute rho = (r,r)
-
void comres(const std::vector<std::size_t>& gid,
const std::vector<std::vector<tk::
real>>& rc) - Receive contributions to r = b - A * x on chare-boundaries.
-
void combc(const std::unordered_map<std::size_t, std::vector<std::pair<bool, tk::
real>>>& bc) - Receive contributions to boundary conditions on chare-boundaries.
-
void comq(const std::vector<std::size_t>& gid,
const std::vector<std::vector<tk::
real>>& qc) - Receive contributions to q = A * p on chare-boundaries.
-
void pq(tk::
real d) - Compute the dot product (p,q)
-
void ts(tk::
real d) - Compute the dot product (t,s)
-
void tt(tk::
real d) - Compute the dot product (t,t)
-
void normres(tk::
real r) - Compute the norm of the residual: (r,r)
-
void comprho(tk::
real r) - Compute the norm of the residual: (r0,r)
-
void normresomega(tk::
real r) - Compute the norm of the residual 2nd step: (r,r)
-
auto solution() const -> std::vector<tk::
real> - Access solution.
- auto converged() const -> bool
- Return convergence flag.
Pack/unpack (Charm++ serialization) routines
Function documentation
void tk:: BiCG:: pup(PUP::er& p) override
Pack/Unpack serialize member function.
| Parameters | |
|---|---|
| p in/out | Charm++'s PUP::er serializer object reference |