Is it possible to import grid_function in bempp?

83 views
Skip to first unread message

Kanthasamy Chelliah

unread,
Apr 4, 2019, 2:18:43 PM4/4/19
to bempp
Hi.
I ran a simualtion on BEM++ to evaluate pressure field at particular points. Later, if I need to evaluate pressure at some other points (no change in boundary surfaces), do I need to run the whole problem again? I have saved the real and imaginary parts of the surface solution from the previous solution (using bempp.api.export(grid_function,fname,transformation) ). If I am able to import this grid_function, I can evaluate pressure at any point in the domain without needing to run the inverse problem solver again. I tried the bempp.api.import_grid() function, it did not work as it looks like it was designed for grid and not for grid_function whereas bempp.api.export can handle both grid and grid_functions. Is there any way to save and reuse the surface solution?
Thanks in advance!!

Timo Betcke

unread,
Apr 8, 2019, 8:11:07 AM4/8/19
to Kanthasamy Chelliah, bempp
Dear K, 

Travelling at the moment. But you can just save the coefficients as Numpy array and then regenerate the grid fct. from the coefficients. Any news with regards to consultancy? This is a typical integration thing that we usually do as part of consultancies dependent on the desired data formats.

Best wishes 

Timo

--
You received this message because you are subscribed to the Google Groups "bempp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bempp+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rene Velasquez

unread,
Nov 10, 2019, 2:54:56 PM11/10/19
to bempp
How can I convert a GridFunction into a Numpy array?
To unsubscribe from this group and stop receiving emails from it, send an email to be...@googlegroups.com.

Matthew Scroggs

unread,
Feb 19, 2020, 6:05:23 AM2/19/20
to bempp
Hello,

You can get an array of coefficients with `fun.coefficients` (where `fun` is your GridFunction).

You can then later reconstruct the GridFunction with `GridFunction(space, coefficients=co)`, where `space` is the space the function lives on, and `co` are the coefficents you extracted.
Reply all
Reply to author
Forward
0 new messages