QCPartitioner< TPSystem > Class Template Reference

#include <QCPartitioner.hpp>

Inheritance diagram for QCPartitioner< TPSystem >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<class TPSystem>
class QCPartitioner< TPSystem >

The basic class of the partitionner classes.

class QCPartitioner

Definition at line 38 of file QCPartitioner.hpp.

Public Types

typedef TPSystem TSystem

Public Member Functions

int getNbPartitions (void) const
int getNbParts (void) const
QCPartitionType getPartitionType () const
virtual void init (const QCGeneralData &data, const QCFiles &files, const int *load=NULL, const int sizeLoad=0)
 Initialize.
void initData (const QCGeneralData &data, const QCFiles &files)
bool isToReadFromFile (void) const
virtual void partitioning (TPSystem &mdSystem)
 Virtual function which build a partition of the molecule. Virtual function which build a partition of the molecule and must be implemented in your derived class.
 QCPartitioner (void)
void readFromFile (TPSystem &system, QCGeneralData &data, const QCFiles &files, const string &path)
 Read an existing partition of a molecule from a file. Read an existing partition of a molecule from a file. The name of the partition file is build as follow : path/name.qci The format of the partition is the old format where for each atoms we specify the number of the partition where is located and its local number.
void setLoad (const int *charge, const int nb)
void setNumberOfPartitions (const int N)
void setRadiusOfBuffer1 (const QCFloat R)
void setRadiusOfBuffer2 (const QCFloat R)
void writeHeader (std::ofstream &out)
void writeInFile (const TPSystem &system, const std::string &fileNameIn, const string &path)
 Save the current partition of the molecule in two files. Save the current partition of the molecule in two files. We save the old and the new format of the partition. The names of the file are
  1. path/fileNameIn.partition for the old format
  2. path/fileNameIn.partition-new for the new format.

void writeInFile (const TPSystem &system, const QCFiles &files, const string &path)
 Save the current partition of the molecule in two files. Save the current partition of the molecule in two files. We save the old and the new format of the partition. The names of the file are
  1. path/result_name.partition for the old format
  2. path/result_name.partition-new for the new format.

virtual void writeInFileV1 (std::ofstream &out, const TPSystem &system)
virtual void writeInFileV2 (std::ofstream &out, const TPSystem &system)
virtual void writeInFileVTK (std::ofstream &out, const TPSystem &system)
virtual void writeSubDomainVTK (std::ofstream &out, const QCSubDomain &domain)
virtual ~QCPartitioner (void)

Protected Member Functions

void updateInternalStructure (TPSystem &system)

Protected Attributes

int * _ordering
int * charge
const QCFilesfiles
bool isReady
int nbPartitions
QCPartitionType partType
std::string partTypeStr
QCFloat radius1
QCFloat radius2
bool readPartFile
bool useFrag

Private Member Functions

void writeInFileNew (std::ofstream &out, const TPSystem &system)
void writeInFileOLD (std::ofstream &out, const TPSystem &system)


Member Typedef Documentation

template<class TPSystem>
typedef TPSystem QCPartitioner< TPSystem >::TSystem
 

Public methods:

Definition at line 44 of file QCPartitioner.hpp.


Constructor & Destructor Documentation

template<class TPSystem>
QCPartitioner< TPSystem >::QCPartitioner void   ) 
 

Default constructeur.

Definition at line 42 of file QCPartitioner.cpp.

template<class TPSystem>
QCPartitioner< TPSystem >::~QCPartitioner void   )  [virtual]
 

Definition at line 51 of file QCPartitioner.cpp.

References QCPartitioner< TPSystem >::charge, QCPartitioner< TPSystem >::isReady, and QC_TRACE_END.


Member Function Documentation

template<class TPSystem>
int QCPartitioner< TPSystem >::getNbPartitions void   )  const [inline]
 

Return the number of subdomains of the molecule.

Definition at line 61 of file QCPartitioner.hpp.

References QCPartitioner< TPSystem >::nbPartitions.

Referenced by QCMDSystem< TPSolver >::init().

template<class TPSystem>
int QCPartitioner< TPSystem >::getNbParts void   )  const [inline]
 

Return the number of subdomains of the molecule.

Definition at line 56 of file QCPartitioner.hpp.

References QCPartitioner< TPSystem >::nbPartitions.

template<class TPSystem>
QCPartitionType QCPartitioner< TPSystem >::getPartitionType void   )  const [inline]
 

Set the size of the radius of the buffer1.

