Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Two very basic questions about direct solvers

Please login with a confirmed email address before reporting spam

Hi all,

I have two very basic questions about direct solvers.

1. Why is there convergence problem with direct solvers?
I suppose direct solvers inverse the matrix somehow directly, rather than iteratively, so why is there still convergence problem?

2. How are initial values used for direct solvers?
For iterative solvers I can understand it intuitively, but how does it works for direct solvers?

Best
--
Pu, ZHANG ??
Departamento de Física Teórica de la Materia Condensada,
Universidad Autónoma de Madrid,
Madrid, Spain.

5 Replies Last Post Dec 26, 2012, 11:35 a.m. EST

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Dec 26, 2012, 5:06 a.m. EST
One more question:

Is it possible to extract the matrix equation from COMSOL? I have convergence problem and can't get any clue from those error messages. If it's possible, I would like try to solve the matrix equation without COMSOL. Then at least this helps figure out what's the cause of the convergence problem.

Thanks!
--
Pu, ZHANG ??
Departamento de Física Teórica de la Materia Condensada,
Universidad Autónoma de Madrid,
Madrid, Spain.
One more question: Is it possible to extract the matrix equation from COMSOL? I have convergence problem and can't get any clue from those error messages. If it's possible, I would like try to solve the matrix equation without COMSOL. Then at least this helps figure out what's the cause of the convergence problem. Thanks! -- Pu, ZHANG ?? Departamento de Física Teórica de la Materia Condensada, Universidad Autónoma de Madrid, Madrid, Spain.

Josh Thomas Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Dec 26, 2012, 9:29 a.m. EST
Pu-

1) Direct solvers can return convergence errors. Really, it's just an error check. In my experience, the solver still outputs a solution anyway. If you want the error to go away, click on Direct in the Model Builder window and in the settings window reduce the Factor in error estimate from the default which is 400. You can also set the Check error estimate to No and you won't get the error. Search in the documentation for "Convergence Criteria" and you will see the inequality definition for the error check.

2) Initial values for time-dependent problems is the solution at t=0. If you are solving a non-linear problem, initial values is the initial guess at the solution. This is true whether you are using a direct or an iterative linear system solver.

3) I've not done this myself but some previous posts on this talk about using Matlab livelink to access the matrix equations before solving.

Best regards,
Josh Thomas
AltaSim Technologies
Pu- 1) Direct solvers can return convergence errors. Really, it's just an error check. In my experience, the solver still outputs a solution anyway. If you want the error to go away, click on Direct in the Model Builder window and in the settings window reduce the Factor in error estimate from the default which is 400. You can also set the Check error estimate to No and you won't get the error. Search in the documentation for "Convergence Criteria" and you will see the inequality definition for the error check. 2) Initial values for time-dependent problems is the solution at t=0. If you are solving a non-linear problem, initial values is the initial guess at the solution. This is true whether you are using a direct or an iterative linear system solver. 3) I've not done this myself but some previous posts on this talk about using Matlab livelink to access the matrix equations before solving. Best regards, Josh Thomas AltaSim Technologies

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Dec 26, 2012, 9:40 a.m. EST
Hi, Josh Thomas

Thanks a lot for your reply!

I checked the documentation about convergence criteria. For direct solver it is indeed just an error check.

I actually only concern a linear problem, then how's initial guess used for direct solvers. Are direct solvers supposed to require initial guesses?

About the extraction I will search around.

Thanks again!
--
Pu, ZHANG ??
Departamento de Física Teórica de la Materia Condensada,
Universidad Autónoma de Madrid,
Madrid, Spain.
Hi, Josh Thomas Thanks a lot for your reply! I checked the documentation about convergence criteria. For direct solver it is indeed just an error check. I actually only concern a linear problem, then how's initial guess used for direct solvers. Are direct solvers supposed to require initial guesses? About the extraction I will search around. Thanks again! -- Pu, ZHANG ?? Departamento de Física Teórica de la Materia Condensada, Universidad Autónoma de Madrid, Madrid, Spain.

Josh Thomas Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Dec 26, 2012, 11:31 a.m. EST
Pu-

My understanding is that initial values is NOT used if you have a linear, stationary problem.

Best regards,
Josh Thomas
AltaSim Technologies
Pu- My understanding is that initial values is NOT used if you have a linear, stationary problem. Best regards, Josh Thomas AltaSim Technologies

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Dec 26, 2012, 11:35 a.m. EST
Thanks for sharing your opinion!

I also think there's no way to use initial values during direct linear solving.

Best
--
Pu, ZHANG ??
Departamento de Física Teórica de la Materia Condensada,
Universidad Autónoma de Madrid,
Madrid, Spain.
Thanks for sharing your opinion! I also think there's no way to use initial values during direct linear solving. Best -- Pu, ZHANG ?? Departamento de Física Teórica de la Materia Condensada, Universidad Autónoma de Madrid, Madrid, Spain.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.