FEI  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | List of all members
fei::Vector_core Class Referenceabstract

#include <fei_Vector_core.hpp>

Inheritance diagram for fei::Vector_core:
Inheritance graph
[legend]

Public Member Functions

 Vector_core (fei::SharedPtr< fei::VectorSpace > vecSpace, int numLocalEqns)
 
virtual ~Vector_core ()
 
int copyOut (int numValues, const int *indices, double *values, int vectorIndex=0) const
 
virtual int sumIntoFEVector (int blockID, int connOffset, int numNodes, const int *nodeNumbers, const int *numIndicesPerNode, const int *dof_ids, const double *values)=0
 
virtual int copyOut_FE (int nodeNumber, int dofOffset, double &value)=0
 
int giveToVector (int numValues, const int *indices, const double *values, bool sumInto=true, int vectorIndex=0)
 
virtual int scatterToOverlap ()
 
void setOverlap (int numRemoteEqns=0, const int *remoteEqns=NULL)
 

Protected Member Functions

int assembleFieldData (int fieldID, int idType, int numIDs, const int *IDs, const double *data, bool sumInto=true, int vectorIndex=0)
 
virtual int gatherFromOverlap (bool accumulate=true)
 
virtual int copyOutFieldData (int fieldID, int idType, int numIDs, const int *IDs, double *data, int vectorIndex=0)
 
virtual int giveToUnderlyingVector (int numValues, const int *indices, const double *values, bool sumInto=true, int vectorIndex=0)=0
 
virtual int copyOutOfUnderlyingVector (int numValues, const int *indices, double *values, int vectorIndex=0) const =0
 
virtual int writeToFile (const char *filename, bool matrixMarketFormat=true)
 
virtual int writeToStream (FEI_OSTREAM &ostrm, bool matrixMarketFormat=true)
 
fei::SharedPtr< fei::VectorSpaceget_vector_space () const
 
void set_vector_space (fei::SharedPtr< fei::VectorSpace > vspace)
 
int firstLocalOffset () const
 
int lastLocalOffset () const
 
std::vector< int > & work_indices ()
 
std::vector< int > & work_indices2 ()
 
bool haveFEVector ()
 
void setFEVector (bool flag)
 
std::vector< CSVec * > & remotelyOwned ()
 
- Protected Member Functions inherited from fei::Logger
 Logger ()
 
virtual ~Logger ()
 
void setOutputLevel (OutputLevel olevel)
 

Additional Inherited Members

- Protected Attributes inherited from fei::Logger
OutputLevel output_level_
 
FEI_OSTREAM * output_stream_
 

Detailed Description

Class to provide infrastructure for fei::Vector implementations.

Definition at line 23 of file fei_Vector_core.hpp.

Constructor & Destructor Documentation

fei::Vector_core::Vector_core ( fei::SharedPtr< fei::VectorSpace vecSpace,
int  numLocalEqns 
)

constructor

Definition at line 25 of file fei_Vector_core.cpp.

fei::Vector_core::~Vector_core ( )
virtual

destructor

Definition at line 61 of file fei_Vector_core.cpp.

Member Function Documentation

int fei::Vector_core::copyOut ( int  numValues,
const int *  indices,
double *  values,
int  vectorIndex = 0 
) const

Retrieve a copy of values from the vector for the specified indices. Note that if the specified indices are not local in the underlying non-overlapping data decomposition, these values are not guaranteed to be correct until after the scatterToOverlap() method has been called.

Definition at line 217 of file fei_Vector_core.cpp.

virtual int fei::Vector_core::sumIntoFEVector ( int  blockID,
int  connOffset,
int  numNodes,
const int *  nodeNumbers,
const int *  numIndicesPerNode,
const int *  dof_ids,
const double *  values 
)
pure virtual

Sum in data for FiniteElementData-specific structure. Power users only.

virtual int fei::Vector_core::copyOut_FE ( int  nodeNumber,
int  dofOffset,
double &  value 
)
pure virtual

Another FiniteElementData-specific method. Power users only.

Implemented in fei::Vector_Impl< T >.

int fei::Vector_core::giveToVector ( int  numValues,
const int *  indices,
const double *  values,
bool  sumInto = true,
int  vectorIndex = 0 
)

Give specified data to underlying vector object.

