Dune Core Modules (2.4.2)

Dune::fvector_assigner< T, s > Class Template Reference

fvector assignment operator More...

#include <dune/common/fassign.hh>

Public Member Functions

 fvector_assigner (fvector_assigner &a)
 Copy Constructor.
 
 fvector_assigner (FieldVector< T, s > &_v, bool t)
 Constructor from vector and temporary flag. More...
 
 ~fvector_assigner ()
 Destructor checks for complete initialization of the vector. The check is skipped, if this object is marked temporary.
 
fvector_assignerappend (const T &t)
 append data to this vector
 
fvector_assignerappend (Zero z)
 append zeros to this vector
 
fvector_assigneroperator, (const T &t)
 append data to this vector the overloaded comma operator is used to assign a comma separated list of values to the vector
 
fvector_assigneroperator, (Zero z)
 append zeros to this vector the overloaded comma operator is used to stop the assign of values to the vector, all remaining entries are assigned 0.
 

Detailed Description

template<class T, int s>
class Dune::fvector_assigner< T, s >

fvector assignment operator

overload operator <<= for fvector assignment from Dune::Zero

after including fassing.hh you can easily assign data to a FieldVector using

FieldVector<double, 4> x; x <<= 1.0, 4.0, 10.0, 11.0;
vector space out of a tensor product of fields.
Definition: fvector.hh:94

The operator checks that the whole vector is initalized. In case you know that all following entries will be zero padded, you can use

FieldVector<double, 40> x; x <<= 1.0, 4.0, 10.0, 11.0, zero;

The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 11, 23:30, 2024)