Commit 406385c8 authored by Igor Konshin's avatar Igor Konshin

Documentation: documented several header files

Added doxygen-style comments to common, partitione and solver headers
parent 831bfd7c
......@@ -108,12 +108,24 @@
/// Cross-platform timer that return current time in seconds.
/// The timer is similar to MPI_Wtime() and omp_get_wtime() but is independent on both flags USE_MPI and USE_OMP.
/// double seconds = Timer(); @n
/// ...some code... @n
/// std::cout << "Time spent is " << seconds << " seconds." << std::endl;
long double Timer();
namespace INMOST
/// Types of errors may occur in INMOST.
/// All of these error are fatal ones.
/// If error is detected then "throw" exception is generated.
/// The names of the error type are very intuitive and self-explained ones.
/// Use "try{...} catch{...}" blocks to implement exception handling.
enum ErrorType
/// The list of errors connected to mesh consistency.
......@@ -136,7 +148,7 @@ namespace INMOST
/// The list of general type errors.
......@@ -148,7 +160,7 @@ namespace INMOST
/// The list of errors may occur in the Linear Solver.
ErrorInSolver = 400,
......@@ -158,11 +170,12 @@ namespace INMOST
/// The list of errors may occur in the Partitioner.
ErrorInPartitioner = 500,
/// The very tail of the errors list.
NotImplemented = 1000,
......@@ -4,7 +4,7 @@
#include "inmost.h"
#if defined(USE_PARTITIONER) && !defined(USE_MESH)
#warning "USE_PARITIONER require USE_MESH"
#warning "USE_PARTITIONER require USE_MESH"
......@@ -13,11 +13,30 @@
namespace INMOST
/// Main class to modify or improve the mesh distribution for better load balancing.
class Partitioner
enum Type{Zoltan_Parmetis, Zoltan_Scotch, Zoltan_PHG, Zoltan_RCB, Zoltan_RIB, Zoltan_HSFC, Parmetis, Inner_RCM};
enum Action{Partition, Repartition, Refine};
/// Type of the Partitioner can be currently used in this version of INMOST.
/// @see Zoltan: Parallel Partitioning, Load Balancing and Data-Management Services.
/// @see ParMETIS: Parallel Graph Partitioning and Fill-reducing Matrix Ordering.
enum Type
Zoltan_Parmetis, ///< Parmetis partitioner with the Zoltan package interface.
Zoltan_Scotch, ///< Scotch partitioner with the Zoltan package interface.
Zoltan_PHG, ///< Zoltan topology-based method using Partitioning of HyperGraph.
Zoltan_RCB, ///< Zoltan geometry-based method using Recursive Coordinate Bisection.
Zoltan_RIB, ///< Zoltan geometry-based method using Recursive Inertial Bisection.
Zoltan_HSFC, ///< Zoltan geometry-based method using Hilbert Space-Filling Curve partitioning.
Parmetis, ///< Parmetis partitioner with the original interface.
Inner_RCM ///< Internal serial only partitioner based on the Reverse Cuthill–McKee algorithm ordering.
enum Action
Partition, ///< Partition "from scratch", not taking into account the current mesh distribution.
Repartition, ///< Repartition the existing partition but try to stay close to the current mesh distribution.
Refine ///< Refine the current partition assuming only small changes of mesh distribution.
enum Type pt;
enum Action pa;
......@@ -25,18 +44,37 @@ namespace INMOST
Tag weight_tag;
Mesh * m;
/// Initialize the use of partitioner.
/// @param argc The number of arguments transmitted to the function main.
/// @param argv The pointer to arguments transmitted to the function main.
/// The shortest call to this function with the default solver parameters is the following: Initialize(NULL,NULL);
/// @see Partitioner::SetMethod
/// @see Partitioner::Finalize
static void Initialize(int * argc, char *** argv);
/// Finalize the use of partitioner.
/// @see Partitioner::Initialize
static void Finalize();
/// The default constructor of the partitioner for the specified mesh.
Partitioner(Mesh * m);
Partitioner(const Partitioner & other);
Partitioner & operator =(Partitioner const & other);
/// Evaluate the earlier specified partitioner.
/// @see Partitioner::SetMethod
void Evaluate();
/// Set the partitioner method to be used.
/// @param t The concrete Type of the partitioner from the selected package.
/// @param a The partitioner Action, the default is Repartition.
/// @see Partitioner::Evaluate
void SetMethod(enum Type t, enum Action a = Repartition);
/// Compute the specific weights for the selected partitioner.
void SetWeight(Tag weight);
/// Reset the computed weights for the partitioner.
void ResetWeight();
/// Get the Mesh pointer for the current partitioner.
Mesh * GetMesh();
/// Get the Tag of the computed weights for the current partitioner.
Tag GetWeight();
This diff is collapsed.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment