Dear Alam,
I’m trying to use the interptri comment for my simulation file attached below:
The code I’m using is;
electrostatics=getresult(“CHARGE::E_field”,“electrostatics”);
E = pinch(electrostatics.E);
x = pinch(electrostatics.x);
y = pinch(electrostatics.y);
z = pinch(electrostatics.z);
vtx = [x,z];
elements = electrostatics.elements;
kern = size(E);
Ne = kern(1);
Nv = kern(2); # Number of bias points
x_rect = linspace(min(x),max(x),500);
y_rect = linspace(min(y),max(y),500);
z_rect = linspace(min(z),max(z),500);
E = E(1:Ne,Nv);
Interpolate
E_rect = interptri(elements,vtx,E,x_rect,z_rect);
However, after the interpolation is done, the maximum size of my E field changes from -687744 to -9223372036854775808! I’m not sure what I’m doing wrong in my code. Could you please take a look?
Thanks,
Shiva