• 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
Name
Last commit
Last update
..
src Loading commit data...
CMakeLists.txt Loading commit data...