9 #ifndef _fei_MatrixGraph_Impl2_hpp_
10 #define _fei_MatrixGraph_Impl2_hpp_
12 #include <fei_macros.hpp>
13 #include <fei_SharedPtr.hpp>
14 #include <fei_VectorSpace.hpp>
15 #include <fei_Reducer.hpp>
16 #include <fei_Graph.hpp>
17 #include <snl_fei_Constraint.hpp>
18 #include <fei_Record.hpp>
19 #include <fei_Logger.hpp>
20 #include <fei_SparseRowGraph.hpp>
21 #include <fei_MatrixGraph.hpp>
27 class ConnectivityBlock;
58 const char* name = NULL);
169 const int* numFieldsPerID,
170 const int* fieldIDs);
196 const int* numFieldsPerID,
197 const int* fieldIDs);
222 int numConnectivityLists,
224 bool diagonal=
false);
250 bool diagonal=
false);
273 int numConnectivityLists,
291 const int* connectedIdentifiers);
309 const int* rowConnectedIdentifiers,
310 const int* colConnectedIdentifiers);
324 const int* connectedIdentifiers);
341 const int* rowConnectedIdentifiers,
343 const int* colConnectedIdentifiers);
363 const int* rowOffsets,
364 const int* packedColumnIDs);
387 const int* rowOffsets,
388 const int* packedColumnIDs);
407 const int* rowLengths,
408 const int*
const* columnIDs);
413 int constraintIDType,
417 const int* fieldIDs);
422 int constraintIDType,
426 const int* fieldIDs);
435 int offsetIntoSlaveField,
436 const double* weights,
464 bool localRowGraph_includeSharedRows=
false);
470 bool& equivalent)
const;
511 int rowIndicesAllocLen,
514 int colIndicesAllocLen,
527 std::vector<int>& indices);
560 std::vector<int>& globalIndices);
596 int createAlgebraicGraph(
bool blockEntryGraph,
598 bool gatherFromOverlap);
600 int addBlockToGraph_multiField_symmetric(
fei::Graph* graph,
602 int addBlockToGraph_multiField_nonsymmetric(
fei::Graph* graph,
604 int addBlockToGraph_singleField_symmetric(
fei::Graph* graph,
606 int addBlockToGraph_singleField_nonsymmetric(
fei::Graph* graph,
608 int addBlockToGraph_noField_symmetric(
fei::Graph* graph,
616 int* records,
int numRecords,
617 const int* numFieldsPerID,
619 const int* fieldSizes,
625 int* records,
int numRecords,
626 int fieldID,
int fieldSize,
653 const int* connectedIdentifiers,
658 int addLagrangeConstraintsToGraph(
fei::Graph* graph);
660 int addPenaltyConstraintsToGraph(
fei::Graph* graph);
662 void setName(
const char* name);
665 int localProc_, numProcs_;
678 bool blockEntryGraph_;
680 std::map<int,fei::Pattern*> patterns_;
682 std::map<int,fei::ConnectivityBlock*> connectivityBlocks_;
683 int arbitraryBlockCounter_;
685 std::vector<fei::ConnectivityBlock*> sparseBlocks_;
687 std::map<int, ConstraintType* >
688 lagrangeConstraints_, penaltyConstraints_, slaveConstraints_;
695 int globalNumSlaves_;
704 std::string dbgprefix_;
706 std::vector<int> tmpIntArray1_, tmpIntArray2_;
710 std::set<int> constrained_indices_;
712 bool includeAllSlaveConstraints_;
727 return(connectivityBlocks_);
732 return( globalNumSlaves_ );
737 return( lagrangeConstraints_ );
int initLagrangeConstraint(int constraintID, int constraintIDType, int numIDs, const int *idTypes, const int *IDs, const int *fieldIDs)
int definePattern(int numIDs, int idType)
int getLocalNumLagrangeConstraints() const
fei::SharedPtr< fei::VectorSpace > getColSpace()
fei::SharedPtr< fei::SparseRowGraph > createGraph(bool blockEntryGraph, bool localRowGraph_includeSharedRows=false)
fei::Pattern * getPattern(int patternID)
int createSlaveMatrices()
int getConnectivityIndices(int blockID, int connectivityID, int indicesAllocLen, int *indices, int &numIndices)
std::map< int, fei::ConnectivityBlock * > & getConnectivityBlocks()
int initConnectivityBlock(int blockID, int numConnectivityLists, int patternID, bool diagonal=false)
int getNumConnectivityBlocks() const
int getConnectivityBlockIDs(std::vector< int > &blockIDs) const
fei::SharedPtr< FillableMat > getSlaveDependencyMatrix()
MatrixGraph_Impl2(fei::SharedPtr< fei::VectorSpace > rowSpace, fei::SharedPtr< fei::VectorSpace > colSpace, const char *name=NULL)
fei::SharedPtr< fei::VectorSpace > getRowSpace()
void setIndicesMode(int mode)
int getConnectivityNumIndices(int blockID) const
void setRowSpace(fei::SharedPtr< fei::VectorSpace > rowSpace)
const fei::ConnectivityBlock * getConnectivityBlock(int blockID) const
int initSlaveConstraint(int numIDs, const int *idTypes, const int *IDs, const int *fieldIDs, int offsetOfSlave, int offsetIntoSlaveField, const double *weights, double rhsValue)
int getNumIDsPerConnectivityList(int blockID) const
virtual fei::SharedPtr< fei::MatrixGraph > createMatrixGraph(fei::SharedPtr< fei::VectorSpace > rowSpace, fei::SharedPtr< fei::VectorSpace > columnSpace, const char *name)
ConstraintType * getPenaltyConstraint(int constraintID)
ConstraintType * getSlaveConstraint(int constraintID)
virtual ~MatrixGraph_Impl2()
int getPatternNumIndices(int patternID, int &numIndices)
void getConstrainedIndices(std::vector< int > &crindices) const
int initConnectivity(int blockID, int connectivityID, const int *connectedIdentifiers)
int getPatternIndices(int patternID, const int *IDs, std::vector< int > &indices)
void setParameters(const fei::ParameterSet ¶ms)
int compareStructure(const fei::MatrixGraph &matrixGraph, bool &equivalent) const
ConstraintType * getLagrangeConstraint(int constraintID)
int getConstraintConnectivityIndices(ConstraintType *cr, std::vector< int > &globalIndices)
fei::SharedPtr< fei::Reducer > getReducer()
int initPenaltyConstraint(int constraintID, int constraintIDType, int numIDs, const int *idTypes, const int *IDs, const int *fieldIDs)
bool hasSlaveDof(int ID, int idType)
std::map< int, ConstraintType * > & getLagrangeConstraints()
fei::SharedPtr< fei::SparseRowGraph > getRemotelyOwnedGraphRows()
void setColumnSpace(fei::SharedPtr< fei::VectorSpace > columnSpace)
int getGlobalNumSlaveConstraints() const