I want to extract the electric field values on each grid obtained through the direct solver during the TDEM calculation process, and then calculate the final electromagnetic response. However, due to the large matrix of electric field values on each grid (45000,501), I encountered a problem when saving. Therefore, I would like to ask if there are any other methods that can be optimized when saving, because I want to generate thousands of model electric field values
I’m not sure I fully understand your problem. Do you want to save each one of the electric field matrices to disk? Or are you trying to store all these arrays in memory at the same time?
Hello, thank you very much for your response. Your answer has been very helpful to me. Suppose I need to generate 1000 3D resistivity models and calculate their electric fields, while outputting their electric field matrices. I understand that each matrix requires a large amount of memory, and when I previously tried to export all 1000 electric field matrices at once, I encountered errors due to insufficient memory. Is it possible to save each matrix immediately after generating it and then delete the variable to free up memory for the next calculation, as long as my hard drive has enough space?
Additionally, since each electric field matrix is very large, but when calculating the final electromagnetic response, I need to provide a variable f, which, based on my research of related built-in functions, must include the electric field values of all the grid edges. Is there any method to save only a portion of the electric field values, yet still be able to compute the final electromagnetic response using these partial values? This would greatly reduce the memory size required to store the matrices. However, I haven’t found any related operations in SimPEG, so I’d like to consult with others. Thank you!