~ubuntu-branches/ubuntu/trusty/rheolef/trusty

« back to all changes in this revision

Viewing changes to nfem/form_element/grad_grad_s.h

  • Committer: Package Import Robot
  • Author(s): Pierre Saramito
  • Date: 2012-04-06 09:12:21 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20120406091221-m58me99p1nxqui49
Tags: 6.0-1
* New upstream release 6.0 (major changes):
  - massively distributed and parallel support
  - full FEM characteristic method (Lagrange-Gakerkin method) support
  - enhanced users documentation 
  - source code supports g++-4.7 (closes: #667356)
* debian/control: dependencies for MPI distributed solvers added
* debian/rules: build commands simplified
* debian/librheolef-dev.install: man1/* to man9/* added
* debian/changelog: package description rewritted (closes: #661689)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _RHEO_GRAD_GRAD_S_H
 
2
#define _RHEO_GRAD_GRAD_S_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
 
 
24
/*Class:grad_grad_s
 
25
NAME: @code{grad_grad_s} -- Beltrami-Laplace operator on a surface
 
26
@bfindex grad_grad_s
 
27
@apindex P1
 
28
@cindex level set method
 
29
SYNOPSIS:
 
30
    @example
 
31
        form(const space& Bh, const space& Bh, "grad_grad_s", phi_h);
 
32
    @end example
 
33
DESCRIPTION:       
 
34
    @noindent
 
35
    On a surface Gamma defined as the zero of a level-set function,
 
36
    assembly the matrix associated to the following form:
 
37
@iftex
 
38
@tex
 
39
    $$
 
40
        m(u,v) = \int_\Gamma  \nabla_s u . \nabla_s v \, dx
 
41
    $$
 
42
@end tex
 
43
@end iftex
 
44
@ifnottex
 
45
    @example
 
46
                 /
 
47
                 |
 
48
        m(u,v) = | grad_s(u).grad_s(v) dx
 
49
                 |
 
50
                 / Gamma
 
51
    @end example
 
52
@end ifnottex
 
53
    
 
54
    @noindent
 
55
    The Bh space may be a @code{P1} finite element space on the band arround the zero level
 
56
    set.
 
57
    Notice that elements different from P1 are not yet supported.
 
58
EXAMPLE:
 
59
    @example
 
60
         space Vh (lambda, "P1");
 
61
         field phi_h = interpolate(Vh, phi);
 
62
         geo beta = banded_level_set (phi_h);
 
63
         space Bh (beta, "P1");
 
64
         Bh.block("isolated");
 
65
         field phi_bh = interpolate(Bh, phi);
 
66
         form m  (Bh, Bh, "grad_grad_s", phi_bh);
 
67
    @end example
 
68
AUTHOR: Lara Aborm, Jocelyn Etienne, Pierre Saramito
 
69
DATE:
 
70
    18 april 2011
 
71
End:
 
72
*/
 
73
 
 
74
#include "rheolef/form_element_rep.h"
 
75
namespace rheolef { 
 
76
 
 
77
class grad_grad_s: public form_element_rep {
 
78
public:
 
79
// allocator:
 
80
 
 
81
    grad_grad_s() : form_element_rep() {}
 
82
 
 
83
// virtual accessor:
 
84
 
 
85
    void operator() (const geo_element& K, ublas::matrix<Float>& m) const;
 
86
    void check_after_initialize () const;
 
87
};
 
88
}// namespace rheolef
 
89
#endif // _RHEO_GRAD_GRAD_S_H