Definition at line 71 of file QCPartitioner.hpp.

References QCPartitioner< TPSystem >::partType.

Referenced by QCMDSystem< TPSolver >::init().

template<class TPSystem>
void QCPartitioner< TPSystem >::init const QCGeneralData data,
const QCFiles files,
const int *  load = NULL,
const int  sizeLoad = 0
[virtual]
 

Initialize.

Reimplemented in QCKimikaPartitioner< TPSystem >.

Definition at line 82 of file QCPartitioner.cpp.

References QCPartitioner< TPSystem >::files, QCGeneralData::getBuffDiameter(), QCGeneralData::getCutRadius(), QCGeneralData::getNbPartitions(), QCGeneralData::getPartitionType(), QCGeneralData::getPartitionTypeStr(), QCGeneralData::isReadPartitionFromFile(), QCPartitioner< TPSystem >::isReady, QCPartitioner< TPSystem >::nbPartitions, QCPartitioner< TPSystem >::partType, QCPartitioner< TPSystem >::partTypeStr, QC_TRACE_INIT, QCPartitioner< TPSystem >::radius1, QCPartitioner< TPSystem >::radius2, QCPartitioner< TPSystem >::readPartFile, and QCPartitioner< TPSystem >::setLoad().

Referenced by QCMDSystem< TPSolver >::buildPartitioner().

Here is the call graph for this function:

template<class TPSystem>
void QCPartitioner< TPSystem >::initData const QCGeneralData data,
const QCFiles files
 

Initialize data in the class from the structures data and files

Definition at line 63 of file QCPartitioner.cpp.

References QCPartitioner< TPSystem >::files, QCGeneralData::getBuffDiameter(), QCGeneralData::getCutRadius(), QCGeneralData::getNbPartitions(), QCGeneralData::getPartitionType(), QCGeneralData::getPartitionTypeStr(), QCGeneralData::isReadPartitionFromFile(), QCPartitioner< TPSystem >::isReady, QCPartitioner< TPSystem >::nbPartitions, QCPartitioner< TPSystem >::partType, QCPartitioner< TPSystem >::partTypeStr, QC_TRACE_INIT, QCPartitioner< TPSystem >::radius1, QCPartitioner< TPSystem >::radius2, and QCPartitioner< TPSystem >::readPartFile.

Referenced by QCMDSystem< TPSolver >::init(), QCLinearPartitioner< TPSystem >::initData(), and QCPartitioner< TPSystem >::readFromFile().

Here is the call graph for this function:

template<class TPSystem>
bool QCPartitioner< TPSystem >::isToReadFromFile void   )  const [inline]
 

Return true if we read the partition from a given file. If false, the partition is build by the program.

Definition at line 87 of file QCPartitioner.hpp.

References QCPartitioner< TPSystem >::readPartFile.

template<class TPSystem>
void QCPartitioner< TPSystem >::partitioning TPSystem &  mdSystem  )  [virtual]
 

Virtual function which build a partition of the molecule. Virtual function which build a partition of the molecule and must be implemented in your derived class.

Reimplemented in QCKimikaPartitioner< TPSystem >, and QCLinearPartitioner< TPSystem >.

Definition at line 128 of file QCPartitioner.cpp.

Referenced by QCMDSystem< TPSolver >::init().

template<class TPSystem>
void QCPartitioner< TPSystem >::readFromFile TPSystem &  system,
QCGeneralData data,
const QCFiles files,
const string &  path
 

Read an existing partition of a molecule from a file. Read an existing partition of a molecule from a file. The name of the partition file is build as follow : path/name.qci The format of the partition is the old format where for each atoms we specify the number of the partition where is located and its local number.

Definition at line 138 of file QCPartitioner.cpp.

References QCFiles::getPartitionFile(), QCPartitioner< TPSystem >::initData(), QCPartitioner< TPSystem >::nbPartitions, QC_TRACE_INIT, and QCReader::readPartitionFile().

Referenced by QCMDSystem< TPSolver >::init(), and main().

Here is the call graph for this function:

template<class TPSystem>
void QCPartitioner< TPSystem >::setLoad const int *  charge,
const int  nb
 

Definition at line 107 of file QCPartitioner.cpp.

References QCPartitioner< TPSystem >::charge, and QC_TRACE_INIT.

Referenced by QCMDSystem< TPSolver >::buildPartitioner(), and QCPartitioner< TPSystem >::init().

