snl_fei Namespace Reference


Classes

class  BlkSizeMsgHandler
struct  BlockMatrixTraits
class  Broker
class  Broker_FEData
class  Broker_LinSysCore
class  Constraint
class  Factory
struct  FEMatrixTraits
struct  FEMatrixTraits< FiniteElementData >
struct  FEVectorTraits
struct  FEVectorTraits< FiniteElementData >
class  LinearSystem_FEData
class  LinearSystem_General
class  MapContig
struct  MapTraits
class  PointBlockMap
class  RaggedTable
class  RecordCollection
class  RecordMsgHandler
struct  SetTraits
class  SubdMsgHandler
struct  SetTraits< fei::ctg_set< int > >
class  RaggedTable< MapContig< fei::ctg_set< int > * >, fei::ctg_set< int > >

Functions

static unsigned getFieldSize (int fieldID, fei::VectorSpace *space1, fei::VectorSpace *space2)
template<typename T>
int binarySearch (const T &item, const T *list, int len)
template<typename T>
void insertion_sort_with_companions (int len, int *array, T *companions)
template<typename T>
int lowerBound (const T &item, const T *list, int len)
template<typename T>
int binarySearch (const T &item, const T *list, int len, int &insertPoint)
template<typename T>
int binarySearch (const T &item, const std::vector< T > &list, int &insertPoint)
template<typename T>
int binarySearch (const T &item, const std::vector< T > &list)
template<typename T>
int binarySearch (const T &item, const T *list, int, int start, int end, int &insertPoint)
template<typename T>
int binarySearch (int numItems, const T *items, int *offsets, const T *list, int listLength)
template<class T>
int sortedListInsert (const T &item, std::vector< T > &list)
template<class T>
int sortedListInsert (const T &item, T *&list, int &len, int &allocLen)
template<class T>
int listInsert (const T &item, int offset, T *&list, int &usedLength, int &allocatedLength, int allocChunkSize=200)
template<class T>
int searchList (const T &item, const T *list, int len)
const char * getParam (const char *key, int numParams, const char *const *paramStrings)
const char * getParamValue (const char *key, int numParams, const char *const *paramStrings, char separator)
const char * getParamValue (const char *key, int numParams, const char *const *paramStrings, int &foundOffset, char separator)
int getIntParamValue (const char *key, int numParams, const char *const *params, int &paramValue)
int getDoubleParamValue (const char *key, int numParams, const char *const *params, double &paramValue)
int getDoubleParamValue (const char *key, std::vector< std::string > &params, double &paramValue)
const char * getParam (const char *key, int numParams, const char *const *paramStrings, int &foundOffset)
const char * getParam (const char *key, std::vector< std::string > &params, int &foundOffset)
const char * getParamValue (const char *key, std::vector< std::string > &params, char separator)
void separate_string (const char *input_string, const char *substring, const char *&before_substring, int &len_before_substring, const char *&after_substring, int &len_after_substring)
int storeNamedAttribute (const char *name, void *attribute, std::vector< char * > &attributeNames, std::vector< void * > &attributes)
void * retrieveNamedAttribute (const char *name, std::vector< char * > &attributeNames, std::vector< void * > &attributes)
unsigned leading_substring_length (const char *string)
const char * skipSeparator (const char *paramString, char separator)
int mergeStringLists (char **&strings, int &numStrings, const char *const *stringsToMerge, int numStringsToMerge)
int resolveConflictingCRs (fei::MatrixGraph &matrixGraph, fei::Matrix &bcEqns, const std::vector< int > &bcEqnNumbers)
int gatherRemoteEssBCs (fei::CSVec &essBCs, fei::SparseRowGraph *remoteGraph, fei::Matrix &matrix)
fei::SharedPtr< fei::SparseRowGraphmergeSparseRowGraphs (const fei::SparseRowGraph *srg1, const fei::SparseRowGraph *srg2)
void copy2DBlockDiagToColumnContig (int numBlocks, const int *blockSizes, const double *const *values2d, int format, double *colcontigvalues)
void copy2DToColumnContig (int numrows, int numcols, const double *const *values2d, int format, double *colcontigvalues)


Function Documentation

template<typename T>
int snl_fei::binarySearch ( const T &  item,
const T *  list,
int  len 
)

Binary search of a list that's assumed to be sorted.

