DOLFIN
DOLFIN C++ interface
Public Member Functions | List of all members
dolfin::GenericTensor Class Referenceabstract

A common interface for arbitrary rank tensors. More...

#include <GenericTensor.h>

Inheritance diagram for dolfin::GenericTensor:
Inheritance graph
[legend]
Collaboration diagram for dolfin::GenericTensor:
Collaboration graph
[legend]

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 GenericLinearAlgebraFactoryfactory () const =0
 Return linear algebra backend factory.
 
- Public Member Functions inherited from dolfin::LinearAlgebraObject
virtual const LinearAlgebraObjectinstance () const
 Return concrete instance / unwrap (const version)
 
virtual LinearAlgebraObjectinstance ()
 Return concrete instance / unwrap (non-const version)
 
virtual std::shared_ptr< const LinearAlgebraObjectshared_instance () const
 Return concrete shared ptr instance / unwrap (const version)
 
virtual std::shared_ptr< LinearAlgebraObjectshared_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 Variableoperator= (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.
 

Detailed Description

A common interface for arbitrary rank tensors.

Member Function Documentation

◆ str()

virtual std::string dolfin::GenericTensor::str ( bool  verbose) const
pure virtual

The documentation for this class was generated from the following file: