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

Diff of /ff3d/solver/MeshOfHexahedra.cpp

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

revision 1.1.1.1 by delpinux, Mon Feb 17 16:32:51 2003 UTC revision 1.2 by delpinux, Sun Mar 9 20:01:35 2003 UTC
# Line 82  MeshOfHexahedra::iterator MeshOfHexahedr Line 82  MeshOfHexahedra::iterator MeshOfHexahedr
82    toVisitSet.insert(h0);    toVisitSet.insert(h0);
83    toVisitStack.push(h0);    toVisitStack.push(h0);
84    Hexahedron* h;    Hexahedron* h;
85      size_t numberOfCell = 1;
86    do {    do {
87        fferr(0) << "Visiting cell n°" << numberOfCell++ << '\n';
88      // treating next cell      // treating next cell
89      h = toVisitStack.top();      h = toVisitStack.top();
90    
# Line 91  MeshOfHexahedra::iterator MeshOfHexahedr Line 93  MeshOfHexahedra::iterator MeshOfHexahedr
93      visited.insert(h);      visited.insert(h);
94    
95      const Hexahedron& H = *h;      const Hexahedron& H = *h;
96        
97        TinyVector<3> Hmin=H(0);
98        TinyVector<3> Hmax=H(0);
99    
100        for (size_t k=1; k<H.numberOfVertices(); ++k) {
101          for (size_t l=0; l<3; ++l) {
102            Hmin[l] = std::min(Hmin[l], H(k)[l]);
103            Hmax[l] = std::max(Hmax[l], H(k)[l]);
104          }
105        }
106    
107        fferr(0) << "Cell is:\n";
108        fferr(0) << '\t' << Hmin << '-' << Hmax << '\n';
109    
110      ConformTransformationQ1Hexahedra T(H);      ConformTransformationQ1Hexahedra T(H);
111    
112      TinyVector<3, real_t> Xhat;      TinyVector<3, real_t> Xhat;
113      TinyVector<6,bool> neighbours = false;      TinyVector<6,bool> neighbours = false;
114      found = false;      found = false;
115      if (T.invertT(x,y,z, Xhat)) {      if (not(T.invertT(x,y,z, Xhat))) {
116        const double epsilon=1E-5;        const double epsilon=1E-5;
117        bool inside = true;        bool inside = true;
118        for (size_t k=0; k<3; ++k) {        for (size_t k=0; k<3; ++k) {
# Line 106  MeshOfHexahedra::iterator MeshOfHexahedr Line 122  MeshOfHexahedra::iterator MeshOfHexahedr
122          inside &= not(neighbours[2*k] or neighbours[2*k+1]);          inside &= not(neighbours[2*k] or neighbours[2*k+1]);
123        }        }
124        found = inside;        found = inside;
125        } else {
126          found = true;
127      }      }
128    
129      if(!found) {      if(!found) {
# Line 127  MeshOfHexahedra::iterator MeshOfHexahedr Line 145  MeshOfHexahedra::iterator MeshOfHexahedr
145    } while (not(found) and not(toVisitStack.empty()));    } while (not(found) and not(toVisitStack.empty()));
146    
147    if (not(found)) {    if (not(found)) {
148        fferr(0) << "#### Really did not found ####\n";
149      h = 0;      h = 0;
150    }    }
151    

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