コード例 #1
0
void
Redistributor<Node>::redistribute_reverse(const  ::Tpetra::MultiVector<double,int,int,Node> & input_vector,  ::Tpetra::MultiVector<double,int,int,Node> & output_vector)
{
  if (!created_importer_) {
    create_importer(input_vector.Map());
  }

  // Export using the importer
  output_vector.Export(input_vector, *importer_, ::Tpetra::INSERT);

}
コード例 #2
0
void
Redistributor<Node>::redistribute(const  ::Tpetra::MultiVector<double,int,int,Node> & inputVector,  ::Tpetra::MultiVector<double,int,int,Node>  * &outputVector)
{
  if (!created_importer_) {
    create_importer(inputVector.Map());
  }

  outputVector = new  ::Tpetra::MultiVector<double,int,int,Node> (*target_map_, inputVector.NumVectors());

  outputVector->Import(inputVector, *importer_, ::Tpetra::INSERT);

  return;
}