• Alexis SALZMAN's avatar
    [xFEM] Adding optimized version of DeclareState/DeclareInterpolation · db4eefd8
    Alexis SALZMAN authored
    A DeclareInterpolation2 and DeclareState2 is added to xAlgorithm.h in
    this commit. The idea is not to use them right away but instead to test
    them in your context by switching names (remove the 2 and add
    something to old version names). By context here I talk of compiler. For
    those who use something else then GNU g++, those new versions have to be
    validated because they use the following assertion not in the norm I
    think:
    The clear method of std::vector do not touch memory allocation.
    
    Thus the glob and loc vectors use memory management a small number of
    time (for the first set of key of each space for a priori one element
    per space at most). Otherwise the insert is relying on already allocated
    capacity.
    If this assertion is not verified with other compiler something will have
    to be added.
    
    Besides this memory trick the main modification comes from valgrind
    study. It shows that xFiniteElement destructor and setKeys count
    respectively for 6.44% and 35.49% of 595 call to Declarinterpolation
    with a total of 304 640 elements treated (512 per call).
    KeysFor interfere in setKeys for 19.08%. As stated already by N.C.,
    clearly those computation are too costly compared to the generality or
    maintainability that they provides. The adopted solution was to remove
    xFiniteElement usage in those functions. That may hurt ... Maybe the
    loop on space, glob and loc ingredient may be encapsulate in something
    .. or xFiniteElement may be cleaned.
    
    For now those new versions are proof concept. Their performance shows up
    more then 20% gain in some application with many declareXXX.
    
    Note that new version pass test successfully.
    db4eefd8
Name
Last commit
Last update
Trellis Loading commit data...
xAnalyticalSolution Loading commit data...
xCrack Loading commit data...
xCut Loading commit data...
xDomainDecomp Loading commit data...
xExport Loading commit data...
xExt Loading commit data...
xFEM Loading commit data...
xFastMarching Loading commit data...
xGeom Loading commit data...
xGraph Loading commit data...
xInterface Loading commit data...
xLinAlg Loading commit data...
xMapping Loading commit data...
xMeshTool Loading commit data...
xOctree Loading commit data...
xPhysics Loading commit data...
xQuadrature Loading commit data...
xTLS Loading commit data...
xTensor Loading commit data...
xTool Loading commit data...
xUtil Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
CMakeLists.txt Loading commit data...
CONTRIBUTING.md Loading commit data...
Ext_dependence.dot Loading commit data...
LICENSE.md Loading commit data...
README.md Loading commit data...
Xfiles_dependence.dot Loading commit data...