Feel++  0.92.0
Public Types | Public Member Functions | Static Public Attributes
Feel::MeshAdaptation< Dim, Order, OrderGeo > Class Template Reference

List of all members.

Public Types

typedef Eigen::Matrix< double,
Dim, 1 > 
vectorN_type
typedef Eigen::Matrix< double,
Dim, Dim > 
matrixN_type
typedef Backend< double > backend_type
 linear algebra backend factory
typedef boost::shared_ptr
< backend_type
backend_ptrtype
 linear algebra backend factory shared_ptr<> type
typedef
backend_type::sparse_matrix_type 
sparse_matrix_type
 sparse matrix type associated with backend
typedef
backend_type::sparse_matrix_ptrtype 
sparse_matrix_ptrtype
 sparse matrix type associated with backend (shared_ptr<> type)
typedef backend_type::vector_type vector_type
 vector type associated with backend
typedef
backend_type::vector_ptrtype 
vector_ptrtype
 vector type associated with backend (shared_ptr<> type)
typedef Simplex< Dim, OrderGeo > convex_type
typedef Mesh< convex_typemesh_type
 mesh type
typedef boost::shared_ptr
< mesh_type
mesh_ptrtype
 mesh shared_ptr<> type
typedef Exporter< mesh_typeexport_type
 the exporter factory type
typedef boost::shared_ptr
< export_type
export_ptrtype
 the exporter factory (shared_ptr<> type)
typedef bases< Lagrange< Order,
Scalar > > 
basis_type
typedef FunctionSpace
< mesh_type, basis_type
space_type
typedef boost::shared_ptr
< space_type > 
space_ptrtype
 the approximation function space type (shared_ptr<> type)
typedef space_type::element_type element_type
 an element type of the approximation function space
typedef bases< Lagrange
< 0, Scalar, Discontinuous > > 
p0_basis_type
 Scalar P0 space.
typedef FunctionSpace
< mesh_type, p0_basis_type
p0_space_type
typedef boost::shared_ptr
< p0_space_type > 
p0_space_ptrtype
typedef p0_space_type::element_type p0_element_type
typedef bases< Lagrange
< 1, Scalar > > 
p1_basis_type
 Scalar P1 space.
typedef FunctionSpace
< mesh_type, p1_basis_type
p1_space_type
typedef boost::shared_ptr
< p1_space_type > 
p1_space_ptrtype
typedef p1_space_type::element_type p1_element_type
typedef bases< Lagrange
< 1, Vectorial > > 
p1vec_basis_type
 Vectorial P1 space.
typedef FunctionSpace
< mesh_type, p1vec_basis_type
p1vec_space_type
typedef boost::shared_ptr
< p1vec_space_type > 
p1vec_space_ptrtype
typedef
p1vec_space_type::element_type 
p1vec_element_type
typedef mesh_type::point_type point_type

Public Member Functions

 MeshAdaptation (backend_ptrtype &backend)
 Constructor.
mesh_ptrtype adaptMeshImpl (const mesh_ptrtype &initMesh, std::string geofile, std::string adaptType, std::list< std::pair< element_type, std::string > > var, std::list< std::pair< std::vector< p1_element_type >, std::string > > metric, double hMin, double hMax, double tol)
 Interface.
std::string createPosfile (std::string name_var, const p1_element_type &bbNewMap, const mesh_ptrtype &mesh)
 Generates a GMSH post processing file (for mesh adaptation)
std::string createPosfileAnisotropic (std::string nameVar, const std::vector< p1_element_type > &bbNewMap, const mesh_ptrtype &mesh)
std::string createAdaptedGeo (std::string geofile, std::string name, std::vector< std::string > posfiles, bool aniso)
 Adapt geofile for mesh adaptation.
std::string buildAdaptedMesh (std::string geofile, std::string name, std::vector< std::string > posfiles, bool aniso)
 Build adapted mesh.
void computeMetric (const double tol, const double h_min, const double h_max, const matrixN_type &hessian_matrix, matrixN_type &M, double &max_eigenvalue)
 Compute the metric for mesh adaptation using hessian matrix.
std::string adaptMeshHess1 (element_type &U, const mesh_ptrtype &mesh, double hMin, double hMax, std::string name, std::string geofile, double tol, bool aniso)
 Mesh adaptation from Hessian matrix.
std::string adaptMeshHess2 (element_type &U, const mesh_ptrtype &mesh, double hMin, double hMax, std::string name, std::string geofile, double tol, bool aniso)
std::string adaptMeshHess2 (element_type &U, const mesh_ptrtype &mesh, double hMin, double hMax, std::string name, std::string geofile, double tol, bool aniso, mpl::bool_< true >)
std::string adaptMeshHess2 (element_type &U, const mesh_ptrtype &mesh, double hMin, double hMax, std::string name, std::string geofile, double tol, bool aniso, mpl::bool_< false >)
 BOOST_PARAMETER_MEMBER_FUNCTION ((mesh_ptrtype), adaptMesh, tag,(required(initMesh,(mesh_ptrtype))(geofile,(std::string))(adaptType,(std::string)))(optional(var,(std::list< std::pair< element_type, std::string > >), defaultVar)(metric,(std::list< std::pair< std::vector< p1_element_type >, std::string > >), defaultMetric)(hMin,(double), 1.0e-3)(hMax,(double), 100.0)(tol,(double), 1.0)))
 Mesh adaptation interface.

Static Public Attributes

static const bool isP1 = (Order == 1)

template<int Dim, int Order, int OrderGeo>
class Feel::MeshAdaptation< Dim, Order, OrderGeo >


Member Function Documentation

template<int Dim, int Order, int OrderGeo>
std::string Feel::MeshAdaptation< Dim, Order, OrderGeo >::adaptMeshHess1 ( element_type U,
const mesh_ptrtype mesh,
double  hMin,
double  hMax,
std::string  name,
std::string  geofile,
double  tol,
bool  aniso 
)

Mesh adaptation from Hessian matrix.

Build posfile

References Feel::elements(), and Feel::project().

template<int Dim, int Order, int OrderGeo>
std::string Feel::MeshAdaptation< Dim, Order, OrderGeo >::adaptMeshHess2 ( element_type U,
const mesh_ptrtype mesh,
double  hMin,
double  hMax,
std::string  name,
std::string  geofile,
double  tol,
bool  aniso,
mpl::bool_< false >   
)

Proj -> P1 for each hessian matrix components : Find proj_P1(U)V = UV V

Build posfile

References Feel::elements(), and Feel::project().

template<int Dim, int Order, int OrderGeo>
std::string Feel::MeshAdaptation< Dim, Order, OrderGeo >::buildAdaptedMesh ( std::string  geofile,
std::string  name,
std::vector< std::string >  posfiles,
bool  aniso 
)

Build adapted mesh.

*********** GMSH call to build new mesh ********** ///

template<int Dim, int Order, int OrderGeo>
std::string Feel::MeshAdaptation< Dim, Order, OrderGeo >::createAdaptedGeo ( std::string  geofile,
std::string  name,
std::vector< std::string >  posfiles,
bool  aniso 
)

Adapt geofile for mesh adaptation.

Check each field appears in geo file (add missing ones)

If field linked with i-eme posfile doesn't appear => add it