#include <vectors.hh>
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. | |
| 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) | |
Class implementing time dependent vectors. In order to get the vector at time t, call the time function with argument t.
Definition at line 53 of file vectors.hh.
|
inline |
Constructor. A TimeVector created with this constructor reassembles when the time is changed.
| spc | Space |
| tlf | Linear form to be evaluated when the time is changed |
Definition at line 60 of file vectors.hh.
|
inline |
Constructor. A TimeVector created with this constructor does not reassemble when the time is changed.
| spc | Space |
Definition at line 67 of file vectors.hh.
|
inline |
Copy Constructor. A TimeVector created with this constructor does not reassemble when the time is changed.
| vec | The Vector to be copied |
Definition at line 74 of file vectors.hh.
| 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
| vec | The vector |
| frm | The formula |
| time | Current time |
|
inline |
Definition at line 85 of file vectors.hh.
|
virtualinherited |
Adds a times fnc to this function.
Reimplemented in concepts::SubVector< F >, and concepts::Vector< F >.
|
inlineinherited |
|
inherited |
|
inherited |
Application operator to each component, e.g. std::sin or std::conj
|
inlineinherited |
|
inlineinherited |
|
protectedvirtualinherited |
Returns information in an output stream.
Reimplemented from concepts::Function< F >.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinevirtualinherited |
|
inlinevirtualinherited |
|
inherited |
Inner product (v = this, w = \fnc)
![\[v \cdot w\]](form_330.png)
or
![\[v \cdot \overline{w}\]](form_331.png)
for complex vectors respectivly.
|
virtualinherited |
Scaling operator.
Reimplemented in concepts::SubVector< F >, and concepts::Vector< F >.
|
virtualinherited |
Addition operator.
Reimplemented in concepts::SubVector< F >, and concepts::Vector< F >.
|
virtualinherited |
Addition operator.
Reimplemented in concepts::SubVector< F >, and concepts::Vector< F >.
|
virtualinherited |
Subtraction operator.
Reimplemented in concepts::SubVector< F >, and concepts::Vector< F >.
|
virtualinherited |
Subtraction operator.
Reimplemented in concepts::SubVector< F >, and concepts::Vector< F >.
|
inlinevirtualinherited |
|
inherited |
|
inlineinherited |
|
inline |
Returns the current time_.
Definition at line 88 of file vectors.hh.
| void timestepping::TimeVector::time | ( | Real | time | ) |
Sets the current time_. If tlf_ is set, the entries are updated.
|
inherited |
Writes the vector to a file. This should be endian proof.
| fname | Filename |
|
protectedinherited |
|
protectedinherited |