1#ifndef included_AMP_EpetraVectorFactor
2#define included_AMP_EpetraVectorFactor
5#include "AMP/utils/UnitTest.h"
6#include "AMP/vectors/Vector.h"
7#include "AMP/vectors/testHelpers/VectorTests.h"
16class NativeEpetraFactory :
public VectorFactory
19 NativeEpetraFactory() {}
22 const int nLocal = 210;
24 const int start = nLocal * globalComm.getRank();
25 const int nGlobal = nLocal * globalComm.getSize();
26 auto commList = std::make_shared<CommunicationList>( nLocal, globalComm );
27 auto dofManager = std::make_shared<AMP::Discretization::DOFManager>( nLocal, globalComm );
28 auto buffer = std::make_shared<AMP::LinearAlgebra::VectorDataDefault<double>>(
29 start, nLocal, nGlobal );
33 std::string name()
const override {
return "NativeEpetraFactory"; }
Provides C++ wrapper around MPI routines.
std::shared_ptr< Vector > shared_ptr
Shorthand for shared pointer to Vector.
std::shared_ptr< Vector > createEpetraVector(std::shared_ptr< CommunicationList > commList, std::shared_ptr< AMP::Discretization::DOFManager > DOFs, std::shared_ptr< VectorData > p=nullptr)
Create an epetra vector.