~ubuntu-branches/ubuntu/saucy/rheolef/saucy

« back to all changes in this revision

Viewing changes to nfem/plib/level_set.h

  • Committer: Package Import Robot
  • Author(s): Pierre Saramito, Pierre Saramito, Sylvestre Ledru
  • Date: 2012-05-14 14:02:09 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120514140209-dzbdlidkotyflf9e
Tags: 6.1-1
[ Pierre Saramito ]
* New upstream release 6.1 (minor changes):
  - support arbitrarily polynomial order Pk
  - source code supports g++-4.7 (closes: #671996)

[ Sylvestre Ledru ]
* update of the watch file

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _RHEOLEF_LEVEL_SET_H
 
2
#define _RHEOLEF_LEVEL_SET_H
 
3
///
 
4
/// This file is part of Rheolef.
 
5
///
 
6
/// Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
 
7
///
 
8
/// Rheolef is free software; you can redistribute it and/or modify
 
9
/// it under the terms of the GNU General Public License as published by
 
10
/// the Free Software Foundation; either version 2 of the License, or
 
11
/// (at your option) any later version.
 
12
///
 
13
/// Rheolef is distributed in the hope that it will be useful,
 
14
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
/// GNU General Public License for more details.
 
17
///
 
18
/// You should have received a copy of the GNU General Public License
 
19
/// along with Rheolef; if not, write to the Free Software
 
20
/// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
21
/// 
 
22
/// =========================================================================
 
23
/// Banded level set routines 
 
24
///
 
25
/// Authors: Lara Aborm, Jocelyn Etienne, Pierre Saramito
 
26
///
 
27
#include "rheolef/field.h"
 
28
 
 
29
namespace rheolef {
 
30
 
 
31
/*Class:
 
32
NAME: @code{level_set} - compute a level set from a function
 
33
@findex  level_set
 
34
@clindex field
 
35
@clindex geo
 
36
 
 
37
SYNOPSYS:
 
38
  geo level_set (const field& fh);
 
39
DESCRIPTION:
 
40
  Given a function @code{fh} defined in a domain @code{Lambda},
 
41
  compute the level set defined by @{x in Lambda, fh(x) = 0@}.
 
42
  This level set is represented by the @code{geo} class.
 
43
OPTIONS:
 
44
  The option class @code{leve_set_option_type}
 
45
  controls the slit of quadrilaterals into triangles
 
46
  for tridimensional intersected surface and also the
 
47
  zero machine precision, @code{epsilon}.
 
48
End: */
 
49
 
 
50
//<level_set:
 
51
struct level_set_option_type {
 
52
    bool split_to_triangle;
 
53
    Float epsilon;
 
54
    level_set_option_type()
 
55
     : split_to_triangle(true),
 
56
       epsilon(100*std::numeric_limits<Float>::epsilon())
 
57
       {}
 
58
};
 
59
template <class T, class M>
 
60
geo_basic<T,M> level_set (
 
61
  const field_basic<T,M>& fh,
 
62
  const level_set_option_type& opt = level_set_option_type());
 
63
//>level_set:
 
64
 
 
65
} // namespace
 
66
#endif // _RHEOLEF_LEVEL_SET_H