help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calculations on data on triangular mesh.


From: Juan Pablo Carbajal
Subject: Re: Calculations on data on triangular mesh.
Date: Thu, 25 Oct 2012 21:22:50 +0200

On Thu, Oct 25, 2012 at 9:19 PM, Juan Pablo Carbajal
<address@hidden> wrote:
> On Thu, Oct 25, 2012 at 9:03 PM, Richard <address@hidden> wrote:
>> On 25/10/2012 18:57, Juan Pablo Carbajal wrote:
>>>
>>> On Thu, Oct 25, 2012 at 4:25 PM, Richard Crozier <address@hidden>
>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I want to do some post-processing of data generated using a 2D finite
>>>> element code. The code produces the nodal quantities of the solution on a
>>>> delauney triangulation. The data I have in the solution are the vertex
>>>> locations, a map of these vertices for the triangles and values of the
>>>> solution at the vertices.
>>>>
>>>> What I would like to know is, is there a library of functions for
>>>> efficiently working with this kind of data? The kind of operations I am
>>>> interested in are interpolation at arbitrary points, integration over
>>>> regions of the triangulation, getting triangle areas, centroids etc etc.
>>>> I
>>>> would like to avoid writing all this code from scratch.
>>>>
>>>> I have looked around for this on Octave Forge and so on, but haven't come
>>>> across anything appropriate yet.
>>>>
>>>> The code in question by the way is freely available and hosted here:
>>>>
>>>> https://sourced.ecdf.ed.ac.uk/projects/see/xfemm
>>>>
>>>> It is a mex interface I have created to the core C++ magnetics solver
>>>> from
>>>> this program:
>>>>
>>>> http://www.femm.info/wiki/HomePage
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://octave.1599824.n4.nabble.com/Calculations-on-data-on-triangular-mesh-tp4645732.html
>>>> Sent from the Octave - General mailing list archive at Nabble.com.
>>>> _______________________________________________
>>>> Help-octave mailing list
>>>> address@hidden
>>>> https://mailman.cae.wisc.edu/listinfo/help-octave
>>>
>>> Hi Richard,
>>>
>>> Thank you for your link. Are you in contact with the developer of
>>> FEMM. I also use it but since it is not licensed under a
>>> GPL-compatible license we cannot add an interface in Octave Forge.
>>>
>>> You may find the packages msh, fpl and geometry relatively useful.
>>> There is many functionality missing and it would be great if you
>>> develop anything missing that you share it we us.
>>>
>>> To interpolate in a triangular mesh you could build the trick with
>>> griddata, but the best is to write your own bilinear interpolation (if
>>> that is what you want) on the triangles. I have code but is not
>>> documented. I can share if you want, but I do not promise good quality
>>> :D. Indeed... I may wrote a function to interpolate on a triangular
>>> mesh after the 29th...
>>>
>>> I am forwarding Carlo who is the one actively developing most of the FEM
>>> tools.
>>>
>>
>> Juan,
>>
>> I am in contact occasionally with the FEMM author, but he was not interested
>> in my proposal which was to let me use my modified version of the magnetics
>> solver code under an LGPL licence. I don't know if the FEMM author would be
>> any more interested in the full GPL or another licence. In any case it uses
>> Triangle (made by Jonathan Shrewchek) which is provided under similar terms
>> to FEMM.
>>
>> If you use FEMM, you might find my code useful, I have made a function
>> (writefemmfile.m) which can output a file in FEMM's input format given a
>> problem definition stored as a normal Octave/Matlab structure. The FEMM
>> solver C++ code can also be compiled as a standalone executable as well as a
>> mexfunction. The mexfunction works with Octave, too. My 'interface'
>> mexfunction though really just calls the FEMM code with a string containing
>> the name of .fem file. I have replaced all the Windows-only MFC code with
>> standard C++ so it can also be compiled on linux, and doesn't require Wine.
>> I have also created a lot of helper functions in m-code for creating the
>> problem structure (e.g. addnode_mfemm.m, addsegment_mfemm.m and similar).
>> These are analagous to the existing OctaveFEMM interface code.
>>
>> Note this is only the magnetics solver though.
>>
>> I want to implement all the post-processing capabilities of FEMM, but in
>> Matlab and Octave compatible code. All mcode I have written for
>> pre-processing (problem definition) and post-processing is released under
>> the Apache V2.0 licence. The modified FEMM sources are provided under an
>> Aladdin Free Public Licence.
>>
>> At some point in the long term future I can consider replacing the actual
>> solver code as well with something with a less restrictive licence. The
>> alternative is to write a magnetics solver for FAESOR which is a 3D GPL
>> finite element package for Matlab (haven't tested this extensively in
>> Octave, but I'm pretty sure it works, apart from some visualisation code.).
>> You can find FAESOR here:
>>
>> http://hogwarts.ucsd.edu/~pkrysl/faesor/faesor_publish.html
>>
>> In case you are interested. If you would like to help make the
>> post-processing code for my FEMM interface, you, or anyone else are more
>> than welcome!
>>
>> Richard
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> The University of Edinburgh is a charitable body, registered in
>> Scotland, with registration number SC005336.
>>
>
> Hi Richard,
>
> Yeah, I also contact Meeks once but couldn't get it under a free
> compatible license. I think he is using some other code that he can't
> release. Anyways...
>
> I will definitely take a look at your code. Though post-processing is
> not the exiting task for me (I mean there is so much already freed out
> there, paraview for example, though I am not sure if the license is
> truly free, but looks like BSD to me), please keep me updated. I am
> already with too many projects, but who knows maybe I drop some of
> them.
>
> Thanks!

Also I took a look quickly at FAESOR. It should work in Octave, it
would be nice to get it into Octave Forge ...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]