Scalar

class dolfin.cpp.la.Scalar(*args)

Bases: dolfin.cpp.la.GenericTensor

This class represents a real-valued scalar quantity and implements the GenericTensor interface for scalars.

Create zero scalar.

Parameters:comm (MPI_Comm) –
add_local()

Add block of values using local indices.

Parameters:
  • double * block (const) –
  • dolfin::la_index * num_rows (const) –
  • dolfin::la_index *const * rows (const) –
Return type:

void

add_local_value()

Add to local increment (added for testing, remove if we add a better way from python)

Parameters:value (double) –
Return type:void
copy()

Return copy of scalar.

Return type:std::shared_ptr< Scalar >
get_scalar_value()

Get final value (assumes prior apply , not part of GenericTensor interface)

Return type:double
thisown

The membership flag