[CIG-SEISMO] Interpolate model from one mesh onto another

Dimitri Komatitsch komatitsch at lma.cnrs-mrs.fr
Fri Jun 28 08:31:55 PDT 2013


Hi Alan, Hi all,

If you want to avoid losing accuracy, you can use the Lagrange 
interpolators to evaluate the vector fields from the points of the 
current SEM grid to the points of another grid. This is what we do to 
compute the field at the seismic stations (the receivers) for instance.
Thus in the code you can have a look at:

src/specfem3D/locate_receivers.f90

to see how we locate the points of the new grid in the (xi,eta,gamma) 
coordinates + spectral element number of the old grid, and at:

src/specfem3D/compute_seismograms.f90

to see how we then use the Lagrange interpolators to evaluate the field 
at these (xi,eta,gamma) coordinates + spectral element number.

The process is expensive if you have a dense (new) grid because for each 
point (each receiver) we need to solve a non-linear problem iteratively 
to find (xi,eta,gamma) once and for all, and then we need a triple loop 
on the Gauss-Lobatto points i.e. 5 x 5 x 5 = 125 calculations to get the 
sum of the Lagrange polynomials. That's the most precise way, but expensive.

You can also have a look at

src/specfem3D/locate_regular_points.f90

written by Elliott Sales de Andrade and Qinya Liu, which does the same 
thing to interpolate the (old) non regular SEM grid onto a (new) 
topologically regular grid.

Best regards,
Dimitri.


On 06/28/2013 03:31 PM, Peter Danecek wrote:
>
> One solution could be:
> Define your target grid, the way you need it. For example use vectors,
> containing the X, Y & Z values. Cycle through these to query the model
> and put these values into some rank-3-matrix. Dump the matrix in the
> your preferred format.
>
> Small programs like these for sure have already been written, but I am
> not aware of any such routine within the SPECFEM3D package. But that
> does not mean anything.
>
> Ciao!
> ~petr
>
>
> On 28 Jun 2013, at 15:20, schiemenz at geophysik.uni-muenchen.de wrote:
>
>> Thanks for your reply, Peter -
>> The tomo option seemed the best approach to me also, because I have a
>> structured, rectangular-shaped mesh.  A minor difficulty in this is the
>> need to extract a regular grid from the model files.  Is there a simple
>> way to do this?
>>
>> Regards,
>> Alan
>>
>>>
>>> Hi Alan,
>>>
>>> I would argue, that the problem you are describing is not specific to
>>> SPECFEM3D, but more general: To make a really correct (interpolation)
>>> -- I would call it projection -- you would need to take into account
>>> the right discrete representation in each case and map it into the
>>> other one using the underlaying basis functions. This would be true
>>> not only for the case from coarse to fine, but also in the oposite
>>> direction. For this operation I am not aware of any generic tool,
>>> which currently would do exactly this.
>>>
>>> From a more practical point of view, in SPECFEM there is the tomo
>>> model routine, which performs a linear interpolation from a coarser
>>> regular grid (defining your model) to the computational grid (here you
>>> could sample on any other target grid as well). This, in some way,
>>> could serve your needs?
>>>
>>> Hope this note is any useful to you!
>>> ~petr
>>>
>>>
>>> On 28 Jun 2013, at 14:52, schiemenz at geophysik.uni-muenchen.de wrote:
>>>
>>>> Dear SPECFEM3D* community,
>>>> I would like to know if there is an effective way for the user to
>>>> interpolate from one mesh onto another.  More specifically, I am
>>>> updating
>>>> a (coarse) Vp model with FWI at low frequencies, but need to use a
>>>> finer
>>>> model for higher frequencies.  Therefore my model files (e.g.
>>>> proc*_vp.bin) are indexed differently.  Is such a feature already in
>>>> the
>>>> software?
>>>>
>>>> Regards,
>>>> Alan Schiemenz
>>>>
>>>> _______________________________________________
>>>> CIG-SEISMO mailing list
>>>> CIG-SEISMO at geodynamics.org
>>>> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-seismo
>>>
>>>
>>
>>
>
>
>
> _______________________________________________
> CIG-SEISMO mailing list
> CIG-SEISMO at geodynamics.org
> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-seismo
>

-- 
Dimitri Komatitsch
CNRS Research Director (DR CNRS), Laboratory of Mechanics and Acoustics,
UPR 7051, Marseille, France    http://komatitsch.free.fr


More information about the CIG-SEISMO mailing list