Epetra_FEVector Class Reference

Epetra Finite-Element Vector. More...

#include <Epetra_FEVector.h>

Inheritance diagram for Epetra_FEVector:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 Epetra_FEVector (const Epetra_BlockMap &Map, bool ignoreNonLocalEntries=false)
 Constructor that requires a map specifying a non-overlapping data layout.
 Epetra_FEVector (const Epetra_FEVector &source)
 Copy constructor.
virtual ~Epetra_FEVector ()
 Destructor.
int SumIntoGlobalValues (int numIDs, const int *GIDs, const double *values)
 Accumulate values into the vector, adding them to any values that already exist for the specified indices.
int SumIntoGlobalValues (const Epetra_IntSerialDenseVector &GIDs, const Epetra_SerialDenseVector &values)
 Accumulate values into the vector, adding them to any values that already exist for the specified GIDs.
int ReplaceGlobalValues (int numIDs, const int *GIDs, const double *values)
 Copy values into the vector overwriting any values that already exist for the specified indices.
int ReplaceGlobalValues (const Epetra_IntSerialDenseVector &GIDs, const Epetra_SerialDenseVector &values)
 Copy values into the vector, replacing any values that already exist for the specified GIDs.
int SumIntoGlobalValues (int numIDs, const int *GIDs, const int *numValuesPerID, const double *values)
int ReplaceGlobalValues (int numIDs, const int *GIDs, const int *numValuesPerID, const double *values)
int GlobalAssemble (Epetra_CombineMode mode=Add)
 Gather any overlapping/shared data into the non-overlapping partitioning defined by the Map that was passed to this vector at construction time.
void setIgnoreNonLocalEntries (bool flag)
 Set whether or not non-local data values should be ignored.
Epetra_FEVectoroperator= (const Epetra_FEVector &source)

Private Member Functions

int inputValues (int numIDs, const int *GIDs, const double *values, bool accumulate)
int inputValues (int numIDs, const int *GIDs, const int *numValuesPerID, const double *values, bool accumulate)
int inputNonlocalValue (int GID, double value, bool accumulate)
int inputNonlocalValues (int GID, int numValues, const double *values, bool accumulate)
void destroyNonlocalData ()

Private Attributes

int myFirstID_
int myNumIDs_
double * myCoefs_
int * nonlocalIDs_
int * nonlocalElementSize_
int numNonlocalIDs_
int allocatedNonlocalLength_
double ** nonlocalCoefs_
bool ignoreNonLocalEntries_


Detailed Description

Epetra Finite-Element Vector.

This class inherits Epetra_MultiVector and thus provides all Epetra_MultiVector functionality, with one restriction: currently an Epetra_FEVector only has 1 internal vector.

The added functionality provided by Epetra_FEVector is the ability to perform finite-element style vector assembly. It accepts sub-vector contributions, such as those that would come from element-load vectors, etc., and these sub-vectors need not be wholly locally owned. In other words, the user can assemble overlapping data (e.g., corresponding to shared finite-element nodes). When the user is finished assembling their vector data, they then call the method Epetra_FEVector::GlobalAssemble() which gathers the overlapping data (all non-local data that was input on each processor) into the data-distribution specified by the map that the Epetra_FEVector is constructed with.

Note: At the current time (Sept 6, 2002) the methods in this implementation assume that there is only 1 point associated with each map element. This limitation will be removed in the near future.

Definition at line 61 of file Epetra_FEVector.h.


Constructor & Destructor Documentation

Epetra_FEVector::Epetra_FEVector ( const Epetra_BlockMap Map,
bool  ignoreNonLocalEntries = false 
)

Constructor that requires a map specifying a non-overlapping data layout.

The methods SumIntoGlobalValues() and ReplaceGlobalValues() will accept any global IDs, and GlobalAssemble() will move any non-local data onto the appropriate owning processors.

Definition at line 56 of file Epetra_FEVector.cpp.

Epetra_FEVector::Epetra_FEVector ( const Epetra_FEVector source  ) 

Copy constructor.

Definition at line 79 of file Epetra_FEVector.cpp.

Epetra_FEVector::~Epetra_FEVector (  )  [virtual]

Destructor.

Definition at line 95 of file Epetra_FEVector.cpp.


Member Function Documentation

