Skip to content

Commit

Permalink
Merge pull request #4008 from cgcgcg/mueluExportData
Browse files Browse the repository at this point in the history
MueLu: Fix export data
  • Loading branch information
cgcgcg authored Dec 6, 2018
2 parents aa10641 + 880de80 commit b74c97e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/muelu/adapters/xpetra/MueLu_RefMaxwell_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
#include "MueLu_UncoupledAggregationFactory_kokkos_fwd.hpp"
#endif

#include "MueLu_ZoltanInterface_fwd.hpp"
#include "MueLu_Zoltan2Interface_fwd.hpp"
#include "MueLu_RepartitionHeuristicFactory_fwd.hpp"
#include "MueLu_RepartitionFactory_fwd.hpp"
Expand Down
1 change: 1 addition & 0 deletions packages/muelu/adapters/xpetra/MueLu_RefMaxwell_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
#include <KokkosSparse_CrsMatrix.hpp>
#endif

#include "MueLu_ZoltanInterface.hpp"
#include "MueLu_Zoltan2Interface.hpp"
#include "MueLu_RepartitionHeuristicFactory.hpp"
#include "MueLu_RepartitionFactory.hpp"
Expand Down
4 changes: 2 additions & 2 deletions packages/muelu/src/Interface/MueLu_HierarchyManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ namespace MueLu {

if (data[i] < H.GetNumLevels()) {
RCP<Level> L = H.GetLevel(data[i]);
if (data[i] < levelManagers_.size() && L->IsAvailable(name,&*levelManagers_[i]->GetFactory(name))) {
if (data[i] < levelManagers_.size() && L->IsAvailable(name,&*levelManagers_[data[i]]->GetFactory(name))) {
// Try generating factory
RCP<T> M = L->template Get< RCP<T> >(name,&*levelManagers_[i]->GetFactory(name));
RCP<T> M = L->template Get< RCP<T> >(name,&*levelManagers_[data[i]]->GetFactory(name));
if (!M.is_null()) {
Xpetra::IO<Scalar, LocalOrdinal, GlobalOrdinal, Node>::Write(fileName,* M);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ namespace MueLu {
if (pL.isParameter("repartition: use subcommunicators") == true && pL.get<bool>("repartition: use subcommunicators") == true)
permutedCoords->replaceMap(permutedCoords->getMap()->removeEmptyProcesses());

if (permutedCoords->getMap() == Teuchos::null)
permutedCoords = Teuchos::null;

Set(coarseLevel, "Coordinates", permutedCoords);

std::string fileName = "rebalanced_coordinates_level_" + toString(coarseLevel.GetLevelID()) + ".m";
Expand All @@ -282,6 +285,9 @@ namespace MueLu {
if (pL.get<bool>("repartition: use subcommunicators") == true)
permutedNullspace->replaceMap(permutedNullspace->getMap()->removeEmptyProcesses());

if (permutedNullspace->getMap() == Teuchos::null)
permutedNullspace = Teuchos::null;

Set(coarseLevel, "Nullspace", permutedNullspace);
}

Expand Down

0 comments on commit b74c97e

Please sign in to comment.