/[ff3d]/ff3d/language/MeshExpression.cpp
ViewVC logotype

Diff of /ff3d/language/MeshExpression.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by delpinux, Fri Aug 8 08:39:56 2003 UTC revision 1.8 by delpinux, Sun Sep 14 17:12:09 2003 UTC
# Line 38  Line 38 
38  #include <MeshTetrahedrizor.hpp>  #include <MeshTetrahedrizor.hpp>
39  #include <MeshSimplifier.hpp>  #include <MeshSimplifier.hpp>
40  #include <MeshReader.hpp>  #include <MeshReader.hpp>
41    #include <MeshExtractor.hpp>
42    
43  #include <SurfaceMeshGenerator.hpp>  #include <SurfaceMeshGenerator.hpp>
44    
45  ReferenceCounting<Mesh> MeshExpression::mesh() const  ReferenceCounting<Mesh> MeshExpression::mesh() const
# Line 146  void MeshExpressionSurface::execute() Line 148  void MeshExpressionSurface::execute()
148    
149    Structured3DMesh& SMesh    Structured3DMesh& SMesh
150      = dynamic_cast<Structured3DMesh&>(*(*__smesh).mesh());      = dynamic_cast<Structured3DMesh&>(*(*__smesh).mesh());
151    SurfaceMeshOfTriangles& surfMesh    SurfaceMeshOfTriangles& surfaceMesh
152      = dynamic_cast<SurfaceMeshOfTriangles&>(*__mesh);      = dynamic_cast<SurfaceMeshOfTriangles&>(*__mesh);
153    
154    Domain& Omega = (*(*__domain).domain());    Domain& Omega = (*(*__domain).domain());
155    
156    TinyVector<3> povObject;    SurfaceMeshGenerator S;
157    for (size_t i=0; i<3; ++i)    S.generateSurfacicMesh(Omega,
158      povObject[i] = (*__povObject).value(i);                           surfaceMesh,
159                             SMesh);
   Scene* pS;  
   
 #warning Clean-up  
   switch ((*__domain).domainType()) {  
   case DomainExpression::variable: {  
     DomainExpressionVariable& d = static_cast<DomainExpressionVariable&>(*__domain);  
     if ((*d.domainExpression()).domainType() != DomainExpression::set) {  
       fferr(0) << __FILE__ << ':' << __LINE__ << ": Not implemented\n";  
       std::exit(1);  
     }  
     DomainExpressionSet& ds= dynamic_cast<DomainExpressionSet&>(*d.domainExpression());  
     pS = (*ds.scene()).scene();  
     break;  
   }  
   case DomainExpression::set: {  
     pS = (*static_cast<DomainExpressionSet&>(*__domain).scene()).scene();  
     break;  
   }  
   default: {  
     fferr(0) << __FILE__ << ':' << __LINE__ << ": Not implemented\n";  
     std::exit(1);  
   }  
   }  
   
   Scene& S = *pS;  
   
   fferr(0) << __FILE__ << ':' << __LINE__ << ": Not implemented\n";  
   std::exit(1);  
 //   Union U;  
   
 //   for (size_t i=0; i<S.nbObjects(); ++i) {  
 //     const Object& O = S.object(i);  
 //     if (O.reference() == povObject) {  
 //       U.AddObject(O);  
 //       ref[i] = true;  
 //     }  
 //   }  
 //   if (U.NbObjects() > 0) {  
 //       SMesh.createReferences(Omega);  
 //       SMesh.createReferences(Omega,povObject);  
   
 //       SurfaceMeshGenerator S;  
 //       S.generateSurfacicMesh(U,  
 //                           Omega  
 //                           surfMesh,  
 //                           SMesh,  
 //                           ref);  
 //   } else {  
 //     fferr(2) << "\nObject reference " << povObject  
 //           << " not found\n";  
 //     std::exit(1);  
 //   }  
160  }  }
161    
162  MeshExpressionSurface::  MeshExpressionSurface::
# Line 349  MeshExpressionSimplify:: Line 299  MeshExpressionSimplify::
299  {  {
300    ;    ;
301  }  }
302    
303    
304    std::ostream&
305    MeshExpressionExtract::
306    put(std::ostream& os) const
307    {
308      os << "extract("
309         << (*__originalMesh) << ')';
310      return os;
311    }
312    
313    void
314    MeshExpressionExtract::
315    execute()
316    {
317      (*__originalMesh).execute();
318    
319      switch ((*(*__originalMesh).mesh()).type()) {
320      case Mesh::cartesianHexahedraMesh: {
321        break;
322      }
323      case Mesh::hexahedraMesh: {
324        break;
325      }
326      case Mesh::tetrahedraMesh: {
327        break;
328      }
329      case Mesh::surfaceMeshTriangles: {
330        MeshExtractor<SurfaceMeshOfTriangles>
331          extractor(dynamic_cast<const SurfaceMeshOfTriangles&>(*(*__originalMesh).mesh()));
332        __mesh = extractor(1);
333        break;
334      }
335      case Mesh::surfaceMeshQuadrangles: {
336        break;
337      }
338      default: {
339        fferr(0) << __FILE__ << ':' << __LINE__ << ": Not implemented\n";
340        std::exit(1);
341      }
342      }
343    }
344    
345    MeshExpressionExtract::
346    MeshExpressionExtract(ReferenceCounting<MeshExpression> me)
347      : MeshExpression(0, MeshExpression::extract),
348        __originalMesh(me)
349    {
350      ;
351    }
352    
353    MeshExpressionExtract::
354    MeshExpressionExtract(const MeshExpressionExtract& e)
355      : MeshExpression(e),
356        __originalMesh(e.__originalMesh)
357    {
358      ;
359    }
360    
361    MeshExpressionExtract::
362    ~MeshExpressionExtract()
363    {
364      ;
365    }
366    
367    
368    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26