The component was import from comsol, it is about two electrode with 2 cm gap,
the code from Garfield++ is like this:
fm.Initialise("Mesh.mphtxt", "dielectrics.dat", "Potential.txt", "cm");
fm.SetWeightingField("wPotential.txt","signal");
double wxx,wyy,wzz;
fm.WeightingField(0,0,1.5,wxx,wyy,wzz,"signal");
for(int i=0;i<5;i++)cout<<"**********************************************************"<<endl;
cout<<"weighting field=="<<" "<<wxx<<" "<<wyy<<" "<<wzz<<endl;
for(int i=0;i<5;i++)cout<<"**********************************************************"<<endl;
cout<<"weighting potential=="<<fm.WeightingPotential(0,0,1.5,"signal")<<endl;
for(int i=0;i<5;i++)cout<<"**********************************************************"<<endl;
// fm.EnableMirrorPeriodicityX();
// fm.EnableMirrorPeriodicityY();
fm.PrintRange();
the key comment from file "wPotential.txt" is like this:
% Model: Untitled.mph
% Version: COMSOL 6.0.0.318
% Date: May 29 2023, 10:48
% Dimension: 3
% Nodes: 209692
% Expressions: 1
% Description: 电势
% Length unit: cm
% x y z V (V)
1.191319747821612 1.349350904721154 2.5200000000000005 1
1.176234877953045 1.349041862073355 2.5500000000000007 0.9900892934114793
1.1631253566345796 1.3737282090550813 2.5200000000000005 1
1.1611500080844779 1.3487328194255563 2.5800000000000005 0.9850500777901273
1.1477913822477244 1.3731249561488506 2.5500000000000007 0.9899360030835282
1.134432756410971 1.3975170928721445 2.5200000000000005 1
1.1557649679462398 1.335173746850126 2.5200000000000005 1
1.1406800980776728 1.3348647042023272 2.5500000000000007 0.9935233578674209
1.1273214722409195 1.3592568409256212 2.5200000000000005 1
1.1202101880708677 1.3209965889790978 2.5200000000000005 1
1.0648373206384905 1.3663363628476513 2.5200000000000005 1
......
......
......
the related output comment is like this:
**********************************************************
**********************************************************
**********************************************************
**********************************************************
**********************************************************
weighting field== 0 0 0
**********************************************************
**********************************************************
**********************************************************
**********************************************************
**********************************************************
weighting potential==0.494956
**********************************************************
**********************************************************
**********************************************************
**********************************************************
**********************************************************
the result of weighting field seems wrong, as my opinion, it should be like this:(0,0, 0.5) .
it seems something is wrong with the file “wPotential.txt” from comsol,
is there something special when producing related file using comsol?