Logo
Finite Element Embedded Library and Language in C++
Feel++ Feel++ on Github Feel++ on Travis-CI Feel++ on Twitter Feel++ on YouTube Feel++ community
 All Classes Files Functions Variables Typedefs Pages
Feel::Laplacian< Dim, Order, Cont, Entity, FType > Class Template Reference

Detailed Description

template<int Dim, int Order, typename Cont, template< uint16_type, uint16_type, uint16_type > class Entity, template< uint16_type > class FType>
class Feel::Laplacian< Dim, Order, Cont, Entity, FType >

Laplacian Solver using discontinous approximation spaces

solve \( -\Delta u = f\) on \(\Omega\) and \(u= g\) on \(\Gamma\)

+ Inheritance diagram for Feel::Laplacian< Dim, Order, Cont, Entity, FType >:

Classes

struct  space
 

Public Types

typedef boost::shared_ptr
< backend_type > 
backend_ptrtype
 
typedef Backend< value_type > backend_type
 
typedef Entity< Dim, 1, Dim > entity_type
 
typedef boost::shared_ptr
< export_type > 
export_ptrtype
 
typedef Exporter< mesh_type > export_type
 
typedef boost::shared_ptr
< mesh_type > 
mesh_ptrtype
 
typedef Mesh< entity_type > mesh_type
 
typedef p0_space_type::element_type p0_element_type
 
typedef FunctionSpace
< mesh_type, bases< Lagrange
< 0, Scalar > >, Discontinuous > 
p0_space_type
 
typedef
backend_type::sparse_matrix_ptrtype 
sparse_matrix_ptrtype
 
typedef
backend_type::sparse_matrix_type 
sparse_matrix_type
 
typedef double value_type
 
typedef
backend_type::vector_ptrtype 
vector_ptrtype
 
typedef backend_type::vector_type vector_type
 

Public Member Functions

void operator() ()
 
void run ()
 

Static Public Attributes

static const uint16_type imOrder = 2*Order
 

Member Function Documentation

template<int Dim, int Order, typename Cont , template< uint16_type, uint16_type, uint16_type > class Entity, template< uint16_type > class FType>
void Feel::Laplacian< Dim, Order, Cont, Entity, FType >::operator() ( )
inline

alias for run()

template<int Dim, int Order, typename Cont , template< uint16_type, uint16_type, uint16_type > class Entity, template< uint16_type > class FType>
void Laplacian< Dim, Order, Cont, Entity, FType >::run ( )

run the convergence test

assemble $ u v$

*/
auto a = form2( _test=Xh, _trial=Xh );
a = integrate( _range=elements( mesh ), _expr=nu*gradt( u )*trans( grad( v ) ) );

weak dirichlet conditions treatment for the boundaries marked 1 and 3

  1. assemble \(\int_{\partial \Omega} -\nabla u \cdot \mathbf{n} v\)
  2. assemble \(\int_{\partial \Omega} -\nabla v \cdot \mathbf{n} u\)
  3. assemble \(\int_{\partial \Omega} \frac{\gamma}{h} u v\)
*/
//# marker10 #
a += integrate( _range=markedfaces( mesh,"Dirichlet" ),
_expr= nu * ( -( gradt( u )*N() )*id( v )
-( grad( v )*N() )*idt( u )
+penaldir*id( v )*idt( u )/hFace() ) );
//# endmarker10 #

strong(algebraic) dirichlet conditions treatment for the boundaries marked 1 and 3

  1. first close the matrix (the matrix must be closed first before any manipulation )
  2. modify the matrix by cancelling out the rows and columns of D that are associated with the Dirichlet dof
*/
//# marker5 #
a += on( _range=markedfaces( mesh, "Dirichlet" ),
_element=u, _rhs=l, _expr=exact );
//# endmarker5 #

compute the

save the results

*/
v = project( _space=Xh, _range=elements( mesh ), _expr=exact );
auto e = exporter( _mesh = mesh );
e->add( "solution", u );
e->add( "exact", v );
e->save();

The documentation for this class was generated from the following files: