Sparse GridFunction in MFEM #3824
Unanswered
eliasboegel
asked this question in
Q&A
Replies: 2 comments 7 replies
-
Hi @tzanio, Thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @eliasboegel, Sorry for the delayed response. I can't think of a simple approach to use existing MFEM classes instead of writing a new one. This is something we will like to do, but it is not on our short term plan. One of the difficulties is to come up with an interface that is both general, easy to use and performant 😁. If you want to work on it, we can schedule a telecon to brainstorm ideas. Tzanio |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
As I alluded to during the MFEM tutorial today, I have a use-case that I am not quite sure how hard it is to adapt MFEM for. Let me also preface this with saying that I am at this point very unfamiliar with MFEM, but have read the paper and have gone through some examples.
I solve the Boltzmann equation, which has 1 to 3 velocity dimensions, 1 to 3 spatial dimensions and the time dimensions. For simplicity I'll assume no collisionality since it does not add anything to the context here and will use the 1D1V version of this equation as the example, together with the assumption of no acceleration being present, to really create a minimal example:
$$\frac{\partial f(x,v,t)}{\partial t} + v\frac{\partial f(x,v,t)}{\partial x} = 0$$
I discretize the velocity dimension(s) by expanding in velocity space with Hermite functions$\phi_i$ :
$$f(x,v,t) = \sum_{i=0}^n c_i(x,t)\phi_i(v)$$
After some manipulation, we arrive at the following system:
$$\frac{\partial c_j(x,t)}{\partial t} + k_{j-1}\frac{\partial c_{j-1}(x,t) }{\partial x}+ k_{j+1}\frac{\partial c_{j+1}(x,t)}{\partial x} = 0$$
An essential part of the method is that the expansion order of the spectral discretization in velocity space is adaptive and can vary in physical space and time. That basically leaves me a standard advection equation of coefficients$c_j(x,t)$ with $j\in0, 1, ..., n$ where $n$ is integer and $n=n(x,t)$ . I would like to discretize all remaining dimensions with MFEM. In computation of a term that involves " $j>n$ " so to speak, I want to use a "default value" of zero, equivalent to ignoring those Hermite terms. This, to me, looks like it requires something like $n(x,t)$ to be able to keep track of the expansion order in space and time.
GridFunction
, but sparse. Instead of storing a huge amount of zeroes, I would like to storeI already understood from the short conversation during the tutorial that there is currently no sparse
GridFunction
.GridFunction
that I may be able to use in this scenario?GridFunction
?Beta Was this translation helpful? Give feedback.
All reactions