GenericTensor.h¶
Note
The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded.
-
class
GenericTensor¶ Parent class(es)
A common interface for arbitrary rank tensors.
-
void
init(const TensorLayout &tensor_layout) = 0¶ Initialize zero tensor using tensor layout
-
bool
empty() const = 0¶ Return true if empty
-
std::size_t
rank() const = 0¶ Return tensor rank (number of dimensions)
-
std::size_t
size(std::size_t dim) const = 0¶ Return size of given dimension
-
std::pair<std::int64_t, std::int64_t>
local_range(std::size_t dim) const = 0¶ Return local ownership range
-
void
get(double *block, const dolfin::la_index *num_rows, const dolfin::la_index *const *rows) const = 0¶ Get block of values
-
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
-
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
-
void
add(const double *block, const std::vector<ArrayView<const dolfin::la_index>> &rows) = 0¶ Add block of values using global indices
-
void
add_local(const double *block, const std::vector<ArrayView<const dolfin::la_index>> &rows) = 0¶ Add block of values using local indices
-
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
-
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
-
void
zero() = 0¶ Set all entries to zero and keep any sparse structure
-
void
apply(std::string mode) = 0¶ Finalize assembly of tensor
-
std::string
str(bool verbose) const = 0¶ Return informal string representation (pretty-print)
-
GenericLinearAlgebraFactory &
factory() const = 0¶ Return linear algebra backend factory
-
void