27. feb. 2014 kl. 15:02 skrev Andreas Lauser <[email protected]>: > Hi, > > On Thursday 27 February 2014 14:47:50 Markus Blatt wrote: >> On Thu, Feb 27, 2014 at 07:12:09AM +0000, Atgeirr Rasmussen wrote: >>> Your observation is correct. The normals in the UnstructuredGrid are >>> required to have length equal to the area of the corresponding face (see >>> the Doxygen doc for UnstructuredGrid). >> It was just a surprise to see such a difference and took time to >> realize it. I am probably not the last one to stumble over this. As >> currently the only place where this caused trouble was >> opm/core/pressure/tpfa/..., I worked around the problem there. The >> problem is that there are now faceNormal(const UG&, int) and >> faceNormal(const CpGrid, int) that actually return different >> things. This should probably be fixed. > > can't the length of the returned vector just be undefined for faceNormal()? > the vector can easily be normalized thereafter…
I disagree with this. We should choose one of the two behaviours. > >> One could adapt Cpgrid to store the scaled face normals. Or is there >> and argument against this? > > By virtue of Gauss' integral theorem, I encounter more unit normals than > scaled ones in equations. I'd prefer unit normals in CpGrid for this > reason… I agree with that one. The Dune interface requires unit normals, and that is what is stored already. My suggestion is that you replace the function faceNormal() with either unitFaceNormal() or areaWeightedFaceNormal() and adapt the implementation accordingly, doing the least work possible. It might even be possible to have both. Atgeirr _______________________________________________ Opm mailing list [email protected] http://www.opm-project.org/mailman/listinfo/opm
