Skip to content

Adding new source files or factories

Luc Berger edited this page Sep 23, 2019 · 3 revisions

To add new source files, these steps have to be done:

  • Create _decl.hpp and _def.hpp files. See MueLu_DemoFactory_decl.hpp and MueLu_DemoFactory_decl.hpp in the muelu/src/Misc/ folder for an example of a SingleLevelFactoryBase derived new factory class.
  • Add your class name to one of the muelu/src/Utils/ClassLists/ classList files
  • Run ./gen_all.sh in muelu/src/Utils/ClassList/. Note: Generated files must be checked-in to the repository.
  • Commit a minor modification to a cmake file to force reconfiguration when other developers update their copy of Trilinos

The following three bullets are not needed anymore but a reconfigure and rebuild of Trilinos is necessary for Stokhos to pick-up new factories in MueLu.

  • Execute ./gen_cppFiles.sh in stokhos/src/muelu/explicit_instantiation/ to generate the explicit instantiation files for Stokhos/Sacado
  • Execute ./gen_cppFiles.sh in stokhos/src/sacado/kokkos/pce/muelu/ to generate explicit instantiation files
  • Execute ./gen_cppFiles.sh in stokhos/src/sacado/kokkos/vector/muelu/ to generate explicit instantiation files
  • If the new factory is created inside a new subfolder then the following three lines need to be added to muelu/src/CMakeLists.txt:
    1. INCLUDE_DIRECTORIES(${DIR}/path/to/folder)
    2. APPEND_GLOB(SOURCES path/to/folder/*.cpp)
    3. TRILINOS_CREATE_CLIENT_TEMPLATE_HEADERS(${DIR}/path/to/folder NOSIERRABJAM)
  • Add the factoryName to muelu/src/Interface/MueLu_FactoryFactory_decl.hpp to have it recognized in the xml files
  • Add new parameters to muelu/doc/UserGuide/masterList.xml and run the script muelu/doc/UserGuide/update_params.sh, this will generate the necessary entries for your new parameters to be recognized in the easy xml format
Clone this wiki locally