FEI Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
snl_fei::LinearSystem_General Class Reference

#include <snl_fei_LinearSystem_General.hpp>

Inheritance diagram for snl_fei::LinearSystem_General:
Inheritance graph
[legend]

Public Member Functions

 LinearSystem_General (fei::SharedPtr< fei::MatrixGraph > &matrixGraph)
 
virtual ~LinearSystem_General ()
 
int loadEssentialBCs (int numIDs, const int *IDs, int idType, int fieldID, int offsetIntoField, const double *prescribedValues)
 
int loadEssentialBCs (int numIDs, const int *IDs, int idType, int fieldID, const int *offsetIntoField, const double *prescribedValues)
 
int loadLagrangeConstraint (int constraintID, const double *weights, double rhsValue)
 
int loadPenaltyConstraint (int constraintID, const double *weights, double penaltyValue, double rhsValue)
 
int loadComplete (bool applyBCs=true, bool globalAssemble=true)
 
int parameters (int numParams, const char *const *paramStrings)
 
int parameters (const fei::ParameterSet &params)
 
int setBCValuesOnVector (fei::Vector *vector)
 
bool eqnIsEssentialBC (int globalEqnIndex) const
 
void getEssentialBCs (std::vector< int > &bcEqns, std::vector< double > &bcVals) const
 
void getConstrainedEqns (std::vector< int > &crEqns) const
 
- Public Member Functions inherited from fei::LinearSystem
 LinearSystem (fei::SharedPtr< fei::MatrixGraph > &matrixGraph)
 
virtual ~LinearSystem ()
 
virtual void setMatrix (fei::SharedPtr< fei::Matrix > &matrix)
 
virtual fei::SharedPtr
< fei::Matrix
getMatrix ()
 
virtual fei::SharedPtr< const
fei::Matrix
getMatrix () const
 
virtual void setRHS (fei::SharedPtr< fei::Vector > &rhs)
 
virtual fei::SharedPtr
< fei::Vector
getRHS ()
 
virtual fei::SharedPtr< const
fei::Vector
getRHS () const
 
virtual void setSolutionVector (fei::SharedPtr< fei::Vector > &soln)
 
virtual fei::SharedPtr
< fei::Vector
getSolutionVector ()
 
virtual fei::SharedPtr< const
fei::Vector
getSolutionVector () const
 
virtual int putAttribute (const char *name, void *attribute)
 
virtual int getAttribute (const char *name, void *&attribute)
 

Private Member Functions

void setName (const char *name)
 
int fill_EssBCValues ()
 
int implementBCs (bool applyBCs)
 
int enforceEssentialBC_LinSysCore ()
 
void enforceEssentialBC_step_1 (fei::CSVec &essBCs)
 
void enforceEssentialBC_step_2 (fei::CSVec &essBCs)
 
int getMatrixRow (fei::Matrix *matrix, int row, std::vector< double > &coefs, std::vector< int > &indices)
 
- Private Member Functions inherited from fei::Logger
 Logger ()
 
virtual ~Logger ()
 
void setOutputLevel (OutputLevel olevel)
 
void addLogID (int ID)
 
void addLogEqn (int eqn)
 
bool isLogID (int ID)
 
bool isLogEqn (int eqn)
 
std::set< int > & getLogIDs ()
 
std::set< int > & getLogEqns ()
 

Private Attributes

MPI_Comm comm_
 
fei::CSVecessBCvalues_
 
fei::CSVecallEssBCs_
 
bool resolveConflictRequested_
 
bool bcs_trump_slaves_
 
bool explicitBCenforcement_
 
bool BCenforcement_no_column_mod_
 
int localProc_
 
int numProcs_
 
int firstLocalOffset_
 
int lastLocalOffset_
 
std::string name_
 
std::map< std::string, unsigned > named_loadcomplete_counter_
 
std::vector< int > iwork_
 
std::vector< double > dwork_
 
std::string dbgprefix_
 
- Private Attributes inherited from fei::Logger
OutputLevel output_level_
 
FEI_OSTREAMoutput_stream_
 
std::set< int > logIDs_
 
std::set< int > logEqns_
 

Additional Inherited Members

- Protected Attributes inherited from fei::LinearSystem
fei::SharedPtr< fei::Matrixmatrix_
 
fei::SharedPtr< fei::Vectorsoln_
 
fei::SharedPtr< fei::Vectorrhs_
 
fei::SharedPtr< fei::MatrixGraphmatrixGraph_
 
fei::DirichletBCManagerdbcManager_
 
std::vector< char * > attributeNames_
 
std::vector< void * > attributes_
 

Detailed Description

implementation of fei::LinearSystem interface

Definition at line 27 of file snl_fei_LinearSystem_General.hpp.

Constructor & Destructor Documentation

snl_fei::LinearSystem_General::LinearSystem_General ( fei::SharedPtr< fei::MatrixGraph > &  matrixGraph)
snl_fei::LinearSystem_General::~LinearSystem_General ( )
virtual

denstructor

Definition at line 67 of file snl_fei_LinearSystem_General.cpp.

Member Function Documentation

int snl_fei::LinearSystem_General::loadEssentialBCs ( int  numIDs,
const int *  IDs,
int  idType,
int  fieldID,
int  offsetIntoField,
const double *  prescribedValues 
)
virtual

Essential (dirichlet) boundary-condition function.

Reimplemented from fei::LinearSystem.

Definition at line 162 of file snl_fei_LinearSystem_General.cpp.

References fei::BRIEF_LOGS, FEI_ENDL, FEI_OSTREAM, and fei::LinearSystem::loadEssentialBCs().

int snl_fei::LinearSystem_General::loadEssentialBCs ( int  numIDs,
const int *  IDs,
int  idType,
int  fieldID,
const int *  offsetIntoField,
const double *  prescribedValues 
)
virtual

Essential (dirichlet) boundary-condition function.

Reimplemented from fei::LinearSystem.

Definition at line 180 of file snl_fei_LinearSystem_General.cpp.

References fei::BRIEF_LOGS, FEI_ENDL, FEI_OSTREAM, and fei::LinearSystem::loadEssentialBCs().

int snl_fei::LinearSystem_General::loadLagrangeConstraint ( int  constraintID,
const double *  weights,
double  rhsValue 
)
virtual
int snl_fei::LinearSystem_General::loadPenaltyConstraint ( int  constraintID,
const double *  weights,
double  penaltyValue,
double  rhsValue 
)
virtual

load penalty constraint coefficients

Implements fei::LinearSystem.

Definition at line 898 of file snl_fei_LinearSystem_General.cpp.

References fei::BRIEF_LOGS, CHK_ERR, FEI_ENDL, and FEI_OSTREAM.

int snl_fei::LinearSystem_General::loadComplete ( bool  applyBCs = true,
bool  globalAssemble = true 
)
virtual
  Signal that all boundary-conditions and constraint coefficients have

been loaded, and they may now be applied to the linear system.

Implements fei::LinearSystem.

Definition at line 200 of file snl_fei_LinearSystem_General.cpp.

References fei::ALL, fei::BRIEF_LOGS, CHK_ERR, FEI_COUT, FEI_ENDL, FEI_OSTREAM, FEI_OSTRINGSTREAM, fei::FULL_LOGS, fei::LogManager::getLogManager(), fei::LogManager::getOutputPath(), fei::MATRIX_FILES, and fei::STATS.

int snl_fei::LinearSystem_General::parameters ( int  numParams,
const char *const *  paramStrings 
)
virtual
  Set parameters on this object. Currently two parameters are recognized:

"debugOutput 'path'" where 'path' is the path to the location where debug-log files will be produced.
"name 'string'" where 'string' is an identifier that will be used in debug-log file-names.

Implements fei::LinearSystem.

Definition at line 73 of file snl_fei_LinearSystem_General.cpp.

References ERReturn, fei::SharedPtr< T >::get(), fei::Matrix_Impl< T >::getMatrix(), snl_fei::getParam(), snl_fei::getParamValue(), fei::MatrixReducer::getTargetMatrix(), LinearSystemCore::parameters(), and fei::utils::string_to_output_level().

int snl_fei::LinearSystem_General::parameters ( const fei::ParameterSet params)
virtual

parameters implementation

Implements fei::LinearSystem.

Definition at line 128 of file snl_fei_LinearSystem_General.cpp.

References fei::utils::convert_ParameterSet_to_strings(), and fei::utils::strings_to_char_ptrs().

int snl_fei::LinearSystem_General::setBCValuesOnVector ( fei::Vector vector)
virtual

use stored BC values to modify specified vector

Implements fei::LinearSystem.

Definition at line 321 of file snl_fei_LinearSystem_General.cpp.