int Epetra_FEVector::SumIntoGlobalValues ( int  numIDs,
const int *  GIDs,
const double *  values 
)

Accumulate values into the vector, adding them to any values that already exist for the specified indices.

Definition at line 101 of file Epetra_FEVector.cpp.

int Epetra_FEVector::SumIntoGlobalValues ( const Epetra_IntSerialDenseVector GIDs,
const Epetra_SerialDenseVector values 
)

Accumulate values into the vector, adding them to any values that already exist for the specified GIDs.

Parameters:
GIDs List of global ids. Must be the same length as the accompanying list of values.
values List of coefficient values. Must be the same length as the accompanying list of GIDs.

Definition at line 108 of file Epetra_FEVector.cpp.

int Epetra_FEVector::ReplaceGlobalValues ( int  numIDs,
const int *  GIDs,
const double *  values 
)

Copy values into the vector overwriting any values that already exist for the specified indices.

Definition at line 127 of file Epetra_FEVector.cpp.

int Epetra_FEVector::ReplaceGlobalValues ( const Epetra_IntSerialDenseVector GIDs,
const Epetra_SerialDenseVector values 
)

Copy values into the vector, replacing any values that already exist for the specified GIDs.

Parameters:
GIDs List of global ids. Must be the same length as the accompanying list of values.
values List of coefficient values. Must be the same length as the accompanying list of GIDs.

Definition at line 134 of file Epetra_FEVector.cpp.

int Epetra_FEVector::SumIntoGlobalValues ( int  numIDs,
const int *  GIDs,
const int *  numValuesPerID,
const double *  values 
)

Definition at line 119 of file Epetra_FEVector.cpp.

int Epetra_FEVector::ReplaceGlobalValues ( int  numIDs,
const int *  GIDs,
const int *  numValuesPerID,
const double *  values 
)

Definition at line 145 of file Epetra_FEVector.cpp.

int Epetra_FEVector::GlobalAssemble ( Epetra_CombineMode  mode = Add  ) 

Gather any overlapping/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 "sumInto" or accumulate operation. This is a collective method -- every processor must enter it before any will complete it.

Definition at line 313 of file Epetra_FEVector.cpp.

void Epetra_FEVector::setIgnoreNonLocalEntries ( bool  flag  )  [inline]

Set whether or not non-local data values should be ignored.

Definition at line 130 of file Epetra_FEVector.h.

Epetra_FEVector & Epetra_FEVector::operator= ( const Epetra_FEVector source  ) 

Definition at line 354 of file Epetra_FEVector.cpp.

int Epetra_FEVector::inputValues ( int  numIDs,
const int *  GIDs,
const double *  values,
bool  accumulate 
) [private]

Definition at line 153 of file Epetra_FEVector.cpp.

int Epetra_FEVector::inputValues ( int  numIDs,
const int *  GIDs,
const int *  numValuesPerID,
const double *  values,
bool  accumulate 
) [private]

Definition at line 181 of file Epetra_FEVector.cpp.

int Epetra_FEVector::inputNonlocalValue ( int  GID,
double  value,
bool  accumulate 
) [private]

Definition at line 215 of file Epetra_FEVector.cpp.

int Epetra_FEVector::inputNonlocalValues ( int  GID,
int  numValues,
const double *  values,
bool  accumulate 
) [private]

Definition at line 257 of file Epetra_FEVector.cpp.

void Epetra_FEVector::destroyNonlocalData (  )  [private]

Definition at line 381 of file Epetra_FEVector.cpp.


Member Data Documentation

Definition at line 153 of file Epetra_FEVector.h.

Definition at line 154 of file Epetra_FEVector.h.

double* Epetra_FEVector::myCoefs_ [private]

Definition at line 155 of file Epetra_FEVector.h.

Definition at line 157 of file Epetra_FEVector.h.

Definition at line 158 of file Epetra_FEVector.h.

Definition at line 159 of file Epetra_FEVector.h.

Definition at line 160 of file Epetra_FEVector.h.

double** Epetra_FEVector::nonlocalCoefs_ [private]

Definition at line 161 of file Epetra_FEVector.h.

Definition at line 163 of file Epetra_FEVector.h.


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

Generated on Wed Jul 22 13:22:00 2009 for Epetra Package Browser (Single Doxygen Collection) by doxygen 1.5.8