[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mesh, Octave and Freefem++
From: |
fotios |
Subject: |
Re: Mesh, Octave and Freefem++ |
Date: |
Sat, 01 Jun 2013 14:42:01 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 |
Στις 2013-06-01 14:27, ο/η c. έγραψε:
It looks
On 1 Jun 2013, at 14:22, address@hidden wrote:
Message: 1
Date: Sat, 01 Jun 2013 13:06:20 +0200
From: fotios <address@hidden>
To: address@hidden
Subject: Mesh, Octave and Freefem++
Message-ID: <address@hidden>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
Once I wrote some simple interface to generate a mesh through Octave
using Freefem++ [1], after reordering my code I ended up with the
attached (non documented) functions and here is a simple example
Fotios,
This sounds like a valuable addition to the msh package.
Would you mind if I adapt it and commit it there?
c.
Not at all! Free to do as you desire. There are some things to comment
there though. In buildmesh.m line 53 till end (or sth like that) change
code to the following (so that the loop is avoided)
[p, t, e] = readmesh ();
p = p(:, 1:2);
t = t(:, 1:3);
e = e(:, 1:3);
p1 = p(t(:, 1), :);
p2 = p(t(:, 2), :);
p3 = p(t(:, 3), :);
d12 = sqrt (sum ((p1 - p2).^2, 2));
d23 = sqrt (sum ((p2 - p3).^2, 2));
d31 = sqrt (sum ((p3 - p1).^2, 2));
hmax = max ([max(d12), max(d23), max(d31)]); # or hmax = max ([d12; d23;
d31])
Moreover, in case there is an error rm ff2O*.* will never be riched and
next mesh creation will yield an error since the ff2O_bound file will
not be empty (it is opened with a+ option) . . . my (non-intelligent)
solution to that is to have a function cleanff2O.m that must be called
before the first call to boundary.m . . . free to do it in a clever way
;)). Depends on Freefem++ with executable Freefem++ (maybe make a check
test for that regarding different platforms?) . . . works on my win8
machine with latest freefem. Enjoy!
/Fotis