The topology is reconstructed even if the number of nodes did not change in order to start the model more than once (Nils Mangelsen)
This commit is contained in:
parent
c9c982fb81
commit
b411e85607
3 changed files with 41 additions and 49 deletions
|
|
@ -32,8 +32,6 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
|
||||
void paradiseo::smp::Complete::operator()(unsigned nbNode, std::vector<std::vector<bool>>& matrix) const
|
||||
{
|
||||
if(nbNode != matrix.size())
|
||||
{
|
||||
matrix.clear();
|
||||
|
||||
matrix.resize(nbNode);
|
||||
|
|
@ -45,5 +43,4 @@ void paradiseo::smp::Complete::operator()(unsigned nbNode, std::vector<std::vect
|
|||
matrix.assign(nbNode, line);
|
||||
for(unsigned i = 0; i < nbNode; i++)
|
||||
matrix[i][i]=false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
|
||||
void paradiseo::smp::Hypercubic::operator()(unsigned nbNode, std::vector<std::vector<bool>>& matrix) const
|
||||
{
|
||||
if(nbNode != matrix.size())
|
||||
{
|
||||
// Check if the number of node is coherent with an hypercube
|
||||
assert((nbNode & (nbNode-1)) == 0);
|
||||
|
||||
|
|
@ -57,9 +55,8 @@ void paradiseo::smp::Hypercubic::operator()(unsigned nbNode, std::vector<std::ve
|
|||
for(i = 0; i < stepNbNode; i++)
|
||||
for(j = 0; j < stepNbNode; j++)
|
||||
{
|
||||
matrix[i+stepNbNode][j+stepNbNode]=matrix[i][j]; //Diagonal part
|
||||
matrix[i][j+stepNbNode]= matrix[i+stepNbNode][j] = (i == j); //Identity
|
||||
}
|
||||
matrix[i+stepNbNode][j+stepNbNode] = matrix[i][j]; //Diagonal part
|
||||
matrix[i][j+stepNbNode] = matrix[i+stepNbNode][j] = (i == j); //Identity
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
|
||||
void paradiseo::smp::Ring::operator()(unsigned nbNode, std::vector<std::vector<bool>>& matrix) const
|
||||
{
|
||||
if(nbNode != matrix.size())
|
||||
{
|
||||
matrix.clear();
|
||||
|
||||
matrix.resize(nbNode);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue