Vector (const Vector < F > &f)
Copy constructor.
template<class H >
Vector (const Vector < H > &f)
Copy constructor.
template<class G >
Vector (const Space < G > &spc)
Vector (const uint dim =0)
template<class G >
Vector (const Space < G > &spc, const LinearForm < F, G > &lf )
template<class G >
Vector (const Space < G > &spc, const std::string &fname )
template<class G >
Vector (const Space < G > &spc, F *data)
Vector (uint dim , F *data)
template<class H >
Vector (const Vector < H > &fncX , F fnc (const H &))
template<class H >
Vector (const Vector < H > &fncX , const F &fnc (const H &))
Vector (const Vector < typename Realtype < F >::type > &V_R , const Vector < typename Realtype < F >::type > &V_I )
template<class H >
Vector (const Vector < H > &fnc , const Set < IndexRange > &indices)
virtual Vector < F > & operator= (const Function < F > &fnc )
Assignment operator.
Vector < F > & operator= (const Vector < F > &fnc )
Assignement operator.
template<class H >
Vector < F > & operator= (const Function < H > &fnc )
Vector < F > & operator= (F c)
Assignement operator.
virtual F & operator() (uint i)
Index operator.
virtual F operator() (uint i) const
Index operator.
uint size () const
virtual Function < F > & operator+= (const Function < F > &fnc )
Addition operator.
virtual Function < F > & operator+= (F c)
Addition operator.
Vector < F > operator+ (const Function < F > &fnc ) const
Vector < F > operator+ (F c) const
virtual Function < F > & operator-= (const Function < F > &fnc )
Subtraction operator.
virtual Function < F > & operator-= (F c)
Subtraction operator.
Vector < F > operator- (const Function < F > &fnc ) const
Vector < F > operator- (F c) const
virtual Function < F > & operator*= (F sc )
Scaling operator.
Vector < F > operator* (F c) const
virtual Function < F > & operator/= (F sc )
Vector < F > operator/ (F c) const
F operator* (const Vector < F > &fnc ) const
template<class G >
Vector < F > & assemble (const Space < G > &spc, const LinearForm < F, G > &lf )
Assembles the vector w.r.t. linear form lf
and space spc
.
Vector < F > & apply (F fnc (const F &))
operator F* () const
F * data () const
virtual void resize (uint n )
Sets a new size, previous data might be lost
virtual Function < F > & add (const Function < F > &fnc , F sc )
Adds a
times fnc
to this function.
template<class H >
Vector < F > & add (const Vector < H > &fnc , F sc , uint offset=0)
Adds a vector of possible different length and type with an offset.
template<class H >
Vector < F > & add (const Vector < H > &fnc )
Adds a vector of possible different length and type.
Real l1 () const
l1 norm
Real l2 () const
l2 norm
Real l2_2 () const
l2 norm squared
Real max () const
Maximum of the absolute values in the vector, ie. norm.
uint n () const
Elements in the vector.
void reverse ()
const Vector < F > & write (const std::string &fname ) const
void storeMatlab (const char *filename, const char *name=0, bool append=false ) const
Stores the vector in a Matlab sparse matrix.
uint dim () const
Returns the dimension of the function.
template<
class F>
class concepts::Vector< F >
A vector. The values of the function represented by this vector are stored elementwise in an array.
It is possible to write fast interfaces to other libraries since the array of values is under complete control of this class. An example is the interface to PETSc , where the vector data is not copied, but the data of PETSc is used.
Test: test::VectorTest
Examples BGT_0.cc , RobinBCs.cc , arpackppTutorial.cc , elasticity2D_tutorial.cc , exactDtN.cc , howToGetStarted.cc , hpFEM2d-simple.cc , hpFEM2d.cc , hpFEM3d-EV.cc , inhomDirichletBCs.cc , inhomDirichletBCsLagrange.cc , inhomNeumannBCs.cc , linearDG1d.cc , linearFEM1d-simple.cc , linearFEM1d.cc , and parallelizationTutorial.cc .
Definition at line 39 of file vector.hh .