template<class TPSystem>
void QCPartitioner< TPSystem >::setNumberOfPartitions const int  N  )  [inline]
 

Set the number of subdomains of the molecule.

Definition at line 66 of file QCPartitioner.hpp.

References QCPartitioner< TPSystem >::nbPartitions.

template<class TPSystem>
void QCPartitioner< TPSystem >::setRadiusOfBuffer1 const QCFloat  R  )  [inline]
 

Set the size of the radius of the buffer1.

Definition at line 76 of file QCPartitioner.hpp.

References QCPartitioner< TPSystem >::radius1.

template<class TPSystem>
void QCPartitioner< TPSystem >::setRadiusOfBuffer2 const QCFloat  R  )  [inline]
 

Set the size of the radius of the buffer2.

Definition at line 81 of file QCPartitioner.hpp.

References QCPartitioner< TPSystem >::radius2.

template<class TPSystem>
void QCPartitioner< TPSystem >::updateInternalStructure TPSystem &  system  )  [protected]
 

This function update the head of the internal structure overlapMap in all subdomains

Definition at line 166 of file QCPartitioner.cpp.

References QC_TRACE_INIT.

Referenced by QCLinearPartitioner< TPSystem >::partitioning(), and QCKimikaPartitioner< TPSystem >::partitioning().

template<class TPSystem>
void QCPartitioner< TPSystem >::writeHeader std::ofstream &  out  ) 
 

Definition at line 210 of file QCPartitioner.cpp.

References QCPartitioner< TPSystem >::nbPartitions, QCPartitioner< TPSystem >::partTypeStr, QC_TRACE_OUT, QCPartitioner< TPSystem >::radius1, and QCPartitioner< TPSystem >::radius2.

Referenced by QCPartitioner< TPSystem >::writeInFileNew(), and QCMDSystem< TPSolver >::writeOrbitalPartition().

template<class TPSystem>
void QCPartitioner< TPSystem >::writeInFile const TPSystem &  system,
const std::string &  fileNameIn,
const string &  path
 

Save the current partition of the molecule in two files. Save the current partition of the molecule in two files. We save the old and the new format of the partition. The names of the file are

  1. path/fileNameIn.partition for the old format
  2. path/fileNameIn.partition-new for the new format.

Definition at line 182 of file QCPartitioner.cpp.

References QC_TRACE_OUT, QCPartitioner< TPSystem >::writeInFileNew(), QCPartitioner< TPSystem >::writeInFileOLD(), and QCPartitioner< TPSystem >::writeInFileVTK().

Here is the call graph for this function:

template<class TPSystem>
void QCPartitioner< TPSystem >::writeInFile const TPSystem &  system,
const QCFiles files,
const string &  path
[inline]
 

Save the current partition of the molecule in two files. Save the current partition of the molecule in two files. We save the old and the new format of the partition. The names of the file are

  1. path/result_name.partition for the old format
  2. path/result_name.partition-new for the new format.

Definition at line 203 of file QCPartitioner.hpp.

References QCFiles::getResultFile(), and QC_TRACE_OUT.

Here is the call graph for this function:

template<class TPSystem>
void QCPartitioner< TPSystem >::writeInFileNew std::ofstream &  out,
const TPSystem &  system
[private]
 

Definition at line 223 of file QCPartitioner.cpp.

References QCPartitioner< TPSystem >::nbPartitions, QC_TRACE_OUT, and QCPartitioner< TPSystem >::writeHeader().

Referenced by QCPartitioner< TPSystem >::writeInFile(), and QCPartitioner< TPSystem >::writeInFileV2().

Here is the call graph for this function:

template<class TPSystem>
void QCPartitioner< TPSystem >::writeInFileOLD std::ofstream &  out,
const TPSystem &  system
[private]
 

Definition at line 240 of file QCPartitioner.cpp.

References QCPartitioner< TPSystem >::nbPartitions, QCPartitioner< TPSystem >::partTypeStr, QC_TRACE_OUT, QCPartitioner< TPSystem >::radius1, and QCPartitioner< TPSystem >::radius2.

Referenced by QCPartitioner< TPSystem >::writeInFile(), and QCPartitioner< TPSystem >::writeInFileV1().

template<class TPSystem>
virtual void QCPartitioner< TPSystem >::writeInFileV1 std::ofstream &  out,
const TPSystem &  system
[inline, virtual]
 

Definition at line 132 of file QCPartitioner.hpp.

References QCPartitioner< TPSystem >::writeInFileOLD().