Parameters:
item to be searched for.
list List to be searched.
len Length of list.
Returns:
offset Offset at which item was found, or -1 if not found.

Definition at line 27 of file snl_fei_ArrayUtils.hpp.

template<typename T>
void snl_fei::insertion_sort_with_companions ( int  len,
int *  array,
T *  companions 
)

sort the specified array, and move the contents of the specified companions array to match the new order. This is an implementation of the insertion sort algorithm.

Definition at line 63 of file snl_fei_ArrayUtils.hpp.

template<typename T>
int snl_fei::lowerBound ( const T &  item,
const T *  list,
int  len 
)

Lower bound finds the first entry in list that is not less than item. A binary search is used, and list is assumed to be sorted.

Definition at line 87 of file snl_fei_ArrayUtils.hpp.

template<typename T>
int snl_fei::binarySearch ( const T &  item,
const T *  list,
int  len,
int &  insertPoint 
)

Binary search of a list that's assumed to be sorted.

Parameters:
item to be searched for.
list List to be searched.
len Length of list.
insertPoint If item is not found, this is the offset into list at which item could be inserted while maintaining sortedness. Not referenced if item is found.
Returns:
offset Offset at which item was found, or -1 if not found.

Definition at line 128 of file snl_fei_ArrayUtils.hpp.

template<typename T>
int snl_fei::binarySearch ( const T &  item,
const std::vector< T > &  list,
int &  insertPoint 
)

Binary search of an std::vector that's assumed to be sorted.

Definition at line 191 of file snl_fei_ArrayUtils.hpp.

template<typename T>
int snl_fei::binarySearch ( const T &  item,
const std::vector< T > &  list 
)

Binary search of an std::vector that's assumed to be sorted.

Definition at line 203 of file snl_fei_ArrayUtils.hpp.

template<typename T>
int snl_fei::binarySearch ( const T &  item,
const T *  list,
int  ,
int  start,
int  end,
int &  insertPoint 
)

Perform a binary search but limit the search to a given range.

