9 #ifndef _snl_fei_Broker_FEData_hpp_
10 #define _snl_fei_Broker_FEData_hpp_
26 #define fei_file "snl_fei_Broker_FEData.hpp"
78 bool zeroSharedRows =
false;
126 vspace->getRecordCollection(nodeType, nodeRecords);
128 int* intData =
new int[numElemBlocks*3];
129 int* numElemsPerBlock = intData;
130 int* numNodesPerElem = intData+numElemBlocks;
131 int* elemMatrixSizePerBlock = intData+2*numElemBlocks;
134 std::vector<int> elemBlockIDs;
137 for(i=0; i<numElemBlocks; ++i) {
140 if (cblock==NULL)
return(-1);
146 int numSharedNodes = 0;
154 elemMatrixSizePerBlock,
157 numLagrangeConstraints) );
159 std::map<int,fei::ConnectivityBlock*>::const_iterator
162 std::vector<int> nodeNumbers, numDofPerNode, dof_ids;
163 int total_num_dof = 0;
164 for(i=0; i<numElemBlocks; ++i, ++cdb_iter) {
168 int numConnectedNodes = pattern->
getNumIDs();
169 nodeNumbers.resize(numConnectedNodes);
170 numDofPerNode.resize(numConnectedNodes);
171 int* nodeNumPtr = &nodeNumbers[0];
172 int* numDofPtr = &numDofPerNode[0];
180 for(
int ii=0; ii<numConnectedNodes; ++ii) {
182 for(
int f=0;
f<numFieldsPerID[ii]; ++
f) {
183 dof += vspace->getFieldSize(fieldIDs[foffset++]);
186 total_num_dof += dof;
189 dof_ids.resize(total_num_dof, 0);
190 int* dof_ids_ptr = &dof_ids[0];
197 int numElems = elemIDs.size();
201 for(
int elem=0; elem<numElems; ++elem) {
202 for(
int n=0;
n<numConnectedNodes; ++
n) {
209 nodeNumPtr, numDofPtr, dof_ids_ptr));
231 #endif // _snl_fei_Broker_FEData_hpp_
GlobalIDType getNumber() const
const std::map< int, int > & getConnectivityIDs() const
int getNumIndices() const
const int * getNumFieldsPerID() const
fei::SharedPtr< FiniteElementData > feData_
virtual fei::SharedPtr< fei::LinearSystem > createLinearSystem()
virtual const fei::ConnectivityBlock * getConnectivityBlock(int blockID) const =0
const int * getFieldIDs() const
void setLookup(Lookup *lookup)
virtual std::map< int, fei::ConnectivityBlock * > & getConnectivityBlocks()=0
std::vector< int > & getRowConnectivities()
virtual int setConnectivity(int elemBlockID, int elemID, int numNodes, const int *nodeNumbers, const int *numDofPerNode, const int *dof_ids)=0
virtual fei::SharedPtr< fei::VectorSpace > getRowSpace()=0
bool setMatrixMatrixGraph_
virtual int setLookup(Lookup &lookup)=0
virtual void setMatrixGraph(fei::SharedPtr< fei::MatrixGraph > matrixGraph)
fei::SharedPtr< fei::MatrixGraph > matrixGraph_
Broker_FEData(fei::SharedPtr< FiniteElementData > feData, fei::SharedPtr< fei::MatrixGraph > matrixGraph, int nodeIDType)
fei::Record< int > * getRecordWithLocalID(int lid)
virtual fei::SharedPtr< fei::Vector > createVector(bool isSolutionVector=false)
int getNumOwnedAndSharedIDs(int idType)
fei::Lookup_Impl * lookup_
virtual fei::SharedPtr< fei::Matrix > createMatrix()
virtual int getLocalNumLagrangeConstraints() const =0
virtual int getNumConnectivityBlocks() const =0
virtual int getConnectivityBlockIDs(std::vector< int > &blockIDs) const =0
virtual int describeStructure(int numElemBlocks, const int *numElemsPerBlock, const int *numNodesPerElem, const int *elemMatrixSizePerBlock, int totalNumNodes, int numSharedNodes, int numMultCRs)=0
const fei::Pattern * getRowPattern() const
int getNumIndices_Owned() const