Referenced by main().

Here is the call graph for this function:

template<class TPSystem>
virtual void QCPartitioner< TPSystem >::writeInFileV2 std::ofstream &  out,
const TPSystem &  system
[inline, virtual]
 

Definition at line 130 of file QCPartitioner.hpp.

References QCPartitioner< TPSystem >::writeInFileNew().

Referenced by main().

Here is the call graph for this function:

template<class TPSystem>
void QCPartitioner< TPSystem >::writeInFileVTK std::ofstream &  out,
const TPSystem &  system
[virtual]
 

Definition at line 310 of file QCPartitioner.cpp.

References QCSubDomain::getGlobalIdxs(), QCAtoms::getNbAtoms(), QCAtoms::getPointAt(), QCPartitioner< TPSystem >::nbPartitions, QC_CORE, QC_DIXON_PART, QC_SHELL1, and QC_TRACE_OUT.

Referenced by main(), and QCPartitioner< TPSystem >::writeInFile().

Here is the call graph for this function:

template<class TPSystem>
void QCPartitioner< TPSystem >::writeSubDomainVTK std::ofstream &  out,
const QCSubDomain domain
[virtual]
 

Definition at line 372 of file QCPartitioner.cpp.

References QCAtoms::getNbAtoms(), QCAtoms::getPointAt(), QCSubDomain::getZone(), QC_CORE, QC_DIXON_PART, QC_SHELL1, and QC_TRACE_OUT.

Referenced by main().

Here is the call graph for this function:


Member Data Documentation

template<class TPSystem>
int* QCPartitioner< TPSystem >::_ordering [protected]
 

New numerotation of the molecule _ordering[i] = original numeroration of atom number i.

Definition at line 192 of file QCPartitioner.hpp.

Referenced by QCLinearPartitioner< TPSystem >::partitioning(), and QCLinearPartitioner< TPSystem >::sortFirstAxis().

template<class TPSystem>
int* QCPartitioner< TPSystem >::charge [protected]
 

Array of loads of partition

Definition at line 187 of file QCPartitioner.hpp.

Referenced by QCKimikaPartitioner< TPSystem >::extractDomains(), QCKimikaPartitioner< TPSystem >::partitioning(), QCPartitioner< TPSystem >::setLoad(), QCLinearPartitioner< TPSystem >::setLoad(), QCLinearPartitioner< TPSystem >::sortFirstAxis(), and QCPartitioner< TPSystem >::~QCPartitioner().

template<class TPSystem>
const QCFiles* QCPartitioner< TPSystem >::files [protected]
 

A pointer to access of the names of the different files used by QCPP

Definition at line 196 of file QCPartitioner.hpp.

Referenced by QCKimikaPartitioner< TPSystem >::extractDomains(), QCPartitioner< TPSystem >::init(), QCPartitioner< TPSystem >::initData(), and QCKimikaPartitioner< TPSystem >::writeInventorFiles().

template<class TPSystem>
bool QCPartitioner< TPSystem >::isReady [protected]
 

If isReady is true the class is well initialised

Definition at line 157 of file QCPartitioner.hpp.

Referenced by QCPartitioner< TPSystem >::init(), QCPartitioner< TPSystem >::initData(), and QCPartitioner< TPSystem >::~QCPartitioner().

template<class TPSystem>
int QCPartitioner< TPSystem >::nbPartitions [protected]
 

The number of subdomains (I.e. sub molecules) in the system

Definition at line 170 of file QCPartitioner.hpp.

Referenced by QCKimikaPartitioner< TPSystem >::allocStructures(), QCLinearPartitioner< TPSystem >::equilibrateAOs(), QCLinearPartitioner< TPSystem >::extractDomains(), QCKimikaPartitioner< TPSystem >::extractDomains(), QCPartitioner< TPSystem >::getNbPartitions(), QCPartitioner< TPSystem >::getNbParts(), QCPartitioner< TPSystem >::init(), QCPartitioner< TPSystem >::initData(), QCLinearPartitioner< TPSystem >::initData(), QCKimikaPartitioner< TPSystem >::initPartChain(), QCLinearPartitioner< TPSystem >::partitioning(), QCKimikaPartitioner< TPSystem >::printGlobalTab(), QCPartitioner< TPSystem >::readFromFile(), QCLinearPartitioner< TPSystem >::resetData(), QCKimikaPartitioner< TPSystem >::resetStructures(), QCLinearPartitioner< TPSystem >::setAtomsInBuffers(), QCKimikaPartitioner< TPSystem >::setAtomsInBuffersDixon(), QCKimikaPartitioner< TPSystem >::setAtomsInBuffersStd(), QCLinearPartitioner< TPSystem >::setAtomsInKernel(), QCKimikaPartitioner< TPSystem >::setAtomsInKernel(), QCLinearPartitioner< TPSystem >::setAtomZones(), QCLinearPartitioner< TPSystem >::setLoad(), QCLinearPartitioner< TPSystem >::setNeighbors(), QCPartitioner< TPSystem >::setNumberOfPartitions(), QCPartitioner< TPSystem >::writeHeader(), QCPartitioner< TPSystem >::writeInFileNew(), QCPartitioner< TPSystem >::writeInFileOLD(), QCPartitioner< TPSystem >::writeInFileVTK(), and QCKimikaPartitioner< TPSystem >::writeInventorFiles().

