• Nicolas CHEVAUGEON's avatar
    [xmapping] xMapping now a full class, independant of Trellis_Util::Mapping. · 0c02f81b
    Nicolas CHEVAUGEON authored
        This is a continuation of the work of previous commit. The goal behing
        to reduce the dependancies to AOMD. This intermediate commit do that
        with minimal interface change and minimal other change to Xfiles
        libraries.
        new files  in xMapping/src :
        xLagrangeMapping.cc, xLagrangeMapping.h, xLagrangeMappingBuilder.cc,
        xLagrangeMappingBuilder.h, xMapping.cc, xMappingBuilderHolder.cc, xMappingBuilderHolder.h
    
        class xMapping, xLagrangeMapping, xConstantLagrangeMapping ...
        are now fully implemented in xmapping instead of behing typedef of some Trellis_Util::Mapping.
        This come with some minor interface change to minimize remaining deps to Trellis in xmapping :
        xMapping do not store any more the associated AOMD::mEntity, instead it just store the entityType (mType defined in AOMD_Internals.h) This type will probably
        change in a next commit, it's still needed for now in the present form, so that the the type returned by member getType() remain compatible with Trellis_Util::Integrator.
        interface change in xMapping :
        - member getEntity is removed.
        - member getType is added.
        - member interiorCheck was taking a useless AOMD::mEntity *loc as input, it is removed.
        - members PushBack are replaced by pushBack to conform to general xfile convention.
        - unused member simplexation is removed
        - There are now 3 normalVector members and they are not pure virtual any more :
    
          virtual void normalVector(double u, double v, double w, vector3d &n) const :
          compute the "natural" normal to a face mapping. it also work with line, making the assumption that the normal is orthogonal
          to the third axis. direction of the normal of course depends on the order of the nodes in the face up to a sign.
    
          virtual vector3d normalVector(const unsigned short *face_vertices, double s, double t) const:
          compute the normal to the face (resp line) given by face_vertices in term of the nodes number of the
          reference solid (resp face) upon with the mapping is constructed. s,t are the local parameter in the reference space of face
          (resp s in the reference space of the line). It proceed by finding out if the face is really a valid face of the solid,
          if so which one and how it is rotated compared to the corresponding reference face on the solid.
          Then it compute the coordinate u,v,w in the solid reference face corresponding to point s,t on the face,
          taking into account face number and rotations. It then select the normal in reference space according to the face number,
          and push it back to geometric space.
          For this to work,  data are defined in xMapping.cc for each type of mapping supported.
    
          vector3d normalVector(const unsigned short iface, double u, double v, double w) const:
          compute the exterior normal to the  numbered iface face relative to the underlying solid at point u,v,w  of the solid.
          iface is the relative face number to the solid we want to take the normal of.
          From this value, the normal in ref space is retrived.  it is then push to geometric space using the jacobian at u,v,w.
          This is the simplest candidate to use to replace previous usage of normalVector in the library.
    
        Consequences elsewhere :
        -  xMapping/src/xLagrangeMappingBuilder.cc/.h
           xRegularCubeLagrangeMappingBuilder and  xCylindricalCoordinatesLagrangeMappingBuilder are moved to this file
          (previously they were in xMappingBuilderHolder.h/cc).
          xLagrangeMappingBuilder Familly now call new version of constructors for xLagrangeMapping.
    
        - Trellis/Util/Util/calculus/Integrator.h/cc
          GaussIntegrator do not store any more the entity, just the entityType. Constructor modifyed accordingly
    
        - xCrack/src/IntegratorSingularCrack2D.cc
          call to Trellis_Util::GaussIntegrator constructor modifyed accordingly
    
        - xCrack/src/SingularCrackMapping.h_cc xExt/src/InfiniteMapping.h_cc
          constructor of SingularCrackMapping and InfiniteMapping now call new version of xMapping and xLagrangeMapping Constructor and
          do not overload normalVector any more.
    
        - xExt/src/InfiniteOrLagrangeMappingBuilder.cc now call new version of xLagrangeMAppingConstructor.
    
        - xForm.h/.cc :
          bool integ_is_appro(xGeomElem* geo_integ, xGeomElem* geo_appro) is now implemented in the .cc file (otherwise xMapping need to be fully defined in xForm.h )
    
        - xGeomElem.h/.cc
         now xGeomElem store a AOMD::mEntity* ent as a direct member, since xMapping do not any more. Constructors and members are modifyed accordingly.
         xGeomElem member normalVector is implemented according to the new implementation of xMapping.
    
        - xRegularGrid.cc : implemented using the new version of interiorCheck.
    
        - xMapping/test/testxLagrangeMapping/main.cc has been modifyed to test the normal implementation and conform to the change in xMapping interface.
    
        - TLSVelocity.h :  Small changes to conform to the new xMapping interface.
    
        - Element.h now include "AOMD_Internals.h" because it needs AOMD::mEntity::mType
           which is not included throught xMapping.h any more.
    0c02f81b