Solution value at the flux point

Hello everyone,
I want to calculate the solution value at the flux point, Q_{i,FP} = Q_{i,j}*L_{i,j}(x_{i,FP},y_{i,FP}), where Q_{i,j} is solution at solution point, x_{i,FP} and y_{i,FP} is the coordinate of the flux point. Could someone give me some insight?

Solution to flux point interpolation is usually handled by the m0 operator. From this it is just a case of tracing through the flux point you want (the fpts and upts members of the shape will help you here).

Regards, Freddie.

Thanks a lot.

And which mako file is kernel mul defined in? Is this solution to flux point interpolation? I need to calculate the solution to all flux points in one element? Is there anything I can refer to?

Best regards

Just apply M0 the operator to your array (one operator per element type). The mul kernel itself is not implemented in Mako and falls back to either GiMMiK or BLAS.

Regards, Freddie.

I want to loop the solution value at the flux point in the current element in the Mako file. First, I use m0=self.basis.m0 to get m0 operator marix in the euler/element.py. Then how to get the value at the solution points(state matrix)? Could you give me some more details?

Just look at how m0 is used in the code! Usually this forms a kernel called disu. We can apply it as:

which adds the interpolation operator to each element type in our domain to our graph. After this kernel has run the result is put in _scal_fpts for each element type as per:

so if you want to loop over these flux points (a highly dubious operation which is probably not justified mathematically…) you can do so with a 1D kernel which is passed _scal_fpts as an input. Just make sure that when this kernel is added to the graph it is marked as a dependency of eles/disu.

Regards, Freddie.

for l in k[‘eles/disu’]:
g1.add(l, deps=deps(l, ‘eles/limiter’)). I use this code to add the grdph. Then in the euler/element.py I passed _scal_fpts as an input in the kenrnel function. Last, I set f[{str(nfpts)}][{str(nvars)}] to receive _scal_fpts, and I do loop in f[{str(nfpts)}][{str(nvars)}]. But there are still questions about the results.

Am I right about the above?

Best regards

Yes, that looks about right. Just be sure that your kernel is not scheduled to run after another kernel which overrides _scal_fpts (such as the common flux kernels).

Regards, Freddie.

That means I have to set limiter before the rhs_with_postproc in the std/steppers.py? and that’s what I have done.

When you run the graph is up to you. However, the disu kernel must run before the limiter kernel in the graph.

Regards, Freddie.