template<class TPSystem>
QCPartitionType QCPartitioner< TPSystem >::partType [protected]
 

Type of the partition (Dixon or standart)

Definition at line 174 of file QCPartitioner.hpp.

Referenced by QCPartitioner< TPSystem >::getPartitionType(), QCPartitioner< TPSystem >::init(), and QCPartitioner< TPSystem >::initData().

template<class TPSystem>
std::string QCPartitioner< TPSystem >::partTypeStr [protected]
 

Definition at line 175 of file QCPartitioner.hpp.

Referenced by QCKimikaPartitioner< TPSystem >::extractDomains(), QCPartitioner< TPSystem >::init(), QCPartitioner< TPSystem >::initData(), QCPartitioner< TPSystem >::writeHeader(), QCPartitioner< TPSystem >::writeInFileOLD(), and QCKimikaPartitioner< TPSystem >::writeInventorFiles().

template<class TPSystem>
QCFloat QCPartitioner< TPSystem >::radius1 [protected]
 

The radius of buffer1

Definition at line 179 of file QCPartitioner.hpp.

Referenced by QCKimikaPartitioner< TPSystem >::extractDomains(), QCPartitioner< TPSystem >::init(), QCPartitioner< TPSystem >::initData(), QCLinearPartitioner< TPSystem >::setAtomsInBuffers(), QCKimikaPartitioner< TPSystem >::setAtomsInBuffersDixon(), QCKimikaPartitioner< TPSystem >::setAtomsInBuffersStd(), QCPartitioner< TPSystem >::setRadiusOfBuffer1(), QCPartitioner< TPSystem >::writeHeader(), QCPartitioner< TPSystem >::writeInFileOLD(), and QCKimikaPartitioner< TPSystem >::writeInventorFiles().

template<class TPSystem>
QCFloat QCPartitioner< TPSystem >::radius2 [protected]
 

The radius of buffer2

Definition at line 183 of file QCPartitioner.hpp.

Referenced by QCKimikaPartitioner< TPSystem >::extractDomains(), QCPartitioner< TPSystem >::init(), QCPartitioner< TPSystem >::initData(), QCLinearPartitioner< TPSystem >::setAtomsInBuffers(), QCKimikaPartitioner< TPSystem >::setAtomsInBuffersDixon(), QCKimikaPartitioner< TPSystem >::setAtomsInBuffersStd(), QCPartitioner< TPSystem >::setRadiusOfBuffer2(), QCPartitioner< TPSystem >::writeHeader(), QCPartitioner< TPSystem >::writeInFileOLD(), and QCKimikaPartitioner< TPSystem >::writeInventorFiles().

template<class TPSystem>
bool QCPartitioner< TPSystem >::readPartFile [protected]
 

readPartFile is true if the partition of the molecule is read from a file

Definition at line 161 of file QCPartitioner.hpp.

Referenced by QCPartitioner< TPSystem >::init(), QCPartitioner< TPSystem >::initData(), and QCPartitioner< TPSystem >::isToReadFromFile().

template<class TPSystem>
bool QCPartitioner< TPSystem >::useFrag [protected]
 

If useFrag is true, the partitionner is based on fragment (and not on atoms) to construct the subdomains

Definition at line 166 of file QCPartitioner.hpp.

Referenced by QCLinearPartitioner< TPSystem >::setAtomsInBuffers(), and QCLinearPartitioner< TPSystem >::setAtomsInKernel().


The documentation for this class was generated from the following files:
Generated on Sat Jan 28 21:07:34 2006 for QC++ by  doxygen 1.4.4