Liebe Gitlab-Nutzer, lieber Gitlab-Nutzer, es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Ein Anmelden über dieses erzeugt ein neues Konto. Das alte Konto ist über den Reiter "Standard" erreichbar. Die Administratoren

Dear Gitlab user, it is now possible to log in to our service using the ZIH login/LDAP. Logging in via this will create a new account. The old account can be accessed via the "Standard" tab. The administrators

Commit 2eeaa8b6 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Added simple partitioner.

parent 173ee421
...@@ -44,7 +44,7 @@ available_tags=" CXX F77" ...@@ -44,7 +44,7 @@ available_tags=" CXX F77"
# ### BEGIN LIBTOOL CONFIG # ### BEGIN LIBTOOL CONFIG
# Libtool was configured on host p1q024: # Libtool was configured on host deimos103:
# Shell to use when invoking shell scripts. # Shell to use when invoking shell scripts.
SHELL="/bin/sh" SHELL="/bin/sh"
...@@ -6760,7 +6760,7 @@ build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` ...@@ -6760,7 +6760,7 @@ build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
# End: # End:
# ### BEGIN LIBTOOL TAG CONFIG: CXX # ### BEGIN LIBTOOL TAG CONFIG: CXX
# Libtool was configured on host p1q024: # Libtool was configured on host deimos103:
# Shell to use when invoking shell scripts. # Shell to use when invoking shell scripts.
SHELL="/bin/sh" SHELL="/bin/sh"
...@@ -7065,7 +7065,7 @@ include_expsyms="" ...@@ -7065,7 +7065,7 @@ include_expsyms=""
# ### BEGIN LIBTOOL TAG CONFIG: F77 # ### BEGIN LIBTOOL TAG CONFIG: F77
# Libtool was configured on host p1q024: # Libtool was configured on host deimos103:
# Shell to use when invoking shell scripts. # Shell to use when invoking shell scripts.
SHELL="/bin/sh" SHELL="/bin/sh"
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "parallel/MeshPartitioner.h" #include "parallel/MeshPartitioner.h"
#include "parallel/ParMetisPartitioner.h" #include "parallel/ParMetisPartitioner.h"
#include "parallel/ZoltanPartitioner.h" #include "parallel/ZoltanPartitioner.h"
#include "parallel/SimplePartitioner.h"
#include "parallel/MpiHelper.h" #include "parallel/MpiHelper.h"
#include "io/ElementFileWriter.h" #include "io/ElementFileWriter.h"
#include "io/MacroInfo.h" #include "io/MacroInfo.h"
...@@ -105,6 +106,9 @@ namespace AMDiS { ...@@ -105,6 +106,9 @@ namespace AMDiS {
if (partStr == "zoltan") if (partStr == "zoltan")
partitioner = new ZoltanPartitioner(&mpiComm); partitioner = new ZoltanPartitioner(&mpiComm);
if (partStr == "simple")
partitioner = new SimplePartitioner(&mpiComm);
tmp = 0; tmp = 0;
GET_PARAMETER(0, name + "->box partitioning", "%d", &tmp); GET_PARAMETER(0, name + "->box partitioning", "%d", &tmp);
partitioner->setBoxPartitioning(static_cast<bool>(tmp)); partitioner->setBoxPartitioning(static_cast<bool>(tmp));
......
...@@ -41,7 +41,12 @@ namespace AMDiS { ...@@ -41,7 +41,12 @@ namespace AMDiS {
}; };
/**
* Abstract class for mesh partitioning. This class provides only a function
* for a random initial partitioning. A concrete partition must override the
* functions \ref MeshPartitioner::partition and
* \ref MeshPartitioner::createPartitionMap.
*/
class MeshPartitioner class MeshPartitioner
{ {
public: public:
......
// ============================================================================
// == ==
// == AMDiS - Adaptive multidimensional simulations ==
// == ==
// == http://www.amdis-fem.org ==
// == ==
// ============================================================================
//
// Software License for AMDiS
//
// Copyright (c) 2010 Dresden University of Technology
// All rights reserved.
// Authors: Simon Vey, Thomas Witkowski et al.
//
// This file is part of AMDiS
//
// See also license.opensource.txt in the distribution.
/** \file SimplePartitioner.h */
#ifndef AMDIS_SIMPLE_PARTITIONER_H
#define AMDIS_SIMPLE_PARTITIONER_H
#include "AMDiS_fwd.h"
#include "Global.h"
#include "parallel/MeshPartitioner.h"
namespace AMDiS {
/**
* The "Simple partitioner" does not change the initial partitioning which is more
* or less a random assignment of elements to ranks. This partitioner may be useful
* for either debugging purposes or if the number of macro elements is equal to the
* number of processes. In this case, neither ParMetis nor Zoltan will be able to
* compute a valid partition. But a random one-to-one partition is the best possible
* in this case.
*/
class SimplePartitioner : public MeshPartitioner
{
public:
SimplePartitioner(MPI::Intracomm *comm)
: MeshPartitioner(comm)
{}
~SimplePartitioner() {}
/// \ref MeshPartitioner::partition
bool partition(map<int, double> &elemWeights, PartitionMode mode = INITIAL)
{
return true;
}
void createPartitionMap(map<int, int>& pMap)
{
pMap = partitionMap;
}
};
}
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment