Registered Member
|
hello, i am trying finite element method to solve a Partial differential equation. The stiffness matrix is sparse and asymmetric,
so i decided use BiCGSTAB to solve the linear systems. But i get some problem is that Eigen::BiCGSTAB < SparseMatrix<double>> BCGST; BCGST.compute(stf); VectorXd coef1; coef1 = BCGST.solveWithGuess(bmatrix,coef); cout << "#iterations: " << BCGST.iterations() << std::endl; cout << "estimated error: " << BCGST.error() << std::endl; the stf and bmatrix has already been valued, the output is quite strange: #iterations: 1 estimated error: -1.#IND x(1,:)=[-1.78262,-1.#IND,-1.#IND,-1.#IND,-1.#IND,-1.#IND,-1.#IND,-1.#IND,-1.#IND,-1.#IND,-1.#IND,-1.#IND,1.78262,]; y(1,:)=[0,-1.#IND,-1.#IND,-1.#IND,-1.#IND,-1.#IND,-1.#IND,-1.#IND,-1.#IND,-1.#IND,-1.#IND,-1.#IND,0,]; area=[-1.#IND, ]; tao=[0, ]; length=[-1.#IND ,]; energy=[-1.#IND , ]; so what can i do? I have try different preconditioners, but still failed. Maybe i should just use SparseLU to solve it. |
Moderator
|
Make sure you are using the uptodate devel branch or Eigen 3.2.4. And yes, please try SparseLU too. If SparseLU works but BiCGSTAB still gives you ****, then send us the matrix and the right hand side.
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]