1
#ifndef _RHEOLEF_LEVEL_SET_H
2
#define _RHEOLEF_LEVEL_SET_H
4
/// This file is part of Rheolef.
6
/// Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
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.
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.
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
22
/// =========================================================================
23
/// Banded level set routines
25
/// Authors: Lara Aborm, Jocelyn Etienne, Pierre Saramito
27
#include "rheolef/field.h"
32
NAME: @code{level_set} - compute a level set from a function
38
geo level_set (const field& fh);
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.
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}.
51
struct level_set_option_type {
52
bool split_to_triangle;
54
level_set_option_type()
55
: split_to_triangle(true),
56
epsilon(100*std::numeric_limits<Float>::epsilon())
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());
66
#endif // _RHEOLEF_LEVEL_SET_H