xc
Public Member Functions | Protected Member Functions | List of all members
XC::MovableVector Class Reference

Vector that can move between processes. More...

#include <MovableVector.h>

Inheritance diagram for XC::MovableVector:
Inheritance graph
[legend]
Collaboration diagram for XC::MovableVector:
Collaboration graph
[legend]

Public Member Functions

 MovableVector (const size_t &sz=0)
 Constructor.
 
 MovableVector (const Vector &)
 Constructor.
 
void setVector (const Vector &)
 Asigna el vector.
 
virtual int sendSelf (Communicator &)
 Envia el vector through the communicator argument.
 
virtual int recvSelf (const Communicator &)
 Receive the vector through the communicator argument.
 
- Public Member Functions inherited from XC::Vector
 Vector (void)
 Default constructor, sets size= 0;.
 
 Vector (const int &, const double &value=0.0)
 Constructor used to allocate a vector of size szt. More...
 
 Vector (const std::vector< double > &v)
 Copy from a std::vector.
 
 Vector (const Vector2d &v)
 Copy from Vector2d.
 
 Vector (const Vector3d &v)
 Copy from Vector2d.
 
 Vector (const double &, const double &, const double &)
 Create from x,y,z coordinates.
 
 Vector (const Vector &)
 Copy constructor.
 
 Vector (double *data, int size)
 Constructor. More...
 
 Vector (const boost::python::list &)
 Constructor (Python interface).
 
virtual ~Vector (void)
 Destructor, free memory.
 
iterator begin (void)
 Iterator that points to the first vector component.
 
iterator end (void)
 Iterator that points one past the last vector component.
 
int setData (double *newData, int size)
 Help to construct a Vector of order size whose data will be stored in the array pointed to by data. More...
 
const double * getDataPtr (void) const
 Return a pointer to the float date.
 
double * getDataPtr (void)
 Return a pointer to the float date.
 
bool isEmpty (void) const
 Return true if the vector has no data.
 
int Assemble (const Vector &V, const ID &l, double fact=1.0)
 Method to assemble into this vector the Vector V using the ID l. More...
 
double Norm2 (void) const
 Returns the square of the vector modulus. More...
 
double Norm (void) const
 Return the norm of vector. More...
 
double pNorm (int p) const
 
double NormInf (void) const
 Returns the maximum of the absolute values of the components (infinite norm). More...
 
int Size (void) const
 Returns the size of the Vector.
 
int getNumBytes (void) const
 Number of bytes occupied by the vector.
 
int resize (int newSize)
 Changes vector size.
 
void Zero (void)
 Zeros out the Vector, i.e. More...
 
bool isnan (void) const
 Return true if one of the component is not a number.
 
int reset (const int &newSize)
 Resize the vector and set all components equal to 0.
 
int Normalize (void)
 Normalizes the vector using the euclidean norm.
 
int NormalizeInf (void)
 Normalize the vector using the infinity norm.
 
Vector Normalized (void) const
 Returns the normalized vector (euclidean norm).
 
Vector NormalizedInf (void) const
 Returns the normalized vector (infinity norm).
 
int addVector (double factThis, const Vector &other, double factOther)
 To add a factor fact times the Vector other to the current Vector. More...
 
int addMatrixVector (double factThis, const Matrix &m, const Vector &v, double factOther)
 To add a factor fact times the Vector formed by the product of the matrix m and the Vector v to the current Vector. More...
 
int addMatrixTransposeVector (double factThis, const Matrix &m, const Vector &v, double factOther)
 
virtual double & at (const size_t &f)
 Returns the element at the row being passed as parameter. More...
 
virtual const double & at (const size_t &f) const
 Returns the element at the row being passed as parameter. More...
 
virtual bool CheckIndice0 (const size_t &i) const
 Check the index being passed as parameter. More...
 
const double & operator() (int x) const
 Returns the data at location x in the Vector. More...
 
double & operator() (int x)
 Used to set the data at location(x) in the Vector. More...
 
const double & operator[] (int x) const
 If debug flag is on, safely get the data at location x in the Vector. More...
 
double & operator[] (int x)
 If debug flag is on, safely set/get the data at location x in the Vector. More...
 
Vector operator() (const ID &rows) const
 Method to return a vector whose components are the components of the current vector located in positions given by the ID rows. More...
 
Vectoroperator= (const Vector &V)
 the assignment operator, This is assigned to be a copy of V. More...
 
template<class TNSR >
Vectoroperator= (const TNSR &T)
 
Vectoroperator+= (double fact)
 The += operator adds fact to each element of the vector, data[i]= data[i]+fact. More...
 
Vectoroperator-= (double fact)
 The -= operator subtracts fact from each element of the vector, data[i]= data[i]-fact. More...
 
Vectoroperator*= (double fact)
 The *= operator multiplies each element by the factor.
 
Vectoroperator/= (double fact)
 The /= operator divides each element of the vector by fact, theData[i]= theData[i]/fact. More...
 
Vector operator- (void) const
 Unary minus operator.
 
Vector operator+ (double fact) const
 The + operator returns a Vector of the same size as current, whose components are: return(i)= theData[i]+fact. More...
 
Vector operator- (double fact) const
 The + operator returns a Vector of the same size as current, whose components are: return(i)= theData[i]-fact. More...
 
Vector operator* (double fact) const
 The + operator returns a vector of the same size as current, whose components are: return(i)= theData[i]*fact. More...
 
Vector operator/ (double fact) const
 The + operator returns a vector of the same size as current, whose components are return(i)= theData[i]/fact. More...
 
Vectoroperator+= (const Vector &V)
 The += operator adds V's data to data, data[i]+=V(i). More...
 
Vectoroperator-= (const Vector &V)
 The -= operator subtracts V's data from data, data[i]-=V(i). More...
 
Vector operator+ (const Vector &V) const
 The + operator checks the two vectors are of the same size if _G3DEBUG is defined. More...
 
Vector operator- (const Vector &V) const
 The - operator checks the two vectors are of the same size if _G3DEBUG is defined and then returns a Vector whose components are the vector difference of current and V's data. More...
 
double operator^ (const Vector &V) const
 Method to perform (Vector)transposed * vector. More...
 
Vector operator/ (const Matrix &M) const
 Method to return inv(M)*this. More...
 
double dot (const Vector &) const
 
int Assemble (const Vector &V, int init_row, double fact=1.0)
 
int Extract (const Vector &V, int init_row, double fact=1.0)
 
Vector getComponents (const ID &) const
 Returns a vector with the specified subset of components.
 
void putComponents (const Vector &, const ID &)
 Assigns the specified values to the specified set of vector's components.
 
void addComponents (const Vector &, const ID &)
 Sums the specified values to the specified set of vector's components.
 
void write (std::ofstream &)
 Write vector on a binary file.
 
void read (std::ifstream &)
 Read vector from a binary file.
 
std::string toString (void) const
 
boost::python::list getPyList (void) const
 Return the vector values in a Python list.
 
- Public Member Functions inherited from CommandEntity
 CommandEntity (CommandEntity *owr=nullptr)
 Default constructor.
 
CommandEntityOwner (void)
 Return a pointer to the object owner.
 
const CommandEntityOwner (void) const
 Return un puntero al objeto propietario de ESTE.
 
const StandardOutputWrappergetStandardOutputWrapper (void) const
 Return the regular output stream wrapper.
 
StandardOutputWrappergetStandardOutputWrapper (void)
 Return the regular output stream wrapper.
 
const std::string & getLogFileName (void) const
 Returns log file name.
 
void setLogFileName (const std::string &)
 Sets log file name.
 
const std::string & getErrFileName (void) const
 Returns err file name.
 
void setErrFileName (const std::string &)
 Sets error file name.
 
const std::string & getOutputFileName (void) const
 Returns regular output file name.
 
void setOutputFileName (const std::string &)
 Sets regular output file name.
 
boost::python::object evalPy (boost::python::object dict, const std::string &)
 Return the Python object that results from evaluating the argument.
 
boost::python::object execPy (boost::python::object dict, const std::string &)
 Return the Python objects that results from executing the code in the string argument.
 
boost::python::object execFilePy (boost::python::object dict, const std::string &)
 Return the Python object that results from executing the code in the file.
 
- Public Member Functions inherited from EntityWithProperties
 EntityWithProperties (EntityWithProperties *owr=nullptr)
 Default constructor.
 
virtual bool operator== (const EntityWithProperties &) const
 Comparison operator.
 
void clearPyProps (void)
 Clear python properties map.
 
bool hasPyProp (const std::string &)
 Returns true if property exists.
 
boost::python::object getPyProp (const std::string &str)
 Return the Python object with the name being passed as parameter.
 
