I created a parallelepipd magnetic field and now I try to have access to the magnetic field in a random point inside my magnetic volume (after interpolation). However, I cannot find any function for that, for example a function which could have the coordinates (x,y,z)in arguments and which could return either an error message if is outside the volume or outside the mesh if it is not interpolated either the value of the magnetic field.
Do you know a such function ?
Here is my code, which lines could I add for that ?
const unsigned int nx=13; const unsigned int ny=13; const unsigned int nz=251; const double xmin=-240; const double xmax=240; const double ymin=-240; const double ymax=240; const double zmin=-5000; const double zmax=5000; const std::string filename = "data_test.txt"; const std::string format= "XYZ"; ComponentVoxel *mesh=new ComponentVoxel(); mesh->SetMesh(nx,ny,nz,xmin,xmax,ymin,ymax,zmin,zmax); mesh->LoadMagneticField(filename,format,1,1); mesh->EnableInterpolation(true);
Thank you in advance for your answers,