DOLFIN
DOLFIN C++ interface
|
A common interface for arbitrary rank tensors. More...
#include <GenericTensor.h>
Public Member Functions | |
virtual | ~GenericTensor () |
Destructor. | |
virtual void | init (const TensorLayout &tensor_layout)=0 |
Initialize zero tensor using tensor layout. | |
virtual bool | empty () const =0 |
Return true if empty. | |
virtual std::size_t | rank () const =0 |
Return tensor rank (number of dimensions) | |
virtual std::size_t | size (std::size_t dim) const =0 |
Return size of given dimension. | |
virtual std::pair< std::int64_t, std::int64_t > | local_range (std::size_t dim) const =0 |
Return local ownership range. | |
virtual void | get (double *block, const dolfin::la_index *num_rows, const dolfin::la_index *const *rows) const =0 |
Get block of values. | |
virtual void | set (const double *block, const dolfin::la_index *num_rows, const dolfin::la_index *const *rows)=0 |
Set block of values using global indices. | |
virtual void | set_local (const double *block, const dolfin::la_index *num_rows, const dolfin::la_index *const *rows)=0 |
Set block of values using local indices. | |
virtual void | add (const double *block, const std::vector< ArrayView< const dolfin::la_index >> &rows)=0 |
Add block of values using global indices. | |
virtual void | add_local (const double *block, const std::vector< ArrayView< const dolfin::la_index >> &rows)=0 |
Add block of values using local indices. | |
virtual void | add (const double *block, const dolfin::la_index *num_rows, const dolfin::la_index *const *rows)=0 |
Add block of values using global indices. | |
virtual void | add_local (const double *block, const dolfin::la_index *num_rows, const dolfin::la_index *const *rows)=0 |
Add block of values using local indices. | |
virtual void | zero ()=0 |
Set all entries to zero and keep any sparse structure. | |
virtual void | apply (std::string mode)=0 |
Finalize assembly of tensor. | |
virtual std::string | str (bool verbose) const =0 |
Return MPI communicator. More... | |
virtual GenericLinearAlgebraFactory & | factory () const =0 |
Return linear algebra backend factory. | |
Public Member Functions inherited from dolfin::LinearAlgebraObject | |
virtual const LinearAlgebraObject * | instance () const |
Return concrete instance / unwrap (const version) | |
virtual LinearAlgebraObject * | instance () |
Return concrete instance / unwrap (non-const version) | |
virtual std::shared_ptr< const LinearAlgebraObject > | shared_instance () const |
Return concrete shared ptr instance / unwrap (const version) | |
virtual std::shared_ptr< LinearAlgebraObject > | shared_instance () |
Return concrete shared ptr instance / unwrap (non-const version) | |
virtual MPI_Comm | mpi_comm () const =0 |
Return MPI communicator. | |
Public Member Functions inherited from dolfin::Variable | |
Variable () | |
Create unnamed variable. | |
Variable (const std::string name, const std::string label) | |
Create variable with given name and label. | |
Variable (const Variable &variable) | |
Copy constructor. | |
virtual | ~Variable () |
Destructor. | |
const Variable & | operator= (const Variable &variable) |
Assignment operator. | |
void | rename (const std::string name, const std::string label) |
Rename variable. | |
std::string | name () const |
Return name. | |
std::string | label () const |
Return label (description) | |
std::size_t | id () const |
Additional Inherited Members | |
Public Attributes inherited from dolfin::Variable | |
Parameters | parameters |
Parameters. | |
A common interface for arbitrary rank tensors.
|
pure virtual |
Return MPI communicator.
Return informal string representation (pretty-print)
Reimplemented from dolfin::Variable.
Implemented in dolfin::Scalar, dolfin::GenericVector, dolfin::GenericMatrix, dolfin::PETScMatrix, dolfin::TpetraMatrix, dolfin::PETScVector, dolfin::EigenMatrix, dolfin::Matrix, dolfin::TpetraVector, dolfin::Vector, and dolfin::EigenVector.