Author |
Topic |
|
yan
9 Posts |
Posted - Apr 19 2023 : 10:09:36
|
Dear Enrico: In code: #define AUTOREFINE_PRECOND_NONE 0 #define AUTOREFINE_PRECOND_JACOBI 1 #define AUTOREFINE_PRECOND_BLOCK 2 #define AUTOREFINE_PRECOND_SUPER 4 #define AUTOREFINE_PRECOND_HIER 8
In function: void CSolveCap::MakePreconditioner() You say: // only if using Super precond or Hier precond and Super precond can be used to accelerate iterations if( (m_clsGlobalVars.m_ucPrecondType & AUTOREFINE_PRECOND_SUPER) != 0) First:if set m_ucPrecondType = AUTOREFINE_PRECOND_HIER (value is 8) Second 8 & 4(AUTOREFINE_PRECOND_SUPER) = 0 Only super can enter if.hier can't.
In Function "RecurseComputePrecond"also have this issue, only super can enter if // only if using Super precond or Hier precond and Super precond can be used to accelerate iterations if(m_clsGlobalVars.m_ucPrecondType & AUTOREFINE_PRECOND_SUPER) Do you mean: if ((m_clsGlobalVars.m_ucPrecondType & AUTOREFINE_PRECOND_SUPER) || (m_clsGlobalVars.m_ucPrecondType & AUTOREFINE_PRECOND_HIER) or: if use hier, I must set super and hier? = super | hier?
In function: CAutoRefine::RefineMutual(CAutoSegment *panel1, CAutoSegment *panel2) You use: // in this case, we are computing the preconditioner, so don't be too picky about approximation potstatus = PotEstimateOpt(panel1, panel2, potestim1, potestim2, AUTOREFINE_PRECOND_HIER); but in PostEstimateOpt, don't have AUTOREFINE_PRECOND_HIER so it need AUTOREFINE_PRECOND_HIER?
Thanks Yan |
|
Enrico
542 Posts |
Posted - Apr 20 2023 : 10:34:19
|
Hi Yan,
first of all, the only released pre-conditioners are JACOBI and SUPER (which is actually called more correctly 'two levels' preconditioner in the documentation and in the Run dialog). The others were experimental.
Said that:
in MakePreconditioner() there are three 'if' statements as you report, but if you select the SUPER, the code MUST enter all the three 'if' blocks (only in case we used HIER we should have the option to use both HIER and SUPER, but as said this is not released).
in RefineMutual(CAutoSegment *panel1, CAutoSegment *panel2) we actually call the PotEstimateOpt() function with the HIER parameter, but as you notice, this is dummy in this case - as the HIER preconditioner is not actually fully working. You should only care about SUPER.
Best Regards, Enrico
|
|
|
|
Topic |
|
|
|