1. 10 Nov, 2020 1 commit
    • Nicolas CHEVAUGEON's avatar
      m] library xGeomTools added · bc14d18b
      Nicolas CHEVAUGEON authored
      Main changes :
      - A new library xGeomTools is added in xGeom.
        *This library is meant to collect "simple" geometrical classes/functions.
         By "simple" we mean that they dependent only on xtensor, and xtool.
        *All the classes and functions of xGeomTools are in namespace xgeom.
        *For this commit it contains :
         xBoundingBox.h/cc, xOctreeGrid.h, xRegularGrid.h/cc, xSimpleGeometry.h,
         moved from xTensor or xFEM.
        *Previous library xGeom is split in two libraries : xDistanceNearest and
         xScanElement in respectivevly xGeom/xDistanceNearest
         and xGeom/xScanElement,
        *The old xGeom library do not exist any more.
        *Note that the 3 libraries contained in directory xGeom populate
         the namespace xGeom.
        *Global build option BUILD_XGEOM is removed.
        *Global build option BUILD_XGEOMTOOLS, BUILD_XDISTANCENEAREST,
          BUILD_XSCANELEMENT are added.
        *xGeom/CMakeLists.txt is removed
        *xUTil/cmakeUtil :
         FindxGeomTools.cmake, FindxDistanceNearest.cmake, FindxScanElement.cmake
         added, FindxGeom.cmake is removed.
        *xAnalyticalSolution, xCrack, xDoubleCut, xLegacySimpleCut, xDomainDecomp,
         xExport, xExt, xFEM, xInterfaceAOMD, xMeshInterface, xOctree, xMapping,
         xTLS, now depend on  xGeomTools.
        *xOctree and xTLS now depends on xDistanceNearest
      - xBoundingBox :
        *added member functions  inclose(), now used in xMesh, xSubMesh
        and xLagrangeMapping.
        *added default constructor and constructor for 2 xPoint.
        *default constructor now build an  empty "bb"  by havinh min(i) > max (i)
      - xRegularGrid : dependencies to xMesh are removed.
      - xMesh.h :  part of previous xOctreeGrid that was dependent of xMesh are
        no directly implemented in xMesh. (see xMesh::createGrid() and
        xMesh::locateElement)
      
      Miscanelous changes along the way (removing useless dependencies)
      - xValue.cc : removed "useless" inclusions of "xApproxFunction.h",
        "xField.h", "xLevelSet.h", "xSpacePolynomial.h", "xTensors.h",
        "xTensorsPtr.h" "xVector.h" as well as useless using AOMD::mEdge
        and using AOMD::mEntity.
      - xValue.h : removed useless inclusions of  <set>,
        <boost/graph/adjacency_list.hpp>, <boost/graph/connected_components.hpp>,
        "xTensorsPtr.h", "xDebug.h", "xNearestNeighborInterface.h"
      - xValue_imp.h : removed useless includes "mEdge.h" and "xGeomeElem.h"
      - xValueManager.h - removed dependencies to xMesh.
      - some of AOMD include cascading in other files because of the previous
        removed inclusion were putting std::string in global namespace.
        std::string is now added in the following files :
        std::string xExport.h, xExportEnsight, xExportGmsh.h
        xExportTranslate.cc/h, xField.h, xFEM/src/xSpacePolynomial.h.
      - xData.cc inside void xData::ReadInfo(const char *filename),
        unused variable xBoundary crvboundary; is removed.
      - all modified and added files are clang-formatted.
      bc14d18b
  2. 04 Nov, 2020 1 commit
    • Nicolas CHEVAUGEON's avatar
      [XFEM, xExport, xInterface/xOctree] dependences to AOMD's octree is removed and related changes. · 22fa74d5
      Nicolas CHEVAUGEON authored
      xFEM/src/xOctreeGrid.h is a new file. It introduce a octree grid search
        structure to use in place of the AOMD::octree that was used in xMesh
        for the locateOctree members functions. It permits to construct an octree
        search structure on top of a collection of mesh entity.
      
      xFEM/src/xRegularGrid.h/cc has been modifyed so that :
       - it uses the xBoundingBox class.
       - The member function name have been changed to reflect the camel case
         convention, common to the rest of the xFEM library.
       - getElementsForPoint now return a vector of {element, localcoordinate} pair,
         so that the local coordinate of the target point in each element that
         contains it is now accessible.
       - The code have been clarifyed and simplifyed.
      
      xBoundingBox.h :
        - added 2 member function in xBoundingBox :
         /// return the center of the bounding box
         xPoint center() const { return (min + max) * 0.5; }
         /// return a vector from min to max
         xVector<double> diag() const { return xVector<double>{min, max}; }
        - Note that following a discussion with A. Salzmann, xBoundingBox could
          be moved in a near futur to namespace xgeom and the file might be part
          of a new library (xGeomTools maybe)
      
      xFEM/src/xMesh.h/cc has been modifyed so that :
        - It uses the xBoundingBox class were usefull, implying some interface
          change :
           * std::pair<xPoint, xPoint> compute_bounding_box(mEntity* e)
             is changed to :
             xBoundingBox compute_bounding_box(const mEntity& e);
           * void compute_bounding_box(xPoint& min,xPoint& max) const;
             is "deprecated", but is still there during the transition.
             it is replaced by :
             xtensor::xBoundingBox compute_bounding_box() const;
        - locateElementOctree and locateElement have changed interface,
          reflecting the changes in xRegularGrid and the use of xOctreeGrid instead of
          AOMD's octree.
        - Better control of the search structure in xMesh, since now the octree or
          the regular grid can both be cleared, updated or accessed by calling
          respectively xMesh Members   createOctree(), clearOctree(), getOctreeGrid(),
          createGrid(), clearGrid(), getRegularGrid.
        - The search structure pointers are now managed in a unique_ptr.
        - xMesh::copyMeshInternal now copy the search structures if needed instead
          of throwing.
        - AOMD_SharedInfo.h, autopack.h, OctreeCreate2.h (from AOMD) are not
          included anymore.
      
      xCrack/src/CrackPostpro.cc,  xCrack/src/ExportSensors.cc/h, modified so that it
        reflect the change in xMesh::locateElement
      
       xExport/src/xSensors.cc/h :
        -modified so that it reflect the change in xMesh::locateElement,
        -Trellis_Util::mPoint replaced by xtensor::xPoint
        -small changes to simplify the implementation
        -clang-format first the first time I think.
      
      xInterface/xOctree/src/surf2LevelSet.cc/h
        -modifyed to use xBoundingBox
        -surface2LevelSet::getBB(xPoint&, xPoint&) is replaced by
         const xBoundingBox &getBB() const { return BB; }
        -surface2LevelSet members xPoint BBmin, BBmax are replaced xBoundingBox BB;
        -a bug was found in the process :
         In surface2LevelSet::createMeshBBox that create an xMesh out of grid,
         the grid point coordinate were computed as :
          double xyz[3] = {BB.min(0) + i * elemSizeX, BB.min(1) +
                                       j * elemSizeY, BB.min(2) + k * elemSizeY};
         instead of :
           double xyz[3] = {BB.min(0) + i * elemSizeX, BB.min(1) +
                                        j * elemSizeY, BB.min(2) + k * elemSizeZ};
         The bug is corrected, but reference of test case
         xinterface-xoctree-test/surface2LevelSet had to be changed.
      
      All modifyed files have been clang-fomated.
      22fa74d5
  3. 03 Nov, 2020 2 commits
    • Nicolas CHEVAUGEON's avatar
      [xtensor] added file xboundingBox.h · 6371e2c6
      Nicolas CHEVAUGEON authored
       in file xTensor/src/xBoundingBox.h
       added class xBoundingBox in xTensor.
       it helps to manipulate bounding box thanks to the member functions,
       and will permit to remove some code duplication regarding bounding box
       intersection or checking if a point is inside a bounding box,
       compared to a model were we just pass around two xPoint.
      6371e2c6
    • Nicolas CHEVAUGEON's avatar
      [xtensor] added member function in class xPoint · e6740a5b
      Nicolas CHEVAUGEON authored
       added member function in class xtensor::xPoint :
        double & operator [] (int i);
        double operator [] (int i) const;
        xPoint operator / (double other) const;
        xPoint& operator /= (double other)
        xPoint& operator -= (const xPoint &other)
        bool operator == (const xPoint & other) const
      
       xTensor/src/xPoint.h   clang-formated
      e6740a5b
  4. 25 Jun, 2020 1 commit
    • Nicolas CHEVAUGEON's avatar
      [xmapping] made fully independent from Trellis · 23c79dc2
      Nicolas CHEVAUGEON authored
      xmapping now have it's own enum type xReferenceElementType defined in
      xReferenceElement. It is there to replace Trellis mType inside xMapping.
      The xMappingBuilder are moved to xfem. Rational : The builder work on
      mEntity that are not supposed to be known by mapping.
      This being done the only dependencie left in xMapping is the dependecies to
      xtensor.
      
      a function is added in xAOMDEntityUtil.h to get the xReferenceElement from
      the mEntity, as well as conversion fonction from xReferenceElement to
      mType. In the current version of the library, this function is only used
      in xfiles to create  a Trellis_Util::GausIntegrator out of a xMapping.
      Therefore these conversion function might become useless when we make
      our own Trellis free Integrator.
      
      Most of the other change in this commit are consequencies of the above.
      Small other minor change are listed below :
      
      -xfiles_dependence.dot has been updated with xmapping dependencies.
      -delete mapping added in xElement::xyz2uvw ...
       this was missing and was causing a memory leak.
        (Note : It might be better for the builder to return smart pointer to
        mapping instead of newed pointer ... )
      - xTensor2 semi-colon were removed where it was useless and issued a warning.
      - xVector : copy assignement added. Rational : since we have a no default copy
        constructor, a default copy assignement is deprecated in the standard
        according to gcc
      23c79dc2
  5. 09 Jun, 2020 1 commit
    • Nicolas CHEVAUGEON's avatar
      [xmapping] added atomic test for xmapping library · c1f59b73
      Nicolas CHEVAUGEON authored
      added atomic test in xmapping library. There were none and it will be needed soon since the implementation of mapping will change in the process to move to the mesh interface.
      
      atomic test added here :
      xMapping/test/testxLagrangeMapping/main.cc
      with xMapping/test/CMakeLists.txt.
      Xfile CMakeLists.txt : added the inclusion of the test case.
      
      other small changes :
      
      * xtensor/xTensor2.h :  removed useless inclusion of xTensor4.h
      
      *Trellis/Util/Util/calculus/Mapping.h,
       Trellis/Util/Util/include/mTensor2.h : added some documentations.
      
      all the modifyied .cc/.h were clang-formated
      c1f59b73
  6. 27 Jan, 2020 1 commit
    • Grégory LEGRAIN's avatar
      Let there be template fields ! · 3cc692f4
      Grégory LEGRAIN authored
      This is a first implementation of template fields in eXlibris.
      Thanks a lot to Alexis (@asalzman) and Nicolas (@nchevaugeon) for fruitful discussions !
      
      Fields can now handle other quantities than double (complex for instance).
      This has led to multiple changes:
      * xDoubleManager disappears
      * xValueDouble disappears
      * Assembly is now templatized
      
      However, the changes are small with respect to the interface in your applications (see the testcases).
      
      =========================
          Notable changes
      =========================
      
      xDoubleManager:
      ---------------
      Is replaced by  xValueManagerDist<T> ("Dist" stands for "distributed"). This template class handles other values  than double.
      
      Example : xValueManagerDist<double> value_manager;
      
      In your end-user code (AND NOWHERE ELSE), you can define a convenient typedef :
      using  xDoubleManager = xValueManagerDist<double>;
      
      xValue:
      -------
      xValueDouble is replaced by xSingleValue<T> where T stands for the type which is stored.
      Move value creators in xValueCreators.h
      
      xStateOfValue:
      --------------
      is now template (should not influence end-user code)
      
      xStateDofCreator, xStateFixedCreator are also template.
      
      xField:
      -------
      now template against the approximated quantity: xField<double> for a double-valued field
      
      Major internal modifications: "everything" is handled by the specialization of getVal and getGrad. For example:
      template <class iterFct, class iterVal>
      static void getVal (iterFct it, iterFct ite, iterVal first, iterVal last, int size_Fct_Val,
                    const xGeomElem* geo_appro, const xGeomElem* geo_integ, std::complex<double>& v);
      
      xFormBilinear, xFormLinear:
      ---------------------------
      A new template is added (double by default):
      template <typename VT = double> class xFormBilinear;
      It corresponds to the type of quantity which is stored in the elementary stiffness matrices (note that xFemMatrix and other are now template). Usually, you can keep it as double, but this is not mandatory (see BUILD_COMPLEX_VALUED_OPERATORS in test case complex2d).
      
      xAssembler, xAssemblerTraitPolicy, xDispatcher are modified to take into account the other changes.
      
      ==============================
             EXAMPLES
      ==============================
      
      An example of complex-valued field is given in Xtest/xfem-para-test/complex2d (however, see issue #58)
      
      ========================================================
      KNOWN limitations/issues (that will be fixed later on):
      ========================================================
      
      * type dependent code in xField is still part of the class. We should try to move this code away from the core of the class (issue #60).
      * float and complex version of mumps are still not available, so you cannot fully run any float or complex testcases for the moment  (see issue #58)
      * the compiler on titan (gcc 4.8) has troubles during template deduction for some template functions (DeclareInterpolation, DeclareState), see issue #59. The syntax had to be modified in order to help the compiler, leading to verbose notations.
      3cc692f4
  7. 10 Jan, 2020 1 commit
  8. 27 Sep, 2019 2 commits
    • Grégory LEGRAIN's avatar
      Restrict some specializations to double · 42196c26
      Grégory LEGRAIN authored
      42196c26
    • Grégory LEGRAIN's avatar
      [xTensor] Templatize xTensor · c8b56a21
      Grégory LEGRAIN authored
      xVector, xTensor2* and xTensor4 are now template classes
      xTensor4Isotropic, xTensor4AnisoPlaneStrain and xTensor4AnisoPlaneStress
      remain double-valued objects as they make sense only in this context.
      
      By default, value type is double, so that you may only have to replace
      xVector by xVector<> and so on in your code.
      
      Update Tensor operations such that xTranspose, xVonMisesNorm etc...
      Theya are also double-valued by default : xTranspose<> is equivalent to
      xTranspose<double>
      
      Update the rest of the repository accordingly
      c8b56a21
  9. 14 Jun, 2019 1 commit
    • Gilles MARCKMANN's avatar
      refactoring 2019: renames namespace, creates new directories, ... · e6039c6a
      Gilles MARCKMANN authored
          rename directory and namespaces. Modifications below:
      
          Original directory (Master)    ->             New directory (refactoring)                 Namespace (refactoring)
          ===========================                   ===========================                 =======================
      
          Xfiles:
          =======
      
          Util
             |_eXlibris_tools                           xTool                                     xtool::
             |
             |                                          xUtil
             |_cmakeUtile                                   |_cmakeUtile
             |
             |_FloUtil                                      attic
             |_Split                                        attic
             |_doxygen_tools                                attic
             |_tags_tools                                   attic
      
          Xcrack                                        xCrack
               |_ xCrack                                     |_ src                               xcrack::
               |
               |_ xCrackFMM                                  attic
      
          Xcut                                          xCut
             |_XdoubleCut                                  |_xDoubleCut                           xcut::
      
          Xdomaindecomp                                 xDomainDecomp
                      |_DomainManager                               |_DomainManager               xdomaindecomp::
                      |_Solvers                                     |_Solver                      xdomaindecomp::
      
          Xext
             |_AnalyicalSolutions                       xAnalyticalSolution
             |                  |_Elastic2D                               |_Elastic2D             xanalyticalsolution::
             |
             |_Xext                                     xExt
                  |_src                                    |_src                                  xext::
                  |
                  |_ImageProcessing                        attic
      
          Xfem
             |_Xfem ___________________________________ xFEM                                      xfem::
                                               \_______ xCut
                                                \          |_xLegacySimpleCut                     xcut::
                                                 \
                                                  \____ xExport                                   xexport::
                                                   \___ xTensor                                   xtensor::
                                                    \__ xMapping                                  xmapping
                                                     \_ xQuadrature                               xquadrature::
      
          FastMarching                                  xFastMarching
                     |_src                                          |_src                         xfastmarching::
                     |   |_FMSkeleton                               |   |_Skeleton                xfastmarching::skeleton
                     |                                              |
                     |_xDistFM                                      |_xDistFM                     xfastmarching::
                             |_xDistFM                                      |_src                 xfastmarching::
      
          Geom                                          xGeom                                     xgeom::
      
          Xinterfaces                                   xInterface
                    |_XAOMDInterface                             |_AOMD                           xinterface::aomd::
                    |                                            |
                    |_GraphInterface                             |_Graph
                    |              |_ParMetis                    |     |_ParMetis                 xinterface::parmetis::
                    |                                            |
                    |_XoctreeInterface                           |_xOctree                        xinterface::xoctree::
                    |                                                    |
                    |_xSplitMeshInterface                                |_xTemplateRefineMesh    xinterface::xtempaterefinemesh::
                    |
                    |
                    |_SolverInterfaces                   xLinAlg
                                     |_SolverBase              |_SolverBase                       xlinalg::
                                     |_SuperLu                 |_xInterfaceSuperLu                xlinalg::
                                     |_Taucs                   |_xInterfaceTaucs                  xlinalg::
                                     |_Lapack                  |_xInterfaceTaucs                  xlinalg::
                                     |_Mumps                   |_xInterfaceMumps                  xlinalg::
                                     |_BasicIterSolver         |_xInterfaceBasicIterSolver        xlinalg::
                                     |_Pastix                  |_xInterfacePastix                 xlinalg::
                                     |
                                     |_NonLinearSolver         attic
                                     |_PetscParallel           attic
                                     |_PetscSeq                attic
                                     |_SparsKit                attic
                                     |_Itl                     attic
                                     |_Mtl                     attic
                                     |_KSPParallel             attic
      
          MeshMachine                                   xMeshTools
                    |_DistMesh                                   |_xDistMesh                      xmeshtool::
                    |_SplitMesh                                  |_xTemplateRefineMesh            xmeshtool::
                    |
                    |_FastMarching                               attic
                    |_LinearAlgebra                              attic
                    |_Stlmesh                                    attic
      
          Octree                                        xOctree                                   xoctree::
      
          Physics
                |_Physics                               xPhysics
                        |_Materials                            |_Materials                        xphysics::
                        |_src                                  |_src                              xphysics::
      
          xTLS
             |_trunck
             |_xTLS                                     xTLS                                      xtls::
      
          ============================================================================================
      
          Xfem splitting:
          ===============
      
          xCut
             |_src
                 |__ xDoubleCut
                 |             |__(unchanged)
                 |
                 |__ xLegacySimpleCut
                                    |__ xPhysSurfByTagging.cc
                                    |__ xPhysSurfByTagging.h
                                    |__ xPhysSurf.cc
                                    |__ xPhysSurf.h
                                    |__ xPhysSurfParameter.cc
                                    |__ xPhysSurfParameter.h
                                    |__ xRefCut.cc
                                    |__ xRefCut.h
                                    |__ xRefCutToAOMD.cc
                                    |__ xRefCutToAOMD.h
                                    |__ xRefCutToIsoZeroVector.cc
                                    |__ xRefCutToIsoZeroVector.h
                                    |__ xRefMesh.cc
                                    |__ xRefMesh.h
      
          xExport
                |_src
                    |__ xExport.cc
                    |__ xExportEnsight.cc
                    |__ xExportEnsight.h
                    |__ xExportGmsh.cc
                    |__ xExportGmsh.h
                    |__ xExportGmsh_imp.h
                    |__ xExport.h
                    |__ xExportManager.cc
                    |__ xExportManager.h
                    |__ xExportTranslate.cc
                    |__ xExportTranslate.h
                    |__ xPostPro.cc
                    |__ xPostPro.h
                    |__ xPostProMSH.cc
                    |__ xPostProMSH.h
                    |__ xPostProVTU.cc
                    |__ xPostProVTU.h
                    |__ xSensors.cc
                    |__ xSensors.h
      
          xTensor
                |_src
                    |__ xPoint.h
                    |__ xTensor2.cc
                    |__ xTensor2.h
                    |__ xTensor2Sym.cc
                    |__ xTensor2Sym.h
                    |__ xTensor3.h
                    |__ xTensor4.h
                    |__ xTensorOperations.h
                    |__ xVector.cc
                    |__ xVector.h
                    |__ xVectorScalarProd.h
      
      =============================================================================================
          cmake variables rules for module Xfiles/xFoe (no more Xfiles/Xfoe) :
      
                Xfiles/xFoe  => find_package(xFoe)  => xFoe_INCLUDE_DIR  / xFoe_LIBRARIES
      
          in C++ source files, namespace are in lower cases: xfoe
      
      =============================================================================================
      
          New xfastmarching namespace have been introduced but pack/unPack helping function
          must remain in :: namescpace (i.e. in no namescpace). This is to let FMupdaterGeneric
          call ::pack  ::unPack in a generic way (no assumption on VECT or TRANSPORTED
          namespace)
      
      =============================================================================================
      
          Macro Super for SuperLU 5 (experimental ) added in xinterface superlu
      
      =============================================================================================
      
          modifiyed xCSRVector.h and cc so that the .h does not include xBlasDef.h since it can produce conflict when including xVector.h in superLU interface
      
      =============================================================================================
      e6039c6a