• Nicolas CHEVAUGEON's avatar
    [xFEM, xMapping] xGeomElem code is simplifyed mostlty by using improved xMapping interface. · b71ddff8
    Nicolas CHEVAUGEON authored
    xGeomElem code is simplifyed (and improved ?) in the following way :
    
    - All the members now have version with the correct camelCase style. The old version are kept (for example GetDetJac is "cloned" to getDetJac), but are marked as "deprecated" in the their doxygen documentation. I tryed to use the [[deprecated]] attribute on them but unfortunatly, it's c++14 and we still can't use this version of the standard. I kept all the old version there since xGeomElem is used all over the places, but I would like to remove them in a near future ...
    
    - xBoundingBox xGeomElem::getBoundingBox() const take the place of void xGeomElem::GetBoundingBox(xtensor::xPoint& min, xtensor::xPoint& max) const.
    
    - The implementation take advantages of improved interface to xMapping.h
      for example :
      xtensor::xPoint xGeomElem ::getCDGxyz() const
      {
       double u, v, w, x, y, z;
       mapping->COG(u, v, w);
       mapping->eval(u, v, w, x, y, z);
       return xtensor::xPoint(x, y, z);
      }
      is replaced by
      xtensor::xPoint xGeomElem::getCDGxyz() const { return mapping->eval(mapping->COG()); }
      and
      void xGeomElem::setUVWForVertex(int inod) which was almost 200 lines
      is replaced by
      void xGeomElem ::setUVWForVertex(int inod) { uvw = mapping->getMappingVertex(inod); }
      where mapping->getMappingVertex(inod); just return data that where already in xMapping.
    
    - setting/clearing  the mapping or integrator members of the class was complicated because we have to keep track of differents life  time for  these pointers depending if they where defaulty allocated or pass by the user and eventulaly shared by differents
      xGeomElem. This is now simplifyed using a unique_ptr and classic ptr, allowing to use the implicitly declared destructor for
      xGEomElem.
      This pave the way for better mapping management in the  futur (I'm thinking of high order mapping that would be expensive
      to construct, that we might wan't to store in the builder ...)
    
    - we now have move constructor, move assignment and swap for xGeomElem, making them more usable in standard containers.
    
    Note on xGeomElem :
     - I think set/getOrientation are not very usefull, probably bug prone, and I think they should be removed.
     - I'm not sure we still need the integrator to be included in the xGeomElem, Integration behing performed in most cases using an
       xIntegrationRule  and xCommandOnGeomElem that could set directly the current point instead of setting it using both xGeomElem::setIntegrationPointNumberForDegree and xGeomElem::setUVW(int ipt)
    
    4 access functions have been added in class xMapping to access data that where already there, but not accessible outside xMapping.cc :
       -size_t getNbMappingVertices() const;
       -xtensor::xPoint getMappingVertex(size_t i) const;
       -static size_t getNbMappingVertices(xReferenceElementType type);
       -static xtensor::xPoint getMappingVertex(xReferenceElementType type, size_t i);
    b71ddff8