General (abstract) vector representation in Hermes.
More...
#include <matrix.h>
|
virtual void | alloc (unsigned int ndofs)=0 |
|
virtual void | free ()=0 |
| free the memory
|
|
virtual void | finish () |
| finish the assembly of the vector
|
|
virtual Scalar | get (unsigned int idx)=0 |
|
virtual void | extract (Scalar *v) const =0 |
|
virtual void | zero ()=0 |
| Zero the vector.
|
|
virtual void | change_sign ()=0 |
| Multiply by minus one.
|
|
virtual void | set (unsigned int idx, Scalar y)=0 |
|
virtual void | add (unsigned int idx, Scalar y)=0 |
|
virtual void | add_vector (Vector< Scalar > *vec)=0 |
| Add a vector.
|
|
virtual void | add_vector (Scalar *vec)=0 |
| Add a vector.
|
|
virtual void | add (unsigned int n, unsigned int *idx, Scalar *y)=0 |
|
unsigned int | length () const |
| Get vector length.
|
|
virtual bool | dump (FILE *file, const char *var_name, EMatrixDumpFormat fmt=DF_MATLAB_SPARSE, char *number_format="%lf")=0 |
|
void | set_verbose_output (bool to_set) |
| Sets the attribute verbose_output to the paramater option passed.
|
|
bool | get_verbose_output () const |
| Returns the current value of verbose_output;.
|
|
void | set_verbose_callback (callbackFn callback) |
|
callbackFn | get_verbose_callback () const |
| Returns the current value of verbose_callback;.
|
|
|
unsigned int | size |
| size of vector
|
|
|
| Loggable (bool verbose_output=false, callbackFn verbose_callback=NULL) |
|
void | info (const char *msg,...) const |
|
void | info_if (bool cond, const char *msg,...) const |
|
void | warn (const char *msg,...) const |
|
void | warn_if (bool cond, const char *msg,...) const |
|
void | error (const char *msg,...) const |
|
void | error_if (bool cond, const char *msg,...) const |
|
void | hermes_fwrite (const void *ptr, size_t size, size_t nitems, FILE *stream) const |
|
void | hermes_fread (void *ptr, size_t size, size_t nitems, FILE *stream) const |
|
template<typename Scalar>
class Hermes::Algebra::Vector< Scalar >
General (abstract) vector representation in Hermes.
Definition at line 482 of file matrix.h.
template<typename Scalar>
update element on the specified position
- Parameters
-
[in] | idx | - indices where to update |
[in] | y | - value |
template<typename Scalar>
update subset of the elements
- Parameters
-
[in] | n | - number of positions to update |
[in] | idx | - indices where to update |
[in] | y | - values |
template<typename Scalar>
allocate memory for storing ndofs elements
- Parameters
-
[in] | ndofs | - number of elements of the vector |
template<typename Scalar>
Write to file.
- Parameters
-
[in] | file | file handle |
[in] | var_name | name of variable (will be written to output file) |
[in] | fmt | output file format |
- Returns
- true on succes
template<typename Scalar>
Extract vector values into user-provided array.
- Parameters
-
[out] | v | - array which will contain extracted values |
template<typename Scalar>
Get the value from a position
- Returns
- the value form the specified index
- Parameters
-
[in] | idx | - index which to obtain the value from |
template<typename Scalar>
set the entry on a specified position
- Parameters
-
[in] | idx | - indices where to update |
[in] | y | - value |
The documentation for this class was generated from the following file: