Author 
Topic 

teny
China
14 Posts 
Posted  Oct 26 2023 : 17:58:25

Dear Enrico: In the ComputeLeafPotentials_fast() function in FasterCap,
m_clsRecursVec[i]>m_pLeft>m_dPotential += m_clsRecursVec[i]>m_dPotential; m_clsRecursVec[i]>m_pRight>m_dPotential += m_clsRecursVec[i]>m_dPotential;
when calculating the potential for a leaf node, the father node's potential is directly added to the children nodes. Does this operation result in a higher value than explicitly calculating Ax0 for the matrix? The reason is that I believe the mutual potential between the father nodes and other nodes will be greater than the mutual potential between the children nodes and other nodes. I'm not sure if this understanding is accurate? 

Enrico
522 Posts 
Posted  Oct 28 2023 : 16:02:53

The structure is hierarchical. If two panels interacted at a certain level, the charges on the source panels generate a potential on the destination panels at that level. This is valid for every level; and in general, if two panels already interacted at a certain level, their children will NOT interact at below levels. Therefore at the end you need to 'push down' the potentials to the leaves, summing them.
I am not sure what you mean by "Axo". In any case, the method is similar to what described in Weiping Shi, Jianguo Liu, Naveen Kakani, Tiejun Yu, "A Fast Hierarchical Algorithm for ThreeDimensional Capacitance Extraction", IEEE Transactions on ComputerAided Design of Integrated Circuits and Systems, Vol. 21, No. 3, Mar 2002. You can reference to this paper for some details.
Best, Enrico



teny
China
14 Posts 
Posted  Oct 29 2023 : 12:05:38

Dear Enrico,
"Ax0" refers to the term on the left side of the equation in matrix calculations, Ax0 = b. For example, if we have three panels labeled C, D, and E, the computational complexity without using the Nbody algorithm is 9. The matrix constructed is
 CC CD CE  x0 b0  DC DD DE *x1 = b1  EC ED EE  x2 b2 The potential accumulation on panel C, given as CCAx0 + CDAx1CEAx2,When using the Nbody algorithm, if the mutual potential between the parent panels of C and D and panel E is directly accumulated on C/D panels, does this result in a greater accumulation of potential on panel C compared to the explicit calculation of potential on panel C? 2.What are the criteria for determining whether refinement is necessary? if( (panel1>m_ucType & AUTOPANEL_IS_DIEL) == AUTOPANEL_IS_DIEL) {
*panel1crit = fabs(potestim1 * panel2>GetLength() * panel2>GetLength() / (m_dMaxLength * m_dMaxLength * ccoeff));
if( *panel1crit > eps) {
forcerefinement = true;
}
}
else {
*panel1crit = fabs( (potestim1+0.0) * panel2>GetLength() / (m_dMaxLength * ccoeff) );
if( *panel1crit > eps) {
forcerefinement = true;
} The formula or physical basis of this code, may I inquire about it



Enrico
522 Posts 
Posted  Nov 13 2023 : 11:49:34

Question 1: No.
Let's make a practical example. Suppose we have two panels, A and B, at a certain distance:
/\ /\
/ \ / B\
/ A \ 

and we break A in C and D. So C is close to D, while B is farther away.
/\ /\
/  \ / B\
/C  D\ 

A possible potential matrix in this case could be (values are for the sake of the exercise only):
 C CD CB   10 8 3 
 DC D DB  =  8 20 5 
 BC BD B   3 5 30 
now let's say we want to evaluate the potential caused by a charge density of 1 on every panel, to keep calculations simple:
 10 8 3   1   10 + 8 + 3   21 
 8 20 5   1  =  8 + 20 + 5  =  33 
 3 5 30   1   3 + 5 + 30   38 
Now, since panels C and D are far away from B, we may want to approximate their interaction. In this case we consider the potential between panel A and B; this can be calculated from the potentials CB and DB by averaging the interaction value i.e. (3+5)/2 = 4
Now performing the same operation we have
 10 8 4   1   10 + 8 + 4   22 
 
 8 20 4   1  =  8 + 20 + 4  =  32 

 4 4 30   1   4 + 4 + 30   38 
It is clear that the entries CB and DB, as well asl BC and BD can be now considered as a single "super" entry with the value 4.
Let's use now the algorithm.
1) We distribute the charge. On panel C, D, B we have 1 each; on panel A we have the charge of C plus the charge of D = 1 + 1 = 2.
2) Now let's calculate the potentials created by the charges one by one.
The charge of panel C creates a potential 10*1 on panel C itself, a charge of 8*1 on panel D and nothing on panel B (as panel C does not interact directly with panel B: only its ancestor A has a direct interaction).
The charge of panel D creates a potential 20*1 on panel D itself, a charge of 8*1 on panel C and nothing on panel B (as panel D does not interact directly with panel B: only its ancestor A has a direct interaction).
The charge of panel B creates a potential 30*1 on panel B itself and a charge of 4*1 on panel A (while nothing on panel C and D, as it only interacts with the ancestor A). The charge of panel A creates a potential of 4*2 on panel B (remember that the charge of panel A is 2, as accumulated from panel C and D). Note that there is no autopotential accumulation for panel A; this already happened at leaf panel level i.e. C and D.
3) Let's now sum up at single panel level:
Panel C: 10*1 from itself, 8*1 from panel D = 18 Panel D: 20*1 from itself, 8*1 from panel C = 28 Panel B: 30*1 from itself, 4*2 from panel A = 38 Panel A: 4*1 from panel B = 4
4) Let's now push the potential to the leaves, following the superposition principle:
Panel C: 18 + 4*1 down from A = 22 Panel D: 28 + 4*1 down from A = 32 Panel B: 38
So you can see that the result is exactly what we expected by the explicit matrix multiplication above, but here we used less operations.
Regarding question 2, the refinement criteria is based on a normalized distance criteria between the two involved panels.
Best Regards, Enrico




Topic 