Parameters:
item Value to be searched for.
list 
listLength 
start Starting offset of search 'window'.
end Ending offset of search 'window'. end should be less than listLength.
insertPoint 
Returns:
offset position at which item was found. If not found, returns -1. (Since 0-based indexing is used, 'end' can't be greater than listLength-1.)

Definition at line 221 of file snl_fei_ArrayUtils.hpp.

template<typename T>
int snl_fei::binarySearch ( int  numItems,
const T *  items,
int *  offsets,
const T *  list,
int  listLength 
)

Perform a binary search for each item in a sorted input list.

Parameters:
numItems number of items to be searched for
items list of items (length numItems) to be searched for
offsets list (length numItems) allocated by caller. On exit, offsets[i] contains the offset of item in 'list', or -1 if item is not present in 'list'.
list array (length 'listLength') to be searched
listLength length of input array 'list'

Definition at line 291 of file snl_fei_ArrayUtils.hpp.

template<class T>
int snl_fei::sortedListInsert ( const T &  item,
std::vector< T > &  list 
)

Insert an item into a sorted list, maintaining sortedness. If the item is inserted, return the offset at which it was inserted. If the item was already present, return -1.

Definition at line 318 of file snl_fei_ArrayUtils.hpp.

template<class T>
int snl_fei::sortedListInsert ( const T &  item,
T *&  list,
int &  len,
int &  allocLen 
)

Insert an item into a sorted list, maintaining sortedness.

Definition at line 334 of file snl_fei_ArrayUtils.hpp.

template<class T>
int snl_fei::listInsert ( const T &  item,
int  offset,
T *&  list,
int &  usedLength,
int &  allocatedLength,
int  allocChunkSize = 200 
)

Insert an item into a list at a specified position.

Definition at line 364 of file snl_fei_ArrayUtils.hpp.

template<class T>
int snl_fei::searchList ( const T &  item,
const T *  list,
int  len 
)

Simple exhaustive search of a list.

Returns:
offset at which item is found, or -1 if not found.

Definition at line 405 of file snl_fei_ArrayUtils.hpp.

const char * snl_fei::getParam ( const char *  key,
int  numParams,
const char *const *  paramStrings 
)

Given a search key, and a list of strings, search the list of strings looking for a string that starts with the search key. i.e., a string such that key is a leading substring. If found, return a pointer to that string.
Important Note: The returned pointer should be treated as read-only. It is not a separate copy of the string being pointed to.

Parameters:
key String to be searched for.
numParams Number of strings to be searched.
paramStrings List of strings to be searched.
Returns:
search-result Pointer to the entry in paramStrings that has key as a leading substring, or NULL if key is not found.

Definition at line 32 of file snl_fei_Utils.cpp.

const char * snl_fei::getParamValue ( const char *  key,
int  numParams,
const char *const *  paramStrings,
char  separator = ' ' 
)

Given a search key, and a list of strings containing key-value pairs, search the list of strings looking for one that starts with the search key. i.e., a string such that key is a leading substring. If found, return a pointer to the value portion of that key-value pair.
Important Note: The returned pointer should be treated as read-only. It is not a separate copy of the string being pointed to.

Parameters:
key String to be searched for.
numParams Number of strings to be searched.
paramStrings List of strings to be searched.
separator Optional argument, defaults to ' ' (space). This is the character that is the separator between keys and values in the parameter strings.
Returns:
search-result Pointer to the entry in paramStrings that has key as a leading substring, or NULL if key is not found.

Definition at line 41 of file snl_fei_Utils.cpp.

const char * snl_fei::getParamValue ( const char *  key,
int  numParams,
const char *const *  paramStrings,
int &  foundOffset,
char  separator = ' ' 
)

Given a search key, and a list of strings containing key-value pairs, search the list of strings looking for one that starts with the search key. i.e., a string such that key is a leading substring. If found, return a pointer to the value portion of that key-value pair.
Important Note: The returned pointer should be treated as read-only. It is not a separate copy of the string being pointed to.

Parameters:
key String to be searched for.
numParams Number of strings to be searched.
paramStrings List of strings to be searched.
foundOffset offset at which key was found in paramStrings. If not found, then this parameter is set to -1.
separator Optional argument, defaults to ' ' (space). This is the character that is the separator between keys and values in the parameter strings.
Returns:
search-result Pointer to the entry in paramStrings that has key as a leading substring, or NULL if key is not found.

Definition at line 52 of file snl_fei_Utils.cpp.

int snl_fei::getIntParamValue ( const char *  key,
int  numParams,
const char *const *  params,
int &  paramValue 
)

Get the integer value of a named key-value pair from an array of strings.

Definition at line 64 of file snl_fei_Utils.cpp.

int snl_fei::getDoubleParamValue ( const char *  key,
int  numParams,
const char *const *  params,
double &  paramValue 
)

Get the double-precision value of a named key-value pair from an array of strings.

Definition at line 79 of file snl_fei_Utils.cpp.

int snl_fei::getDoubleParamValue ( const char *  key,
std::vector< std::string > &  params,
double &  paramValue 
)

Get the double-precision value of a named key-value pair from a vector of strings.

Definition at line 94 of file snl_fei_Utils.cpp.

const char * snl_fei::getParam ( const char *  key,
int  numParams,
const char *const *  paramStrings,
int &  foundOffset 
)

Given a search key, and a list of strings, search the list of strings looking for a string that starts with the search key. i.e., a string such that key is a leading substring. If found, return a pointer to that string, and also provide the offset of the location in 'paramStrings' at which it was found.
Important Note: The returned pointer should be treated as read-only. It is not a separate copy of the string being pointed to.

This method is case-sensitive.

Parameters:
key String to be searched for.
numParams Number of strings to be searched.
paramStrings List of strings to be searched.
foundOffset offset at which key was found in paramStrings. If not found, then this parameter is set to -1.
Returns:
search-result Pointer to the entry in paramStrings that has key as a leading substring, or NULL if key is not found.

Definition at line 108 of file snl_fei_Utils.cpp.

const char * snl_fei::getParam ( const char *  key,
std::vector< std::string > &  paramStrings,
int &  foundOffset 
)

Given a search key, and a vector of strings, search the strings looking for a string that starts with the search key. i.e., a string such that key is a leading substring. If found, return a pointer to that string, and also provide the offset of the location in 'paramStrings' at which it was found.
Important Note: The returned pointer should be treated as read-only. It is not a separate copy of the string being pointed to.

This method is case-sensitive.

Parameters:
key String to be searched for.
paramStrings vector of strings to be searched.
foundOffset offset at which key was found in paramStrings. If not found, then this parameter is set to -1.
Returns:
search-result Pointer to the entry in paramStrings that has key as a leading substring, or NULL if key is not found.

Definition at line 145 of file snl_fei_Utils.cpp.

const char * snl_fei::getParamValue ( const char *  key,
std::vector< std::string > &  params,
char  separator = ' ' 
)

Given a search key, and a vector of strings containing key-value pairs, search the strings looking for one that starts with the search key. i.e., a string such that key is a leading substring. If found, return a pointer to the value portion of that key-value pair.
Important Note: The returned pointer should be treated as read-only. It is not a separate copy of the string being pointed to.

Parameters:
key String to be searched for.
params vector of strings to be searched.
separator Optional separator char, defaults to space
Returns:
search-result Pointer to the entry in paramStrings that has key as a leading substring, or NULL if key is not found.

Definition at line 170 of file snl_fei_Utils.cpp.

void snl_fei::separate_string ( const char *  input_string,
const char *  substring,
const char *&  before_substring,
int &  len_before_substring,
const char *&  after_substring,
int &  len_after_substring 
)

separate a string into pieces. unsupported, for power-users only

Definition at line 179 of file snl_fei_Utils.cpp.

int snl_fei::storeNamedAttribute ( const char *  name,
void *  attribute,
std::vector< char * > &  attributeNames,
std::vector< void * > &  attributes 
)

stored a named void pointer in a vector. (poor-man's map)

Definition at line 220 of file snl_fei_Utils.cpp.

void * snl_fei::retrieveNamedAttribute ( const char *  name,
std::vector< char * > &  attributeNames,
std::vector< void * > &  attributes 
)

retrived a named void pointer from a vector. (poor-man's map)

Definition at line 244 of file snl_fei_Utils.cpp.

unsigned snl_fei::leading_substring_length ( const char *  string  ) 

Given a string, return the length of the leading substring, which is the characters that precede any space, tab, equals sign, or null character.

Definition at line 266 of file snl_fei_Utils.cpp.

const char * snl_fei::skipSeparator ( const char *  paramString,
char  separator = ' ' 
)

Given a parameter-string, which is assumed to contain a pair of substrings (key-value pair) separated by a specified separator character, return a pointer to the second substring. In other words, return a pointer to the first character after the separator. Allows for the possibility that the substrings are separated by more than one copy of the separator.

Parameters:
paramString String to be searched.
separator Optional parameter, defaults to ' ' (space).
Returns:
result First character after separator, or NULL if separator is not found in paramString.

Definition at line 284 of file snl_fei_Utils.cpp.

int snl_fei::mergeStringLists ( char **&  strings,
int &  numStrings,
const char *const *  stringsToMerge,
int  numStringsToMerge 
)

Merge a list of strings into a list of other strings. Maintain uniqueness, don't merge strings that are already present.

Definition at line 300 of file snl_fei_Utils.cpp.

int snl_fei::resolveConflictingCRs ( fei::MatrixGraph matrixGraph,
fei::Matrix bcEqns,
const std::vector< int > &  bcEqnNumbers 
)

Resolve conflicts between constraint-relations and essential (dirichlet) boundary conditions.

Definition at line 369 of file snl_fei_Utils.cpp.

int snl_fei::gatherRemoteEssBCs ( fei::CSVec essBCs,
fei::SparseRowGraph remoteGraph,
fei::Matrix matrix 
)

Do appropriate communications to gather column-portions of remotely-held essential BCs onto local processor.

Definition at line 428 of file snl_fei_Utils.cpp.

void snl_fei::copy2DBlockDiagToColumnContig ( int  numBlocks,
const int *  blockSizes,
const double *const *  values2d,
int  format,
double *  colcontigvalues 
)

Copy values from a 2D "C-style" block-diagonal table (list of pointers) to a "fortran-style" flat column-contiguous array.

Definition at line 540 of file snl_fei_Utils.cpp.

void snl_fei::copy2DToColumnContig ( int  numrows,
int  numcols,
const double *const *  values2d,
int  format,
double *  colcontigvalues 
)

Copy values from a 2D "C-style" table (list of pointers) to a "fortran-style" flat column-contiguous array.

Definition at line 571 of file snl_fei_Utils.cpp.


Generated on Wed May 12 01:33:54 2010 for FEI by  doxygen 1.4.7