References CHK_ERR, and fei::Vector::copyIn().

bool snl_fei::LinearSystem_General::eqnIsEssentialBC ( int  globalEqnIndex) const
virtual

query whether specified eqn index has prescribed BC value

Implements fei::LinearSystem.

Definition at line 339 of file snl_fei_LinearSystem_General.cpp.

References fei::binarySearch().

void snl_fei::LinearSystem_General::getEssentialBCs ( std::vector< int > &  bcEqns,
std::vector< double > &  bcVals 
) const
virtual

Retrieve eqn-indices and values for BC equations

Implements fei::LinearSystem.

Definition at line 349 of file snl_fei_LinearSystem_General.cpp.

void snl_fei::LinearSystem_General::getConstrainedEqns ( std::vector< int > &  crEqns) const
virtual

Retrieve eqn-indices for constraints

Implements fei::LinearSystem.

Definition at line 368 of file snl_fei_LinearSystem_General.cpp.

void snl_fei::LinearSystem_General::setName ( const char *  name)
private

Definition at line 144 of file snl_fei_LinearSystem_General.cpp.

Referenced by LinearSystem_General().

int snl_fei::LinearSystem_General::fill_EssBCValues ( )
private
int snl_fei::LinearSystem_General::implementBCs ( bool  applyBCs)
private
int snl_fei::LinearSystem_General::enforceEssentialBC_LinSysCore ( )
private
void snl_fei::LinearSystem_General::enforceEssentialBC_step_1 ( fei::CSVec essBCs)
private
void snl_fei::LinearSystem_General::enforceEssentialBC_step_2 ( fei::CSVec essBCs)
private
int snl_fei::LinearSystem_General::getMatrixRow ( fei::Matrix matrix,
int  row,
std::vector< double > &  coefs,
std::vector< int > &  indices 
)
private

Member Data Documentation

MPI_Comm snl_fei::LinearSystem_General::comm_
private

Definition at line 113 of file snl_fei_LinearSystem_General.hpp.

Referenced by LinearSystem_General().

fei::CSVec* snl_fei::LinearSystem_General::essBCvalues_
private

Definition at line 115 of file snl_fei_LinearSystem_General.hpp.

fei::CSVec* snl_fei::LinearSystem_General::allEssBCs_
private

Definition at line 116 of file snl_fei_LinearSystem_General.hpp.

bool snl_fei::LinearSystem_General::resolveConflictRequested_
private

Definition at line 118 of file snl_fei_LinearSystem_General.hpp.

bool snl_fei::LinearSystem_General::bcs_trump_slaves_
private

Definition at line 119 of file snl_fei_LinearSystem_General.hpp.

bool snl_fei::LinearSystem_General::explicitBCenforcement_
private

Definition at line 120 of file snl_fei_LinearSystem_General.hpp.

bool snl_fei::LinearSystem_General::BCenforcement_no_column_mod_
private

Definition at line 121 of file snl_fei_LinearSystem_General.hpp.

int snl_fei::LinearSystem_General::localProc_
private

Definition at line 123 of file snl_fei_LinearSystem_General.hpp.

Referenced by LinearSystem_General().

int snl_fei::LinearSystem_General::numProcs_
private

Definition at line 124 of file snl_fei_LinearSystem_General.hpp.

Referenced by LinearSystem_General().

int snl_fei::LinearSystem_General::firstLocalOffset_
private

Definition at line 126 of file snl_fei_LinearSystem_General.hpp.

Referenced by LinearSystem_General().

int snl_fei::LinearSystem_General::lastLocalOffset_
private

Definition at line 127 of file snl_fei_LinearSystem_General.hpp.

Referenced by LinearSystem_General().

std::string snl_fei::LinearSystem_General::name_
private

Definition at line 129 of file snl_fei_LinearSystem_General.hpp.

std::map<std::string, unsigned> snl_fei::LinearSystem_General::named_loadcomplete_counter_
private

Definition at line 130 of file snl_fei_LinearSystem_General.hpp.

std::vector<int> snl_fei::LinearSystem_General::iwork_
private

Definition at line 132 of file snl_fei_LinearSystem_General.hpp.

std::vector<double> snl_fei::LinearSystem_General::dwork_
private

Definition at line 133 of file snl_fei_LinearSystem_General.hpp.

std::string snl_fei::LinearSystem_General::dbgprefix_
private

Definition at line 134 of file snl_fei_LinearSystem_General.hpp.


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