LifeV
|
VectorEpetra - The Epetra Vector format Wrapper. More...
#include <VectorEpetra.hpp>
Private Attributes | |
std::shared_ptr< MapEpetra > | M_epetraMap |
MapEpetraType | M_mapType |
vectorPtr_Type | M_epetraVector |
combineMode_Type | M_combineMode |
Public Types | |
typedef Epetra_FEVector | vector_type |
typedef std::shared_ptr< vector_type > | vectorPtr_Type |
typedef Real | data_type |
typedef Epetra_CombineMode | combineMode_Type |
Constructors & Destructor | |
VectorEpetra (const MapEpetraType &mapType=Unique, const combineMode_Type combineMode=Add) | |
Empty Constructor. More... | |
VectorEpetra (const MapEpetra &map, const MapEpetraType &mapType=Unique, const combineMode_Type combineMode=Add) | |
Constructor - Using Maps. More... | |
VectorEpetra (const std::shared_ptr< MapEpetra > &mapPtr, const MapEpetraType &mapType=Unique, const combineMode_Type combineMode=Add) | |
Constructor - Using Maps. More... | |
VectorEpetra (const VectorEpetra &vector) | |
Copy constructor. More... | |
VectorEpetra (const VectorEpetra &vector, const MapEpetraType &mapType) | |
Copy constructor. More... | |
VectorEpetra (const VectorEpetra &vector, const MapEpetraType &mapType, const combineMode_Type &combineMode) | |
Copy constructor. More... | |
VectorEpetra (const Epetra_MultiVector &vector, const std::shared_ptr< MapEpetra > map, const MapEpetraType &mapType, const combineMode_Type combineMode=Add) | |
Copy constructor. More... | |
VectorEpetra (const VectorEpetra &vector, const Int &reduceToProc) | |
Copy constructor. More... | |
virtual | ~VectorEpetra () |
Destructor. More... | |
Operators | |
data_type & | operator[] (const UInt row) |
Access operators. More... | |
const data_type & | operator[] (const UInt row) const |
Access operators. More... | |
data_type & | operator() (const UInt row) |
Access operators. More... | |
const data_type & | operator() (const UInt row) const |
Access operators. More... | |
VectorEpetra & | operator= (const VectorEpetra &vector) |
Affectation operator. More... | |
VectorEpetra & | operator= (const Epetra_MultiVector &vector) |
Affectation operator. More... | |
VectorEpetra & | operator= (data_type scalar) |
Affectation operator. More... | |
VectorEpetra & | operator+= (const VectorEpetra &vector) |
Addition operator. More... | |
VectorEpetra & | operator-= (const VectorEpetra &vector) |
Subtraction operator. More... | |
VectorEpetra & | operator*= (const VectorEpetra &vector) |
Multiplication operator. More... | |
VectorEpetra & | operator/= (const VectorEpetra &vector) |
Division operator. More... | |
const VectorEpetra | operator+ (const VectorEpetra &vector) const |
Addition operator. More... | |
const VectorEpetra | operator- (const VectorEpetra &vector) const |
Subtraction operator. More... | |
const VectorEpetra | operator* (const VectorEpetra &vector) const |
Multiplication operator. More... | |
const VectorEpetra | operator/ (const VectorEpetra &vector) const |
Division operator. More... | |
VectorEpetra & | operator+= (const data_type &scalar) |
Addition operator. More... | |
VectorEpetra & | operator-= (const data_type &scalar) |
Subtraction operator. More... | |
VectorEpetra & | operator*= (const data_type &scalar) |
Multiplication operator. More... | |
VectorEpetra & | operator/= (const data_type &scalar) |
Division operator. More... | |
const VectorEpetra | operator+ (const data_type &scalar) const |
Operations with scalar values (do not modify the vector of the class) More... | |
const VectorEpetra | operator- (const data_type &scalar) const |
Subtraction operator. More... | |
const VectorEpetra | operator* (const data_type &scalar) const |
Multiplication operator. More... | |
const VectorEpetra | operator/ (const data_type &scalar) const |
Division operator. More... | |
VectorEpetra | operator== (const Real &scalar) const |
Equality operator. More... | |
VectorEpetra | operator!= (const Real &scalar) const |
Inequality operator. More... | |
VectorEpetra | operator< (const Real &scalar) const |
Less than operator. More... | |
VectorEpetra | operator> (const Real &scalar) const |
Greater than operator. More... | |
VectorEpetra | operator<= (const Real &scalar) const |
Less than or equal to operator. More... | |
VectorEpetra | operator>= (const Real &scalar) const |
Greater than or equal to operator. More... | |
VectorEpetra | operator && (const VectorEpetra &vector) const |
Logical AND operator. More... | |
VectorEpetra | operator|| (const VectorEpetra &vector) const |
Logical OR operator. More... | |
VectorEpetra | operator! (void) const |
Logical NOT operator. More... | |
Methods | |
bool | isGlobalIDPresent (const UInt row) const |
Access operators. More... | |
Int | globalAssemble (combineMode_Type mode) |
Assemble the vector. More... | |
Int | globalAssemble () |
Assemble the vector. More... | |
Int | globalToLocalRowId (const UInt row) const |
Return the local Id of a global row. More... | |
void | zero () |
set zero in all the vector entries More... | |
bool | setCoefficient (const UInt row, const data_type &value, UInt offset=0) |
Look for the given global row and set its value. More... | |
Int | setCoefficients (std::vector< Int > &rowsVector, std::vector< Real > &valuesVector) |
Set the row of the vector to the given value. More... | |
Int | sumIntoGlobalValues (const Int GID, const Real value) |
insert a global value More... | |
VectorEpetra & | add (const VectorEpetra &vector, const Int offset=0) |
Add a vector to the current vector with an offset. More... | |
VectorEpetra & | replace (const VectorEpetra &vector, const Int &offset) |
Replace part of the vector with a given vector. More... | |
VectorEpetra & | subset (const VectorEpetra &vector, const UInt offset=0) |
Set the current vector to a subset of the given vector with an offset. More... | |
VectorEpetra & | subset (const VectorEpetra &vector, const MapEpetra &map, const UInt offset1, const UInt offset2) |
Set the current vector to a subset of vector with an offset. More... | |
VectorEpetra & | subset (const Epetra_MultiVector &vector, const MapEpetra &map, const UInt offset1, const UInt offset2, const UInt column=0) |
Set the current vector to a subset of vector with an offset. More... | |
void | meanValue (Real *result) const |
Compute the mean value of the vector components and store it in the given variable. More... | |
Real | norm1 () const |
Compute and return the norm 1. More... | |
void | norm1 (Real *result) const |
Compute and store the norm 1 in the given pointed variable. More... | |
void | norm1 (Real &result) const |
Compute and store the norm 1 in the given variable. More... | |
Real | norm2 () const |
Compute and return the norm 2. More... | |
void | norm2 (Real *result) const |
Compute and store the norm 2 in the given pointed variable. More... | |
void | norm2 (Real &result) const |
Compute and store the norm 2 in the given variable. More... | |
Real | normInf () const |
Compute and return the norm inf. More... | |
void | normInf (Real *result) const |
Compute and store the norm inf in the given pointed variable. More... | |
void | normInf (Real &result) const |
Compute and store the norm inf in the given variable. More... | |
Real | minValue () const |
Compute and return the minimum value in the vector. More... | |
void | minValue (Real *result) const |
Compute and store the minimum value of the vector in the given pointed variable. More... | |
void | minValue (Real &result) const |
Compute and store the minimum value of the vector in the given variable. More... | |
Real | maxValue () const |
Compute and return the maximum value in the vector. More... | |
void | maxValue (Real *result) const |
Compute and store the maximum value of the vector in the given pointed variable. More... | |
void | maxValue (Real &result) const |
Compute and store the maximum value of the vector in the given variable. More... | |
void | abs (void) |
Replace the vector with his absolute value. More... | |
void | abs (VectorEpetra &vector) |
Compute the absolute value of a vector and store it in an other vector. More... | |
void | sqrt () |
Apply the square root to of each element in the vector. More... | |
data_type | dot (const VectorEpetra &vector) const |
Compute the scalar product of two vectors. More... | |
void | dot (const VectorEpetra &vector, data_type &scalarProduct) |
Compute the scalar product of two vectors and store the result in a given variable. More... | |
void | matrixMarket (std::string const &fileName, const bool headers=true) const |
Save the values of the matrix into a file. More... | |
void | spy (std::string const &fileName) const |
Save the values of the matrix into a file. More... | |
void | showMe (std::ostream &output=std::cout) const |
Print the contents of the vector. More... | |
void | apply (const std::function< Real(Real)> &f) |
Set Methods | |
void | setCombineMode (combineMode_Type combineMode) |
Sets the combine mode for the import/export operations. More... | |
void | setDefaultCombineMode () |
Sets the combine mode for the import/export operations to default. More... | |
void | setMap (const MapEpetra &map) |
Sets the map to use for the epetra vector. More... | |
Get Methods | |
const Epetra_Comm & | comm () const |
Return the communicator of the vector. More... | |
vector_type & | epetraVector () |
Return the VectorEpetra in the wrapper. More... | |
const vector_type & | epetraVector () const |
Return the VectorEpetra in the wrapper. More... | |
const vectorPtr_Type & | epetraVectorPtr () const |
Return the shared pointer on the raw VectorEpetra. More... | |
const Epetra_BlockMap & | blockMap () const |
Return the Epetra_BlockMap of the vector. More... | |
MapEpetraType | mapType () const |
Return the map type of the vector (Unique or Repeated) More... | |
const MapEpetra & | map () const |
Return the MapEpetra of the vector. More... | |
const std::shared_ptr< MapEpetra > | mapPtr () const |
Return a shared pointer on the MapEpetra. More... | |
const Epetra_Map & | epetraMap () const |
Return the MapEpetra of the vector. More... | |
void | setMapType (MapEpetraType type) |
Int | size () const |
Return the size of the vector. More... | |
Private Methods | |
VectorEpetra & | Import (const Epetra_FEVector &vector, combineMode_Type combineMode) |
Import the value of a vector. More... | |
VectorEpetra & | Export (const Epetra_FEVector &vector, combineMode_Type combineMode) |
Export the value of a vector. More... | |
VectorEpetra - The Epetra Vector format Wrapper.
The VectorEpetra class provides a general interface for the Epetra_Vector of Trilinos.
Visit http://trilinos.sandia.gov for more informations about Epetra_Vector.
Definition at line 62 of file VectorEpetra.hpp.
typedef Epetra_FEVector vector_type |
Definition at line 69 of file VectorEpetra.hpp.
typedef std::shared_ptr< vector_type > vectorPtr_Type |
Definition at line 70 of file VectorEpetra.hpp.
Definition at line 71 of file VectorEpetra.hpp.
typedef Epetra_CombineMode combineMode_Type |
Definition at line 72 of file VectorEpetra.hpp.
|
explicit |
Empty Constructor.
mapType | Specify whether the map is Unique or Repeated |
Definition at line 53 of file VectorEpetra.cpp.
|
explicit |
Constructor - Using Maps.
This constructor uses maps to build the vector
map | Map to be used to split the vector between the processors |
mapType | Specify wether the map is Unique or Repeated |
Definition at line 61 of file VectorEpetra.cpp.
|
explicit |
Constructor - Using Maps.
This constructor uses maps to build the vector
mapPtr | Pointer to the map which has to be used to split the vector between the processors |
mapType | Specify wether the map is Unique or Repeated |
Definition at line 73 of file VectorEpetra.cpp.
VectorEpetra | ( | const VectorEpetra & | vector | ) |
Copy constructor.
vector | Vector to be used to create the new vector |
Definition at line 85 of file VectorEpetra.cpp.
VectorEpetra | ( | const VectorEpetra & | vector, |
const MapEpetraType & | mapType | ||
) |
Copy constructor.
vector | Vector to be used to create the new vector |
mapType | Specify whether the map is Unique or Repeated |
Definition at line 94 of file VectorEpetra.cpp.
VectorEpetra | ( | const VectorEpetra & | vector, |
const MapEpetraType & | mapType, | ||
const combineMode_Type & | combineMode | ||
) |
Copy constructor.
vector | Vector to be used to create the new vector |
mapType | Specify wether the map is Unique or Repeated |
combineMode | Parameter used during the copy, and not in subsequent calls. |
Definition at line 106 of file VectorEpetra.cpp.
VectorEpetra | ( | const Epetra_MultiVector & | vector, |
const std::shared_ptr< MapEpetra > | map, | ||
const MapEpetraType & | mapType, | ||
const combineMode_Type | combineMode = Add |
||
) |
Copy constructor.
Copies vector to FEvector that comes as Multivector
vector | Vector to be used to create the new vector |
map | Map to be used to split the vector between the processors |
mapType | Specify wether the map is Unique or Repeated |
Definition at line 135 of file VectorEpetra.cpp.
VectorEpetra | ( | const VectorEpetra & | vector, |
const Int & | reduceToProc | ||
) |
Copy constructor.
Copies vector to a vector which resides only on the processor "reduceToProc".
vector | Vector to be used to create the new vector |
map | Map to be used to split the vector between the processors |
mapType | Specify wether the map is Unique or Repeated |
Definition at line 151 of file VectorEpetra.cpp.
|
inlinevirtual |
Destructor.
Definition at line 151 of file VectorEpetra.hpp.
VectorEpetra::data_type & operator[] | ( | const UInt | row | ) |
Access operators.
row | Index of the entry to be accessed |
Definition at line 168 of file VectorEpetra.cpp.
const VectorEpetra::data_type & operator[] | ( | const UInt | row | ) | const |
Access operators.
row | Index of the entry to be accessed |
Definition at line 184 of file VectorEpetra.cpp.
VectorEpetra::data_type & operator() | ( | const UInt | row | ) |
Access operators.
row | Index of the entry to be accessed |
Definition at line 201 of file VectorEpetra.cpp.
const VectorEpetra::data_type & operator() | ( | const UInt | row | ) | const |
Access operators.
row | Index of the entry to be accessed |
Definition at line 208 of file VectorEpetra.cpp.
VectorEpetra & operator= | ( | const VectorEpetra & | vector | ) |
Affectation operator.
Copies the value of the given vector inside the vector. If the map is not the same, try to import the values. Calls Import with Add.
vector | Vector to be affected to the current vector |
Definition at line 216 of file VectorEpetra.cpp.
VectorEpetra & operator= | ( | const Epetra_MultiVector & | vector | ) |
Affectation operator.
Copies the value of the given vector inside the vector. If the map is not the same, try to import the values. Calls Import with Add.
vector | Vector to be affected to the current vector |
Definition at line 275 of file VectorEpetra.cpp.
VectorEpetra & operator= | ( | data_type | scalar | ) |
Affectation operator.
Put the given scalar in each component of the vector
scalar | Scalar to be used to fill the current vector |
Definition at line 293 of file VectorEpetra.cpp.
VectorEpetra & operator+= | ( | const VectorEpetra & | vector | ) |
Addition operator.
Element by Element addition (if the map is not the same, try to import values)
vector | Vector to be added to the current vector |
Definition at line 301 of file VectorEpetra.cpp.
VectorEpetra & operator-= | ( | const VectorEpetra & | vector | ) |
Subtraction operator.
Element by Element subtraction (if the map is not the same, try to import values)
vector | Vector to be subtracted to the current vector |
Definition at line 317 of file VectorEpetra.cpp.
VectorEpetra & operator*= | ( | const VectorEpetra & | vector | ) |
Multiplication operator.
Element by Element multiplication (if the map is not the same, try to import values)
vector | Vector to be perform the multiplication |
Definition at line 333 of file VectorEpetra.cpp.
VectorEpetra & operator/= | ( | const VectorEpetra & | vector | ) |
Division operator.
Element by Element division (if the map is not the same, try to import values)
vector | Vector to be perform the division |
Definition at line 349 of file VectorEpetra.cpp.
const VectorEpetra operator+ | ( | const VectorEpetra & | vector | ) | const |
Addition operator.
Element by Element addition (do not modify the vector of the class)
vector | Vector to be added to the current vector |
Definition at line 365 of file VectorEpetra.cpp.
const VectorEpetra operator- | ( | const VectorEpetra & | vector | ) | const |
Subtraction operator.
Element by Element subtraction (do not modify the vector of the class)
vector | Vector to be subtracted to the current vector |
Definition at line 375 of file VectorEpetra.cpp.
const VectorEpetra operator* | ( | const VectorEpetra & | vector | ) | const |
Multiplication operator.
Element by Element multiplication (do not modify the vector of the class)
vector | Vector to be perform the multiplication |
Definition at line 385 of file VectorEpetra.cpp.
const VectorEpetra operator/ | ( | const VectorEpetra & | vector | ) | const |
Division operator.
Element by Element division (do not modify the vector of the class)
vector | Vector to be perform the division |
Definition at line 395 of file VectorEpetra.cpp.
VectorEpetra & operator+= | ( | const data_type & | scalar | ) |
Addition operator.
Add a scalar value to the components of the current vector. (modify the vector of the class)
scalar | Value to be added |
Definition at line 405 of file VectorEpetra.cpp.
VectorEpetra & operator-= | ( | const data_type & | scalar | ) |
Subtraction operator.
Subtract a scalar value to the components of the current vector. (modify the vector of the class)
scalar | Value to be subtracted |
Definition at line 418 of file VectorEpetra.cpp.
VectorEpetra & operator*= | ( | const data_type & | scalar | ) |
Multiplication operator.
Multiply by a scalar value the components of the current vector. (modify the vector of the class)
scalar | Value for the multiplication |
Definition at line 426 of file VectorEpetra.cpp.
VectorEpetra & operator/= | ( | const data_type & | scalar | ) |
Division operator.
Division by a scalar value the components of the current vector. (modify the vector of the class)
scalar | Value for the division |
Definition at line 434 of file VectorEpetra.cpp.
const VectorEpetra operator+ | ( | const data_type & | scalar | ) | const |
Operations with scalar values (do not modify the vector of the class)
Addition operator
Add a scalar value to the components of the current vector. (do not modify the vector of the class)
scalar | Value to be added |
Definition at line 442 of file VectorEpetra.cpp.
const VectorEpetra operator- | ( | const data_type & | scalar | ) | const |
Subtraction operator.
Subtract a scalar value to the components of the current vector. (do not modify the vector of the class)
scalar | Value to be subtracted |
Definition at line 452 of file VectorEpetra.cpp.
const VectorEpetra operator* | ( | const data_type & | scalar | ) | const |
Multiplication operator.
Multiply by a scalar value the components of the current vector. (do not modify the vector of the class)
scalar | Value for the multiplication |
Definition at line 462 of file VectorEpetra.cpp.
const VectorEpetra operator/ | ( | const data_type & | scalar | ) | const |
Division operator.
Division by a scalar value the components of the current vector. (do not modify the vector of the class)
scalar | Value for the division |
Definition at line 472 of file VectorEpetra.cpp.
VectorEpetra operator== | ( | const Real & | scalar | ) | const |
Equality operator.
Return a vector containing 1 where vector elements are == scalar
scalar | Value for the comparison. |
Definition at line 482 of file VectorEpetra.cpp.
VectorEpetra operator!= | ( | const Real & | scalar | ) | const |
Inequality operator.
Return a vector containing 1 where vector elements are != scalar
scalar | Value for the comparison. |
Definition at line 497 of file VectorEpetra.cpp.
VectorEpetra operator< | ( | const Real & | scalar | ) | const |
Less than operator.
Return a vector containing 1 where vector elements are < scalar
scalar | Value for the comparison. |
Definition at line 512 of file VectorEpetra.cpp.
VectorEpetra operator> | ( | const Real & | scalar | ) | const |
Greater than operator.
Return a vector containing 1 where vector elements are > scalar
scalar | Value for the comparison. |
Definition at line 527 of file VectorEpetra.cpp.
VectorEpetra operator<= | ( | const Real & | scalar | ) | const |
Less than or equal to operator.
Return a vector containing 1 where vector elements are <= scalar
scalar | Value for the comparison. |
Definition at line 542 of file VectorEpetra.cpp.
VectorEpetra operator>= | ( | const Real & | scalar | ) | const |
Greater than or equal to operator.
Return a vector containing 1 where vector elements are >= scalar
scalar | Value for the comparison. |
Definition at line 557 of file VectorEpetra.cpp.
VectorEpetra operator&& | ( | const VectorEpetra & | vector | ) | const |
Logical AND operator.
Return a vector containing one where both elements are != zero
vector | Vector for the logical comparison. |
VectorEpetra operator|| | ( | const VectorEpetra & | vector | ) | const |
Logical OR operator.
Return a vector containing one where one of the elements is != zero
vector | Vector for the logical comparison. |
Definition at line 587 of file VectorEpetra.cpp.
VectorEpetra operator! | ( | void | ) | const |
Logical NOT operator.
Return a vector containing one where the vector is equal to zero
Definition at line 602 of file VectorEpetra.cpp.
bool isGlobalIDPresent | ( | const UInt | row | ) | const |
Access operators.
It returns true if the element is present in the vector
row | The element to test |
Definition at line 620 of file VectorEpetra.cpp.
|
inline |
Assemble the vector.
Gather any shared data into the non-overlapping partitioning defined by the Map that was passed to this vector at construction time. Data imported from other processors is stored on the owning processor with a the given operation
mode | Combining mode used to gather the data |
Definition at line 412 of file VectorEpetra.hpp.
|
inline |
Assemble the vector.
Specialization of the globalAssemble ( combineMode_Type mode ) that uses M_combineMode as default value
Definition at line 423 of file VectorEpetra.hpp.
Return the local Id of a global row.
row | Global row Id
|
Definition at line 625 of file VectorEpetra.cpp.
|
inline |
set zero in all the vector entries
Definition at line 440 of file VectorEpetra.hpp.
Look for the given global row and set its value.
row | Global row Id
|
value | Value to be set at the given row |
offset | Offset used in the map numbering |
Definition at line 638 of file VectorEpetra.cpp.
Set the row of the vector to the given value.
rowsVector | Vector containing the row Ids |
valuesVector | Vector containing the values |
vectors must be of the same size
Definition at line 650 of file VectorEpetra.cpp.
insert a global value
After insertion, you will have to call global assemble
GID | Global Id of the row where the value should be inserted |
value | Value to be inserted |
Definition at line 713 of file VectorEpetra.cpp.
VectorEpetra & add | ( | const VectorEpetra & | vector, |
const Int | offset = 0 |
||
) |
Add a vector to the current vector with an offset.
typically to do: (u,p) += p or (u,p) += u. Note: the nodes to add are taken by the map of vector, hence:
vector | Vector to be added |
offset | Offset to shift the value |
Definition at line 719 of file VectorEpetra.cpp.
VectorEpetra & replace | ( | const VectorEpetra & | vector, |
const Int & | offset | ||
) |
Replace part of the vector with a given vector.
Typical examples are: (u,p) = p or (u,p) = u. Note: the nodes to add are taken by the map of vector, hence:
vector | given vector |
offset | identify the first element to be replaced |
Definition at line 735 of file VectorEpetra.cpp.
VectorEpetra & subset | ( | const VectorEpetra & | vector, |
const UInt | offset = 0 |
||
) |
Set the current vector to a subset of the given vector with an offset.
typically to do: p = (u,p) or u = (u,p). Note: the nodes to add are taken by the map of this, hence:
vector | Vector of value to set the current vector |
offset | Offset to shift the value |
Definition at line 751 of file VectorEpetra.cpp.
VectorEpetra & subset | ( | const VectorEpetra & | vector, |
const MapEpetra & | map, | ||
const UInt | offset1, | ||
const UInt | offset2 | ||
) |
Set the current vector to a subset of vector with an offset.
similar to subset( const VectorEpetra& , const Int ), but with additional parameters:
vector | vector from which to copy data |
map | map from which to select indeces to copy |
offset1 | offset to apply to input vector |
offset2 | offset to apply to this vector |
Definition at line 758 of file VectorEpetra.cpp.
VectorEpetra & subset | ( | const Epetra_MultiVector & | vector, |
const MapEpetra & | map, | ||
const UInt | offset1, | ||
const UInt | offset2, | ||
const UInt | column = 0 |
||
) |
Set the current vector to a subset of vector with an offset.
similar to subset( const VectorEpetra& , const Int ), but with additional parameters:
vector | Epetra_MultiVector, instead of VectorEpetra, from which to copy data |
map | map from which to select indeces to copy |
offset1 | offset to apply to input vector |
offset2 | offset to apply to this vector |
column | column of the multivector from which to extract the data |
Definition at line 771 of file VectorEpetra.cpp.
void meanValue | ( | Real * | result | ) | const |
Compute the mean value of the vector components and store it in the given variable.
result | Variable where the result should be stored |
Definition at line 796 of file VectorEpetra.cpp.
Real norm1 | ( | ) | const |
Compute and return the norm 1.
Definition at line 802 of file VectorEpetra.cpp.
void norm1 | ( | Real * | result | ) | const |
Compute and store the norm 1 in the given pointed variable.
result | Pointer on the variable where the result should be stored |
Definition at line 810 of file VectorEpetra.cpp.
void norm1 | ( | Real & | result | ) | const |
Compute and store the norm 1 in the given variable.
result | Variable where the result should be stored |
Definition at line 816 of file VectorEpetra.cpp.
Real norm2 | ( | ) | const |
Compute and return the norm 2.
Definition at line 830 of file VectorEpetra.cpp.
void norm2 | ( | Real * | result | ) | const |
Compute and store the norm 2 in the given pointed variable.
result | Pointer on the variable where the result should be stored |
Definition at line 838 of file VectorEpetra.cpp.
void norm2 | ( | Real & | result | ) | const |
Compute and store the norm 2 in the given variable.
result | Variable where the result should be stored |
Definition at line 844 of file VectorEpetra.cpp.
Real normInf | ( | ) | const |
Compute and return the norm inf.
Definition at line 857 of file VectorEpetra.cpp.
void normInf | ( | Real * | result | ) | const |
Compute and store the norm inf in the given pointed variable.
result | Pointer on the variable where the result should be stored |
Definition at line 865 of file VectorEpetra.cpp.
void normInf | ( | Real & | result | ) | const |
Compute and store the norm inf in the given variable.
result | Variable where the result should be stored |
Definition at line 871 of file VectorEpetra.cpp.
Real minValue | ( | ) | const |
Compute and return the minimum value in the vector.
Definition at line 877 of file VectorEpetra.cpp.
void minValue | ( | Real * | result | ) | const |
Compute and store the minimum value of the vector in the given pointed variable.
result | Pointer on the variable where the result should be stored |
Definition at line 893 of file VectorEpetra.cpp.
void minValue | ( | Real & | result | ) | const |
Compute and store the minimum value of the vector in the given variable.
result | Variable where the result should be stored |
Definition at line 905 of file VectorEpetra.cpp.
Real maxValue | ( | ) | const |
Compute and return the maximum value in the vector.
Definition at line 885 of file VectorEpetra.cpp.
void maxValue | ( | Real * | result | ) | const |
Compute and store the maximum value of the vector in the given pointed variable.
result | Pointer on the variable where the result should be stored |
Definition at line 899 of file VectorEpetra.cpp.
void maxValue | ( | Real & | result | ) | const |
Compute and store the maximum value of the vector in the given variable.
result | Variable where the result should be stored |
Definition at line 911 of file VectorEpetra.cpp.
void abs | ( | void | ) |
Replace the vector with his absolute value.
Definition at line 917 of file VectorEpetra.cpp.
void abs | ( | VectorEpetra & | vector | ) |
Compute the absolute value of a vector and store it in an other vector.
vector | Output vector to store the absolute value of the vector |
Definition at line 923 of file VectorEpetra.cpp.
void sqrt | ( | ) |
Apply the square root to of each element in the vector.
Definition at line 929 of file VectorEpetra.cpp.
VectorEpetra::data_type dot | ( | const VectorEpetra & | vector | ) | const |
Compute the scalar product of two vectors.
vector | Second vector for the scalar product |
Definition at line 942 of file VectorEpetra.cpp.
void dot | ( | const VectorEpetra & | vector, |
data_type & | scalarProduct | ||
) |
Compute the scalar product of two vectors and store the result in a given variable.
vector | Second vector for the scalar product |
scalarProduct | Variable to store the result |
Definition at line 951 of file VectorEpetra.cpp.
void matrixMarket | ( | std::string const & | fileName, |
const bool | headers = true |
||
) | const |
Save the values of the matrix into a file.
To read the file in Matlab type load filename;
filename | File where to save the vector |
Definition at line 956 of file VectorEpetra.cpp.
void spy | ( | std::string const & | fileName | ) | const |
Save the values of the matrix into a file.
To read the file in Matlab type load filename;
filename | File where to save the vector |
Definition at line 978 of file VectorEpetra.cpp.
void showMe | ( | std::ostream & | output = std::cout | ) | const |
Print the contents of the vector.
output | Stream where the informations must be printed |
Definition at line 1001 of file VectorEpetra.cpp.
Definition at line 1017 of file VectorEpetra.cpp.
void setCombineMode | ( | combineMode_Type | combineMode | ) |
Sets the combine mode for the import/export operations.
Most of the LifeV library is structured to use combine mode equal to Add. In some cases (cf test_filters) it is necessary to discard the data coming from other processors.
combineMode | combien mode to use for this vector from now on |
Definition at line 1032 of file VectorEpetra.cpp.
void setDefaultCombineMode | ( | ) |
Sets the combine mode for the import/export operations to default.
Most of the LifeV library is structured to use combine mode equal to Add.
Definition at line 1038 of file VectorEpetra.cpp.
void setMap | ( | const MapEpetra & | map | ) |
Sets the map to use for the epetra vector.
This method can be used when building the VectorEpetra using empty constructor.
map | the map of the vector |
Definition at line 1044 of file VectorEpetra.cpp.
|
inline |
Return the communicator of the vector.
Definition at line 705 of file VectorEpetra.hpp.
|
inline |
Return the VectorEpetra in the wrapper.
Definition at line 711 of file VectorEpetra.hpp.
|
inline |
Return the VectorEpetra in the wrapper.
Definition at line 717 of file VectorEpetra.hpp.
|
inline |
Return the shared pointer on the raw VectorEpetra.
Definition at line 723 of file VectorEpetra.hpp.
|
inline |
Return the Epetra_BlockMap of the vector.
Definition at line 729 of file VectorEpetra.hpp.
|
inline |
Return the map type of the vector (Unique or Repeated)
Definition at line 735 of file VectorEpetra.hpp.
|
inline |
Return the MapEpetra of the vector.
Definition at line 741 of file VectorEpetra.hpp.
|
inline |
Return a shared pointer on the MapEpetra.
Definition at line 747 of file VectorEpetra.hpp.
|
inline |
Return the MapEpetra of the vector.
Definition at line 753 of file VectorEpetra.hpp.
|
inline |
Definition at line 759 of file VectorEpetra.hpp.
Int size | ( | ) | const |
Return the size of the vector.
Definition at line 1054 of file VectorEpetra.cpp.
|
private |
Import the value of a vector.
Copies the value of a vector u. If the map is not the same, try to import the values. Let you decide wether to add or replace shared nodes: note:
CombineMode Values:
vector | Vector to be imported |
combineMode | Mode to be used to combine the vector |
Definition at line 1067 of file VectorEpetra.cpp.
|
private |
Export the value of a vector.
Copies the value of this to a vector vector. If the map is not the same, try to import the values. Let you decide wether to add or replace shared nodes: note: tested only if the destination source vector vector is not repeated CombineMode Values:
vector | Vector where to store the exportation |
combineMode | Mode to be used to combine the vector |
Definition at line 1089 of file VectorEpetra.cpp.
|
private |
Definition at line 815 of file VectorEpetra.hpp.
|
private |
Definition at line 816 of file VectorEpetra.hpp.
|
private |
Definition at line 817 of file VectorEpetra.hpp.
|
private |
Definition at line 818 of file VectorEpetra.hpp.