void setPyProp (std::string str, boost::python::object val)
 Sets/appends a value tho the Python object's dictionary.
 
void copyPropsFrom (const EntityWithProperties &)
 Copy the properties from the argument.
 
boost::python::list getPropNames (void) const
 Return the names of the object properties weightings.
 
const PythonDict & getPropertiesDict (void) const
 Return a std::map container with the properties of the object.
 
boost::python::dict getPyDict (void) const
 Return a Python dictionary containing the object members values.
 
void setPyDict (const boost::python::dict &)
 Set the values of the object members from a Python dictionary.
 
- Public Member Functions inherited from EntityWithOwner
 EntityWithOwner (EntityWithOwner *owr=nullptr)
 Default constructor.
 
 EntityWithOwner (const EntityWithOwner &)
 Copy constructor.
 
EntityWithOwneroperator= (const EntityWithOwner &)
 Assignment operator.
 
virtual bool operator== (const EntityWithOwner &) const
 Comparison operator.
 
virtual ~EntityWithOwner (void)
 Virtual destructor.
 
virtual std::string getClassName (void) const
 Returns demangled class name.
 
void set_owner (EntityWithOwner *owr)
 Assigns the owner of the object.
 
EntityWithOwnerOwner (void)
 
const EntityWithOwnerOwner (void) const
 
- Public Member Functions inherited from XC::MovableObject
 MovableObject (int classTag, int dbTag)
 Constructor. More...
 
 MovableObject (int classTag)
 Constructor. More...
 
 MovableObject (const MovableObject &)
 Copy constructor. Doesn't copy the dbTag.
 
MovableObjectoperator= (const MovableObject &)
 Assignment operator. Doesn't copy the dbTag.
 
int getClassTag (void) const
 Return the class identifier.
 
int getDbTag (void) const
 Return the object identifier in the database.
 
int getDbTag (Communicator &)
 Return the object identifier in the database.
 
void setDbTag (int dbTag)
 Sets the object identifier in the database.
 
void setDbTag (Communicator &)
 Sets the object identifier in the database if not already set. More...
 
virtual int setParameter (const std::vector< std::string > &argv, Parameter &param)
 Sets the value param to the parameter argv.
 
virtual int updateParameter (int parameterID, Information &info)
 Updates the parameter identified by parameterID with info.
 
virtual int activateParameter (int parameterID)
 Activates the parameter identified by parameterID.
 
virtual int setVariable (const std::string &variable, Information &)
 Set the value of the variable idenfified by var.
 
virtual int getVariable (const std::string &variable, Information &)
 Return the value of the variable idenfified by var.
 
- Public Member Functions inherited from XC::DistributedBase
 DistributedBase (void)
 Constructor.
 
virtual ~DistributedBase (void)
 Destructor.
 
const int & getDbTagDataPos (const int &i) const
 Returns the data at the i-th position.
 
void setDbTagDataPos (const int &i, const int &v)
 Sets the data at the i-th position.
 
void inicComm (const int &dataSize) const
 Initializes communication.
 

Protected Member Functions

DbTagDatagetDbTagData (void) const
 Returns a vector to store the dbTags of the class members. More...
 
- Protected Member Functions inherited from CommandEntity
template<class T >
void string_to (T &, const std::string &) const
 

Additional Inherited Members

- Public Types inherited from XC::Vector
typedef double * iterator
 
- Public Types inherited from EntityWithProperties
typedef std::map< std::string, boost::python::object > PythonDict
 
- Static Public Member Functions inherited from CommandEntity
static void resetStandardOutput (void)
 Reset the standard output streams to its defaults buffers.
 
- Static Public Member Functions inherited from EntityWithOwner
static int getVerbosityLevel (void)
 Get the value of the verbosity level.
 
static void setVerbosityLevel (const int &)
 Set the value of the verbosity level.
 
- Static Protected Member Functions inherited from CommandEntity
static CommandEntityentcmd_cast (boost::any &data)
 
- Static Protected Attributes inherited from EntityWithOwner
static int verbosity = 1
 Object that owns THIS ONE. More...
 

Detailed Description

Vector that can move between processes.

Member Function Documentation

◆ getDbTagData()

XC::DbTagData & XC::MovableVector::getDbTagData ( void  ) const
protectedvirtual

Returns a vector to store the dbTags of the class members.

Reimplemented from XC::DistributedBase.


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