Definition at line 254 of file fei_Vector_core.cpp.

int fei::Vector_core::scatterToOverlap ( )
virtual

Scatter locally-owned vector data to remote sharing procs.

Reimplemented in fei::Vector_Impl< T >.

Definition at line 107 of file fei_Vector_core.cpp.

void fei::Vector_core::setOverlap ( int  numRemoteEqns = 0,
const int *  remoteEqns = NULL 
)

define the extent of the overlapping indices. If the optional arguments are not specified, remote eqns will be obtained from the internal fei::VectorSpace attribute.

Definition at line 68 of file fei_Vector_core.cpp.

int fei::Vector_core::assembleFieldData ( int  fieldID,
int  idType,
int  numIDs,
const int *  IDs,
const double *  data,
bool  sumInto = true,
int  vectorIndex = 0 
)
protected

Assemble data specified by fieldID, idType, etc.

Definition at line 308 of file fei_Vector_core.cpp.

int fei::Vector_core::gatherFromOverlap ( bool  accumulate = true)
protectedvirtual

Gather shared data from remote procs for eqns that are locally-owned.

Reimplemented in fei::Vector_Impl< T >.

Definition at line 445 of file fei_Vector_core.cpp.

int fei::Vector_core::copyOutFieldData ( int  fieldID,
int  idType,
int  numIDs,
const int *  IDs,
double *  data,
int  vectorIndex = 0 
)
protectedvirtual

Copy out data specified by fieldID, idType, etc.

Reimplemented in fei::Vector_Impl< T >.

Definition at line 507 of file fei_Vector_core.cpp.

virtual int fei::Vector_core::giveToUnderlyingVector ( int  numValues,
const int *  indices,
const double *  values,
bool  sumInto = true,
int  vectorIndex = 0 
)
protectedpure virtual

Review this function. Is it redundant with other functions?

virtual int fei::Vector_core::copyOutOfUnderlyingVector ( int  numValues,
const int *  indices,
double *  values,
int  vectorIndex = 0 
) const
protectedpure virtual

Review this function. Is it redundant with other functions?

int fei::Vector_core::writeToFile ( const char *  filename,
bool  matrixMarketFormat = true 
)
protectedvirtual

Establish basic information like sizes etc. Write data to specified filename.

Reimplemented in fei::Vector_Impl< T >.

Definition at line 560 of file fei_Vector_core.cpp.

int fei::Vector_core::writeToStream ( FEI_OSTREAM &  ostrm,
bool  matrixMarketFormat = true 
)
protectedvirtual

Write data to specified ostream.

Reimplemented in fei::Vector_Impl< T >.

Definition at line 607 of file fei_Vector_core.cpp.

fei::SharedPtr<fei::VectorSpace> fei::Vector_core::get_vector_space ( ) const
inlineprotected

Return vector-space that describes that size/layout of this vector.

Definition at line 121 of file fei_Vector_core.hpp.

void fei::Vector_core::set_vector_space ( fei::SharedPtr< fei::VectorSpace vspace)
inlineprotected

Set vector-space that describes the size/layout of this vector.

Definition at line 127 of file fei_Vector_core.hpp.

int fei::Vector_core::firstLocalOffset ( ) const
inlineprotected

Query for first locally-owned vector position.

Definition at line 133 of file fei_Vector_core.hpp.

int fei::Vector_core::lastLocalOffset ( ) const
inlineprotected

Query for last locally-owned vector position.

Definition at line 136 of file fei_Vector_core.hpp.

std::vector<int>& fei::Vector_core::work_indices ( )
inlineprotected

work_indices

Definition at line 139 of file fei_Vector_core.hpp.

std::vector<int>& fei::Vector_core::work_indices2 ( )
inlineprotected

work_indices2

Definition at line 141 of file fei_Vector_core.hpp.

bool fei::Vector_core::haveFEVector ( )
inlineprotected

haveFEVector

Definition at line 144 of file fei_Vector_core.hpp.

void fei::Vector_core::setFEVector ( bool  flag)
inlineprotected

setFEVector

Definition at line 146 of file fei_Vector_core.hpp.

std::vector<CSVec*>& fei::Vector_core::remotelyOwned ( )
inlineprotected

remotelyOwned

Definition at line 149 of file fei_Vector_core.hpp.


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