Skip to main content
edited tags
Link
user21
  • 40.1k
  • 8
  • 111
  • 167
syntax highlight
Source Link
AsukaMinato
  • 10.1k
  • 1
  • 15
  • 43

I am solving non-linear PDE using iterations. Correspondingly, the coefficients are functions on the (same) mesh that I have created and fixed. Between iterations I need to update these function by doing some arithmetic operations on them. Just doing all in a straightforward way leads to Mathematica being very slow. So, I have to prepare my PDE coefficients in advance by creating new interpolating functions for them. I do this via, for example

ElementMeshInterpolation[oldfunction["ElementMesh"], oldfunction["ValuesOnGrid"]^2]

ElementMeshInterpolation[oldfunction["ElementMesh"], oldfunction["ValuesOnGrid"]^2]

Is there a smart way to tell Mathematica to create a single interpolating function from arithmetic operations (and derivatives) of several functions on the same grid?

I am solving non-linear PDE using iterations. Correspondingly, the coefficients are functions on the (same) mesh that I have created and fixed. Between iterations I need to update these function by doing some arithmetic operations on them. Just doing all in a straightforward way leads to Mathematica being very slow. So, I have to prepare my PDE coefficients in advance by creating new interpolating functions for them. I do this via, for example

ElementMeshInterpolation[oldfunction["ElementMesh"], oldfunction["ValuesOnGrid"]^2]

Is there a smart way to tell Mathematica to create a single interpolating function from arithmetic operations (and derivatives) of several functions on the same grid?

I am solving non-linear PDE using iterations. Correspondingly, the coefficients are functions on the (same) mesh that I have created and fixed. Between iterations I need to update these function by doing some arithmetic operations on them. Just doing all in a straightforward way leads to Mathematica being very slow. So, I have to prepare my PDE coefficients in advance by creating new interpolating functions for them. I do this via, for example

ElementMeshInterpolation[oldfunction["ElementMesh"], oldfunction["ValuesOnGrid"]^2]

Is there a smart way to tell Mathematica to create a single interpolating function from arithmetic operations (and derivatives) of several functions on the same grid?

Source Link

New interpolating function on the mesh from operations on other ones

I am solving non-linear PDE using iterations. Correspondingly, the coefficients are functions on the (same) mesh that I have created and fixed. Between iterations I need to update these function by doing some arithmetic operations on them. Just doing all in a straightforward way leads to Mathematica being very slow. So, I have to prepare my PDE coefficients in advance by creating new interpolating functions for them. I do this via, for example

ElementMeshInterpolation[oldfunction["ElementMesh"], oldfunction["ValuesOnGrid"]^2]

Is there a smart way to tell Mathematica to create a single interpolating function from arithmetic operations (and derivatives) of several functions on the same grid?