Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xpetra: Fix Issue 5672 and ETI Xpetra_MapFactory #5723

Merged
merged 10 commits into from
Aug 19, 2019
1 change: 1 addition & 0 deletions packages/xpetra/example/Simple/Laplace1D-Xpetra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ int main(int argc, char *argv[]) {
RCP<const Teuchos::Comm<int> > comm = Teuchos::DefaultComm<int>::getComm();

GlobalOrdinal numGlobalElements = 256; // problem size

Xpetra::UnderlyingLib lib = Xpetra::UseTpetra;

RCP<const Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node> > map = Xpetra::MapFactory<LocalOrdinal, GlobalOrdinal, Node>::createUniformContigMap(lib, numGlobalElements, comm);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ namespace Xpetra {
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// forward declaration of BlockedMultiVector, needed to prevent circular inclusions
template<class S, class LO, class GO, class N> class BlockedMultiVector;

// forward declaration of BlockedMap, needed because some functions take them as parameters
// (This should go away when BlockedMap is converted to ETI)
template<class LO, class GO, class N> class BlockedMap;
#endif


Expand Down Expand Up @@ -115,7 +119,7 @@ namespace Xpetra {
*
* \param map BlockedMap defining the block structure of the multi vector
*/
MapExtractor(const Teuchos::RCP< const BlockedMap > &map);
MapExtractor(const Teuchos::RCP< const Xpetra::BlockedMap<LocalOrdinal,GlobalOrdinal,Node> > &map);


//! copy constructor
Expand Down Expand Up @@ -180,7 +184,7 @@ namespace Xpetra {
const RCP<const Map> getMap() const;

/// get the underlying BlockedMap object (as BlockedMap)
const RCP<const BlockedMap> getBlockedMap() const;
const RCP<const Xpetra::BlockedMap<LocalOrdinal,GlobalOrdinal,Node>> getBlockedMap() const;

/// the full map
const RCP<const Map> getFullMap() const;
Expand All @@ -191,7 +195,7 @@ namespace Xpetra {
//@}

private:
Teuchos::RCP<const BlockedMap> map_; ///< blocked map containing the sub block maps (either thyra or xpetra mode)
Teuchos::RCP<const Xpetra::BlockedMap<LocalOrdinal,GlobalOrdinal,Node>> map_; ///< blocked map containing the sub block maps (either thyra or xpetra mode)
};


Expand Down
5 changes: 3 additions & 2 deletions packages/xpetra/src/BlockedMap/Xpetra_BlockedMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,14 @@
//#include "Xpetra_MapFactory.hpp"
#include "Xpetra_ImportFactory.hpp"
//#include "Xpetra_MapUtils.hpp"
#include "Xpetra_MapFactory.hpp"

namespace Xpetra {

#ifndef DOXYGEN_SHOULD_SKIP_THIS
// forward declaration of Vector, needed to prevent circular inclusions
// template<class S, class LO, class GO, class N> class Vector;
template<class LO, class GO, class N> class MapFactory;
// template<class S, class LO, class GO, class N> class Vector;
// template<class LO, class GO, class N> class MapFactory;
#endif

template <class LocalOrdinal,
Expand Down
3 changes: 2 additions & 1 deletion packages/xpetra/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ APPEND_GLOB(SOURCES
IF (${PACKAGE_NAME}_ENABLE_Epetra)
APPEND_GLOB(SOURCES
Map/Xpetra_EpetraMap.cpp
Map/Xpetra_EpetraMapFactory.cpp
Import/Xpetra_EpetraImport.cpp
Export/Xpetra_EpetraExport.cpp
MultiVector/Xpetra_EpetraMultiVector.cpp
Expand All @@ -102,7 +103,7 @@ IF (${PACKAGE_NAME}_ENABLE_Epetra)
ENDIF()

# Create the .hpp file in BUILD/packages/xpetra/src
TRILINOS_CREATE_CLIENT_TEMPLATE_HEADERS(${CMAKE_CURRENT_SOURCE_DIR}/BlockedCrsMatrix NOSIERRABJAM)
TRILINOS_CREATE_CLIENT_TEMPLATE_HEADERS(${CMAKE_CURRENT_SOURCE_DIR}/BlockedCrsMatrix NOSIERRABJAM)
TRILINOS_CREATE_CLIENT_TEMPLATE_HEADERS(${CMAKE_CURRENT_SOURCE_DIR}/BlockedMultiVector NOSIERRABJAM)
TRILINOS_CREATE_CLIENT_TEMPLATE_HEADERS(${CMAKE_CURRENT_SOURCE_DIR}/BlockedVector NOSIERRABJAM)
TRILINOS_CREATE_CLIENT_TEMPLATE_HEADERS(${CMAKE_CURRENT_SOURCE_DIR}/CrsGraph NOSIERRABJAM)
Expand Down
Loading