synaps/topology/mesh.h

Go to the documentation of this file.
00001 /*********************************************************************
00002 *      This file is part of the source code of AXEL library          *
00003 *   Author(s): G. Gatellier                                          *
00004 *              B. Mourrain, GALAAD, INRIA                            *
00005 **********************************************************************/
00007 #ifndef axel_mesh_H__
00008 #define axel_mesh_H__
00009 
00010 /*********************************************************************/
00011 #include <synaps/init.h>
00012 #include <synaps/linalg/MethodName.h>
00013 #include <synaps/linalg/MATRIX3D.h>
00014 #include <synaps/mpol/MPOLDST.m>
00015 #include <synaps/topology/mesh/cell3d.h>
00016 #include <synaps/topology/box3d.h>
00017 #include <synaps/topology/mesh/cube3d.h>
00018 #include <synaps/topology/Octree.h>
00019 #include <synaps/topology/mesh/bezier3d.h>
00020 #include <synaps/topology/mesh/scene.h>
00021 #include <synaps/topology/mesh/subdivisor.h>
00022 #include <synaps/topology/mesh/geomview.h>
00023 
00024 __BEGIN_NAMESPACE_SYNAPS
00025 
00026 /*********************************************************************/
00027 
00028 template<class MPOL, class REP3D>
00029 void mesh(scene<MPOL, REP3D> & scn,
00030           const MPOL & polynome, 
00031           const typename MPOL::coeff_t& x0, const typename MPOL::coeff_t& x1, 
00032           const typename MPOL::coeff_t& y0, const typename MPOL::coeff_t& y1, 
00033           const typename MPOL::coeff_t& z0, const typename MPOL::coeff_t& z1,
00034           const typename MPOL::coeff_t& min,const typename MPOL::coeff_t& max )
00035 {
00036   scn.x=x0; scn.y=y0; scn.z=z0;
00037   scn.u=x1-x0; scn.v=y1-y0; scn.w=z1-z0;
00038   cell3d<MPOL,REP3D> bz3d(polynome, x0, x1, y0, y1, z0, z1);
00039 
00040   // Construction of the grid.
00041   subdivisor<cell3d<MPOL,REP3D> > subdiv(min, max);
00042 
00043   // Subdivision of space and construction of the octree.
00044   //  axel::Clock T;
00045   //  T.start();
00046   adaptiveSplit(scn,bz3d,subdiv);
00047   //  T.stop();
00048   //  double t=T.time();
00049   //  std::cout<<"\n-> time split computing: "<<t<<"\n";
00050 
00051   // Construction of the mesh.
00052   //  axel::Clock T2;
00053   //  T2.start();
00054   buildMesh(scn,bz3d,subdiv);
00055   //  T2.stop();
00056   //  t=T2.time();
00057   //  std::cout<<"-> time build mesh: "<<t<<"\n\n";
00058 }
00059 
00060 /*********************************************************************/
00061 
00062 __END_NAMESPACE_SYNAPS
00063 
00064 #endif // axel_mesh_H__

SYNAPS DOCUMENTATION
logo