You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a code as below to glue the local Vector FF to the HypreParVector X00, the FF will access the not-self part of X00 on every process: so the code is all right when mpirun -np 1, but get corrupted size vs. prev_size if I run it more than one processes.
So how to fix it? Or how to prevent FF from accessing the not-self part of X00 on a given process?
`
Array dofs;
HypreParVector X00 = X0;
for (int id = 0; id < pmesh->GetNE(); id++) {
Q_space->GetElementDofs(id, dofs);
for (int edge = 0; edge < 3; edge++) {
if (dofs[edge] >= 0) {
index = dofs[edge];
} else {
index = -dofs[edge] - 1;
}
X00(index) = FF(edge);
}
}
`
The text was updated successfully, but these errors were encountered:
I have work out the problem, just use ParGridFunction as: ParGridFunction pi_p(Q_space); for (int id = 0; id < Q_space->GetNE(); id++) { Array<int> dofs; Q_space->GetElementVDofs(id, dofs); pi_p.SetSubVector(dofs, FF); }
Everything is OK now!
I have a code as below to glue the local
Vector
FF to theHypreParVector
X00, the FF will access the not-self part of X00 on every process: so the code is all right whenmpirun -np 1
, but get corrupted size vs. prev_size if I run it more than one processes.So how to fix it? Or how to prevent FF from accessing the not-self part of X00 on a given process?
`
Array dofs;
HypreParVector X00 = X0;
for (int id = 0; id < pmesh->GetNE(); id++) {
}
}
`
The text was updated successfully, but these errors were encountered: