Class documentation of Concepts

Loading...
Searching...
No Matches

#include <vectors.hh>

Inheritance diagram for timestepping::TimeVector:
concepts::Vector< Real > concepts::Function< F > concepts::OutputOperator

Public Member Functions

 TimeVector (const concepts::Space< Real > &spc, TimeLinearForm &tlf)
 
 TimeVector (const concepts::Space< Real > &spc)
 
 TimeVector (const concepts::Vector< Real > &vec)
 
 TimeVector (const concepts::Vector< Real > &vec, const concepts::Formula< Real > &frm, const Real time=0)
 
Real time () const
 Returns the current time_.
 
void time (Real time)
 
virtual Real & operator() (uint i)
 Index operator.
 
virtual Real operator() (uint i) const
 Index operator.
 
uint size () const
 
virtual Function< Real > & operator+= (const Function< Real > &fnc)
 Addition operator.
 
virtual Function< Real > & operator+= (Real c)
 Addition operator.
 
virtual Function< F > & operator+= (const Function< F > &fnc)
 Addition operator.
 
virtual Function< F > & operator+= (F c)
 Addition operator.
 
Vector< Real > operator+ (const Function< Real > &fnc) const
 
Vector< Real > operator+ (Real c) const
 
virtual Function< Real > & operator-= (const Function< Real > &fnc)
 Subtraction operator.
 
virtual Function< Real > & operator-= (Real c)
 Subtraction operator.
 
virtual Function< F > & operator-= (const Function< F > &fnc)
 Subtraction operator.
 
virtual Function< F > & operator-= (F c)
 Subtraction operator.
 
Vector< Real > operator- (const Function< Real > &fnc) const
 
Vector< Real > operator- (Real c) const
 
virtual Function< Real > & operator*= (Real sc)
 Scaling operator.
 
virtual Function< F > & operator*= (F a)
 Scaling operator.
 
Vector< Real > operator* (Real c) const
 
Real operator* (const Vector< Real > &fnc) const
 
virtual Function< Real > & operator/= (Real sc)
 
Vector< Real > operator/ (Real c) const
 
Vector< Real > & assemble (const Space< G > &spc, const LinearForm< Real, G > &lf)
 Assembles the vector w.r.t. linear form lf and space spc.
 
Vector< Real > & apply (Real fnc(const Real &))
 
 operator Real * () const
 
Real * data () const
 
virtual void resize (uint n)
 Sets a new size, previous data might be lost

 
virtual Function< Real > & add (const Function< Real > &fnc, Real sc)
 Adds a times fnc to this function.
 
Vector< Real > & add (const Vector< H > &fnc, Real sc, uint offset=0)
 Adds a vector of possible different length and type with an offset.
 
Vector< Real > & add (const Vector< H > &fnc)
 Adds a vector of possible different length and type.
 
virtual Function< F > & add (const Function< F > &fnc, F a)
 Adds a times fnc to this function.
 
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. $l^\infty$ norm.
 
uint n () const
 Elements in the vector.
 
void reverse ()
 
const Vector< Real > & 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.
 

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream.
 
void fillEntries_ (const Space< G > &spc, const LinearForm< Real, G > &lf)
 

Protected Attributes

Array< Real > data_
 Vector data.
 
uint dim_
 Dimension of the function (or of the space the function is defined)
 

Detailed Description

Class implementing time dependent vectors. In order to get the vector at time t, call the time function with argument t.

Author
Manuel Walser, 2002

Definition at line 53 of file vectors.hh.

Constructor & Destructor Documentation

◆ TimeVector() [1/4]

timestepping::TimeVector::TimeVector ( const concepts::Space< Real > &  spc,
TimeLinearForm tlf 
)
inline

Constructor. A TimeVector created with this constructor reassembles when the time is changed.

Parameters
spcSpace
tlfLinear form to be evaluated when the time is changed

Definition at line 60 of file vectors.hh.

◆ TimeVector() [2/4]

timestepping::TimeVector::TimeVector ( const concepts::Space< Real > &  spc)
inline

Constructor. A TimeVector created with this constructor does not reassemble when the time is changed.

Parameters
spcSpace

Definition at line 67 of file vectors.hh.

◆ TimeVector() [3/4]

timestepping::TimeVector::TimeVector ( const concepts::Vector< Real > &  vec)
inline

Copy Constructor. A TimeVector created with this constructor does not reassemble when the time is changed.

Parameters
vecThe Vector to be copied

Definition at line 74 of file vectors.hh.

◆ TimeVector() [4/4]

timestepping::TimeVector::TimeVector ( const concepts::Vector< Real > &  vec,
const concepts::Formula< Real > &  frm,
const Real  time = 0 
)

Constructor for a constant vector times a formula in time

Parameters
vecThe vector
frmThe formula
timeCurrent time

◆ ~TimeVector()

timestepping::TimeVector::~TimeVector ( )
inline

Definition at line 85 of file vectors.hh.

Member Function Documentation

◆ add() [1/3]

template<class F >
virtual Function< F > & concepts::Function< F >::add ( const Function< F > &  fnc,
a 
)
virtualinherited

Adds a times fnc to this function.

Reimplemented in concepts::SubVector< F >, and concepts::Vector< F >.

◆ add() [2/3]

Vector< Real > & concepts::Vector< Real >::add ( const Vector< H > &  fnc)
inlineinherited

Adds a vector of possible different length and type.

Definition at line 209 of file vector.hh.

◆ add() [3/3]

Vector< Real > & concepts::Vector< Real >::add ( const Vector< H > &  fnc,
Real  sc,
uint  offset = 0 
)
inherited

Adds a vector of possible different length and type with an offset.

Definition at line 205 of file vector.hh.

◆ apply()

Vector< Real > & concepts::Vector< Real >::apply ( Real  fncconst F &)
inherited

Application operator to each component, e.g. std::sin or std::conj

◆ data()

Real * concepts::Vector< Real >::data ( ) const
inlineinherited

Definition at line 192 of file vector.hh.

◆ dim()

template<class F >
uint concepts::Function< F >::dim ( ) const
inlineinherited

Returns the dimension of the function.

Definition at line 53 of file basis.hh.

◆ info()

virtual std::ostream & concepts::Vector< Real >::info ( std::ostream &  os) const
protectedvirtualinherited

Returns information in an output stream.

Reimplemented from concepts::Function< F >.

◆ l2()

Real concepts::Vector< Real >::l2 ( ) const
inlineinherited

l2 norm

Definition at line 215 of file vector.hh.

◆ n()

uint concepts::Vector< Real >::n ( ) const
inlineinherited

Elements in the vector.

Definition at line 224 of file vector.hh.

◆ operator Real *()

concepts::Vector< Real >::operator Real * ( ) const
inlineinherited

Conversion operator. Returns the array of values.

Definition at line 190 of file vector.hh.

◆ operator()() [1/2]

virtual Real & concepts::Vector< Real >::operator() ( uint  i)
inlinevirtualinherited

Index operator.

Implements concepts::Function< F >.

Definition at line 140 of file vector.hh.

◆ operator()() [2/2]

virtual Real concepts::Vector< Real >::operator() ( uint  i) const
inlinevirtualinherited

Index operator.

Implements concepts::Function< F >.

Definition at line 143 of file vector.hh.

◆ operator*()

Real concepts::Vector< Real >::operator* ( const Vector< Real > &  fnc) const
inherited

Inner product (v = this, w = \fnc)

\[v \cdot w\]

or

\[v \cdot \overline{w}\]

for complex vectors respectivly.

◆ operator*=()

template<class F >
virtual Function< F > & concepts::Function< F >::operator*= ( a)
virtualinherited

Scaling operator.

Reimplemented in concepts::SubVector< F >, and concepts::Vector< F >.

◆ operator+=() [1/2]

template<class F >
virtual Function< F > & concepts::Function< F >::operator+= ( const Function< F > &  fnc)
virtualinherited

Addition operator.

Reimplemented in concepts::SubVector< F >, and concepts::Vector< F >.

◆ operator+=() [2/2]

template<class F >
virtual Function< F > & concepts::Function< F >::operator+= ( c)
virtualinherited

Addition operator.

Reimplemented in concepts::SubVector< F >, and concepts::Vector< F >.

◆ operator-=() [1/2]

template<class F >
virtual Function< F > & concepts::Function< F >::operator-= ( const Function< F > &  fnc)
virtualinherited

Subtraction operator.

Reimplemented in concepts::SubVector< F >, and concepts::Vector< F >.

◆ operator-=() [2/2]

template<class F >
virtual Function< F > & concepts::Function< F >::operator-= ( c)
virtualinherited

Subtraction operator.

Reimplemented in concepts::SubVector< F >, and concepts::Vector< F >.

◆ resize()

virtual void concepts::Vector< Real >::resize ( uint  n)
inlinevirtualinherited

Sets a new size, previous data might be lost

Definition at line 195 of file vector.hh.

◆ reverse()

void concepts::Vector< Real >::reverse ( )
inherited

Definition at line 227 of file vector.hh.

◆ size()

uint concepts::Vector< Real >::size ( ) const
inlineinherited

Definition at line 147 of file vector.hh.

◆ time() [1/2]

Real timestepping::TimeVector::time ( ) const
inline

Returns the current time_.

Definition at line 88 of file vectors.hh.

◆ time() [2/2]

void timestepping::TimeVector::time ( Real  time)

Sets the current time_. If tlf_ is set, the entries are updated.

◆ write()

const Vector< Real > & concepts::Vector< Real >::write ( const std::string &  fname) const
inherited

Writes the vector to a file. This should be endian proof.

Parameters
fnameFilename

Member Data Documentation

◆ data_

Array<Real > concepts::Vector< Real >::data_
protectedinherited

Vector data.

Definition at line 243 of file vector.hh.

◆ dim_

template<class F >
uint concepts::Function< F >::dim_
protectedinherited

Dimension of the function (or of the space the function is defined)

Definition at line 57 of file basis.hh.


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