Dear all,
I am using the StatCurrentSolver and I have noted that zero values are not exactly zero with iterative solvers, whereas they are with direct solvers.
For example values are in this type of range: 1.0E-30 V, 1.0E-50V, 1.0E-80V with the iterative method whereas with the direct method I get exactly 0 V.
I don't understand because the potential is defined with boundary conditions at 0 V so I expected to get exactly 0 V on nodes at the boundaries.
Should I set specific parameters to the iterative solver so that getting 0 V on boundary surfaces?
Thanks
Difference between Direct and Iterative methods
-
- Site Admin
- Posts: 4832
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Difference between Direct and Iterative methods
Hi
Iterative methods have a tolerance that is typically in range 1e-6...1e-12. The tougher the tolerance the closer you get to direct solvers.
There is no point in trying to get to zero since for double precision eps=EPSILON(x)=2.2204460492503131E-016. This means that for x<eps we have always 1+x=1. This is not Elmer specific. If you are using GPU's that operate on single precision this may be a real issue.
-Peter
Iterative methods have a tolerance that is typically in range 1e-6...1e-12. The tougher the tolerance the closer you get to direct solvers.
There is no point in trying to get to zero since for double precision eps=EPSILON(x)=2.2204460492503131E-016. This means that for x<eps we have always 1+x=1. This is not Elmer specific. If you are using GPU's that operate on single precision this may be a real issue.
-Peter
Re: Difference between Direct and Iterative methods
Thanks Peter.
But why nodes (on boundaries) for which the potential is known are not 0 V like with Direct methods ?
Do you mean that a solution is still computed for these nodes with iterative methods?
But why nodes (on boundaries) for which the potential is known are not 0 V like with Direct methods ?
Do you mean that a solution is still computed for these nodes with iterative methods?
-
- Site Admin
- Posts: 4832
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Difference between Direct and Iterative methods
Hi
Dirichlet conditions are not eliminated. Instead the matrix row is zeroed except for the diagonal entry which allows to set identity A_ii*x_i=b_i.
Elimination has its pros and cons. For example, the matrices would be smaller and retain full symmetry (if initially symmetric) with elimination. On the other hand, toggling between boundary conditions (like in contact mechanics) would result to lot of additional work. As for now, the default is that Dirichlet conditions are not eliminated.
-Peter
Dirichlet conditions are not eliminated. Instead the matrix row is zeroed except for the diagonal entry which allows to set identity A_ii*x_i=b_i.
Elimination has its pros and cons. For example, the matrices would be smaller and retain full symmetry (if initially symmetric) with elimination. On the other hand, toggling between boundary conditions (like in contact mechanics) would result to lot of additional work. As for now, the default is that Dirichlet conditions are not eliminated.
-Peter