2
$\begingroup$

I am doing some simulations with Finite Element Analysis (FEA) and part of it is forming a mesh in 3D and then using NDSolveValue to solve a differential equation on that mesh.

For some meshes, my program runs in a minute or less. For others, it quickly eats up all my RAM and then basically crashes the program, or even my PC. Recently I have begun using MemoryConstrained to limit the RAM the program can use to 2GB.

This works fairly well, but I'd like to basically be able to do the finest mesh my PC will allow, and my current method for probing that "upper limit" is to basically try values until I find one that crashes it, and then not use that, which is obviously not that smart.

Is there a way to do this "smarter"?

I should also mention that the problem seems like it can come from two sources: actually forming the mesh itself, or trying to solve with NDSolveValue. For example, sometimes it'll produce the mesh without eating too much memory, but when it gets to NDSolveValue, that'll crash it. I'm not too familiar with the inner workings of FEA, but I assume that it has to produce and simplify a massive matrix or something.

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.