/[ff3d]/ff3d/solver/Structured3DMesh.cpp
ViewVC logotype

Diff of /ff3d/solver/Structured3DMesh.cpp

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

revision 1.1.1.1 by delpinux, Mon Feb 17 16:32:50 2003 UTC revision 1.2 by delpinux, Fri Aug 1 17:50:49 2003 UTC
# Line 216  Structured3DMesh::Structured3DMesh(const Line 216  Structured3DMesh::Structured3DMesh(const
216        }        }
217  }  }
218    
 //! Generates references using the domain \a D.  
 void Structured3DMesh::createReferences(const Domain& D)  
 {  
   for (size_t i=0; i<this->numberOfVertices(); ++i) {  
     /// Reference used for vertex inside Objects.  
     vertex(i).Ref().insideDomain() = D.inside(vertex(i));  
   }  
 }  
   
219  //! Generates references associated to a POVRef ...  //! Generates references associated to a POVRef ...
220  void Structured3DMesh::createReferences(const Domain& D,  void Structured3DMesh::createReferences(const Shape& S)
                                         const TinyVector<3,real_t>& aReference)  
221  {  {
   const Scene& S = D.scene();  
   
222    for (size_t i=0; i<this->numberOfVertices(); ++i) {    for (size_t i=0; i<this->numberOfVertices(); ++i) {
223      Vertex& V = vertex(i);      Vertex& V = vertex(i);
     V.Ref().resize(S.nbObjects());  
     for (size_t j=0; j<S.nbObjects(); ++j) {  
       if (S.object(j).inside(V)) {  
         V.Ref() = j;//static_cast<int>(listobj[j]-&S.object(0) + 1);  
       }  
     }  
   }  
   
   for (size_t i=0; i<__cells.size(); ++i) {  
     Cell& C = cell(i);  
224    
225      C.reference() = 1;          // Cell's ref is set to 1      V.Ref() = S.inside(V);
   
     for (int l=0; l<8; l++)     // if one of the vertices is inside the cell is inside  
       if (!C(l).Ref().isSet()) {  
         C.reference() = 0;  
         break;  
       }  
226    }    }
227  }  }
228    

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

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