19 #ifndef GEOSX_LINEARALGEBRA_INTERFACES_EPETRAVECTOR_HPP_ 20 #define GEOSX_LINEARALGEBRA_INTERFACES_EPETRAVECTOR_HPP_ 24 class Epetra_FEVector;
94 virtual bool created()
const override;
97 MPI_Comm
const & comm )
override;
100 MPI_Comm
const & comm )
override;
103 MPI_Comm
const & comm )
override;
105 virtual void open()
override;
107 virtual void close()
override;
109 virtual void reset()
override;
111 virtual void set(
globalIndex const globalRowIndex,
112 real64 const value )
override;
115 real64 const value )
override;
117 virtual void set(
globalIndex const * globalRowIndices,
131 virtual void set(
real64 const value )
override;
133 virtual void zero()
override;
135 virtual void rand(
unsigned const seed = 1984 )
override;
137 virtual void scale(
real64 const scalingFactor )
override;
150 real64 const beta )
override;
212 virtual MPI_Comm
getComm()
const override;
214 virtual void print( std::ostream & os = std::cout )
const override;
216 virtual void write(
string const & filename,
225 Epetra_FEVector
const &
unwrapped()
const;
236 std::unique_ptr< Epetra_FEVector > m_vector;
virtual void reciprocal() override
Replace vector elements by their reciprocals.
EpetraVector()
Empty vector constructor. Create an empty (distributed) vector.
~EpetraVector()
Destructor.
Common base template for all vector wrapper types.
virtual localIndex getLocalRowID(globalIndex const globalRow) const override
Map a global row index to local row index.
virtual void pointwiseProduct(EpetraVector const &x, EpetraVector &y) const override
Compute the componentwise multiplication y = v * x.
virtual void extract(arrayView1d< real64 > const &localVector) const
Extract local solution by copying into a user-provided array.
virtual void open() override
Open the vector for modifying entries.
virtual localIndex localSize() const override
Returns the local size of the vector.
long long int globalIndex
Global index type (for indexing objects across MPI partitions).
virtual void print(std::ostream &os=std::cout) const override
Print the vector in Trilinos format to the terminal.
This class serves to provide a sliced multidimensional interface to the family of LvArray classes...
bool closed() const
Query vector closed status.
std::string format(int NDIM, INDEX_TYPE const *const dims)
This function returns a string that may be used as the "type" in a call to TV_ttf_add_row(). This will either be a single value or an array.
virtual real64 norm2() const override
2-norm of the vector.
virtual void reset() override
Reset the matrix to default state.
virtual void close() override
Assemble vector.
virtual void createWithLocalSize(localIndex const localSize, MPI_Comm const &comm) override
Create a vector based on local number of elements.
This class serves to provide a "view" of a multidimensional array.
double real64
64-bit floating point type.
virtual real64 dot(EpetraVector const &vec) const override
Dot product with the vector vec.
virtual void create(arrayView1d< real64 const > const &localValues, MPI_Comm const &comm) override
Construct parallel vector from a local array.
virtual void createWithGlobalSize(globalIndex const globalSize, MPI_Comm const &comm) override
Create a vector based on global number of elements.
virtual globalIndex iupper() const override
Get upper bound of local partition.
virtual void scale(real64 const scalingFactor) override
Multiply all elements by scalingFactor.
virtual void write(string const &filename, LAIOutputFormat const format=LAIOutputFormat::MATRIX_MARKET) const override
Write the vector to a file.
virtual real64 normInf() const override
Infinity-norm of the vector.
virtual void add(globalIndex const globalRowIndex, real64 const value) override
Add into vector value.
virtual MPI_Comm getComm() const override
Get the communicator used by this vector.
virtual globalIndex ilower() const override
Get lower bound of local partition.
virtual bool created() const override
Query vector creation status.
std::ptrdiff_t localIndex
Local index type (for indexing objects within an MPI partition).
virtual globalIndex getGlobalRowID(localIndex const localRow) const override
Map a local row index to global row index.
Epetra_FEVector const & unwrapped() const
Returns a const pointer to the underlying Epetra object.
virtual void zero() override
Set vector elements to zero.
virtual real64 norm1() const override
1-norm of the vector.
virtual globalIndex globalSize() const override
Returns the global of the vector.
This class creates and provides basic support for the Epetra_FEVector vector object type used in Tril...
virtual real64 const * extractLocalVector() const override
Extract a view of the local portion of the array.
virtual void axpby(real64 const alpha, EpetraVector const &x, real64 const beta) override
Update vector y as y = alpha*x + beta*y.
virtual void rand(unsigned const seed=1984) override
Set vector elements to random entries.
virtual void copy(EpetraVector const &x) override
Update vector y as y = x.
virtual void axpy(real64 const alpha, EpetraVector const &x) override
Update vector y as y = alpha*x + y.
EpetraVector & operator=(EpetraVector const &src)
Copy assignment.
bool ready() const
Query vector ready status.