]> Creatis software - CreaPhase.git/blob - octave_packages/geometry-1.5.0/io/private/pointGeo.m
Add a useful package (from Source forge) for octave
[CreaPhase.git] / octave_packages / geometry-1.5.0 / io / private / pointGeo.m
1 %% Copyright (c) 2010 Juan Pablo Carbajal <carbajal@ifi.uzh.ch>
2 %%
3 %%    This program is free software: you can redistribute it and/or modify
4 %%    it under the terms of the GNU General Public License as published by
5 %%    the Free Software Foundation, either version 3 of the License, or
6 %%    any later version.
7 %%
8 %%    This program is distributed in the hope that it will be useful,
9 %%    but WITHOUT ANY WARRANTY; without even the implied warranty of
10 %%    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 %%    GNU General Public License for more details.
12 %%
13 %%    You should have received a copy of the GNU General Public License
14 %%    along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 %% -*- texinfo -*-
17 %% @deftypefn {Function File} @var{str} =  poointGeo (@var{n}, @var{xyz}, @var{l})
18 %% Generates a string for Gmsh Point format.
19 %%
20 %% Gmsh's simplest `elementary entity', a `Point'. A Point is defined by a list
21 %% of five numbers: @var{n} the identificator, @var{xyz} three coordinates (X, Y
22 %% and Z), and a characteristic length @var{l} that sets the target element size
23 %% at the point:
24 %% The distribution of the mesh element sizes is then obtained by
25 %% interpolation of these characteristic lengths throughout the
26 %% geometry.
27 %%
28 %% @end deftypefn
29
30 function str = pointGeo(n,xyz,l)
31     str = sprintf('Point(%d) = {%.16g,%.16g,%.16g,%.16g};\n',n,xyz,l);
32 end