FastFieldSolvers Forum
FastFieldSolvers Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
 All Forums
 FastFieldSolvers
 Development
 FasterCap code issue?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

yan

9 Posts

Posted - Apr 19 2023 :  10:09:36  Show Profile  Reply with Quote
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  Show Profile  Reply with Quote
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


Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
FastFieldSolvers Forum © 2020 FastFieldSolvers S.R.L. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.06