9 #ifndef _fei_FEI_Impl_hpp_
10 #define _fei_FEI_Impl_hpp_
12 #include <fei_macros.hpp>
15 #include <fei_Factory.hpp>
58 const char *
const* paramStrings);
68 const int *fieldSizes,
70 const int *fieldTypes=NULL);
74 int numNodesPerElement,
75 const int* numFieldsPerNode,
76 const int*
const* nodalFieldIDs,
77 int numElemDofFieldsPerElement,
78 const int* elemDOFFieldIDs,
79 int interleaveStrategy);
83 const GlobalID* elemConn);
87 int offsetIntoSlaveField,
89 const GlobalID* masterNodeIDs,
90 const int* masterFieldIDs,
91 const double* weights,
97 const GlobalID *sharedNodeIDs,
98 const int* numProcsPerNode,
99 const int *
const *sharingProcIDs);
102 const GlobalID* CRNodeIDs,
103 const int *CRFieldIDs,
107 const GlobalID* CRNodeIDs,
108 const int *CRFieldIDs,
127 const GlobalID *nodeIDs,
129 const int* offsetsIntoField,
130 const double* prescribedValues);
133 const GlobalID* elemIDs,
135 const double *
const *alpha,
136 const double *
const *beta,
137 const double *
const *gamma);
141 const GlobalID* elemConn,
142 const double*
const* elemStiffness,
143 const double* elemLoad,
148 const GlobalID* elemConn,
149 const double*
const* elemStiffness,
154 const GlobalID* elemConn,
155 const double* elemLoad);
159 const GlobalID* CRNodeIDs,
160 const int* CRFieldIDs,
161 const double* CRWeights,
166 const GlobalID* CRNodeIDs,
167 const int* CRFieldIDs,
168 const double* CRWeights,
178 const double* coefficients);
186 const double* coefficients);
190 const double* scalars);
194 const double* scalars);
197 bool globalAssemble=
true);
206 int solve(
int& status);
213 int version(
const char*& versionString);
219 double& solnReturnTime);
224 const GlobalID *nodeIDs,
230 const GlobalID* nodeIDs,
238 const GlobalID *nodeIDs,
244 const GlobalID *elemIDs,
245 int& numElemDOFPerElement,
257 double *multipliers);
272 const GlobalID *nodeIDs,
274 const double *estimates);
280 const GlobalID *nodeIDs,
281 const double *estimates);
286 const GlobalID *elemIDs,
288 const double *estimates);
293 const double* multEstimates);
387 const GlobalID* nodeIDs,
430 const GlobalID* nodeIDs,
431 const double* nodeData);
434 void basic_initializations();
436 int inputRHS(
int IDType,
440 const double* rhsEntries,
443 int fillNodeset(
int blockID)
const;
445 int aggregateSystem();
447 int aggregateSystem_LinSysCore();
451 std::vector<fei::SharedPtr<LibraryWrapper> > wrapper_;
455 int constraintIDType_;
457 std::vector<fei::SharedPtr<fei::Factory> > factory_;
458 bool createdFactory_;
463 std::vector<fei::SharedPtr<fei::Vector> > b_;
464 std::vector<fei::SharedPtr<fei::Matrix> > A_;
469 Data *soln_fei_matrix_;
470 Data *soln_fei_vector_;
478 char** paramStrings_;
480 std::vector<int> matrixIDs_;
481 std::vector<int> rhsIDs_;
483 std::vector<double> matScalars_;
485 std::vector<double> rhsScalars_;
492 int index_current_rhs_row_;
497 bool setSolveTypeCalled_;
498 bool initPhaseIsComplete_;
500 bool aggregateSystemFormed_;
501 int newMatrixDataLoaded_;
505 double initTime_, loadTime_, solveTime_, solnReturnTime_;
507 std::vector<int> iwork_;
509 mutable std::set<int> nodeset_;
510 mutable bool nodeset_filled_;
511 mutable int nodeset_blockid_;
513 mutable std::map<int,int> block_dof_per_elem_;
514 bool any_blocks_have_elem_dof_;
int setSolveType(int solveType)
int getNumLocalNodes(int &numNodes)
int putNodalFieldData(int fieldID, int numNodes, const GlobalID *nodeIDs, const double *nodeData)
int sumIntoRHS(int IDType, int fieldID, int numIDs, const GlobalID *IDs, const double *coefficients)
int getNumCRMultipliers(int &numMultCRs)
int iterations(int &itersTaken) const
int version(const char *&versionString)
int setIDLists(int numMatrices, const int *matrixIDs, int numRHSs, const int *rhsIDs)
fei::SharedPtr< fei::LinearSystem > getLinearSystem()
int getBlockElemSolution(GlobalID elemBlockID, int numElems, const GlobalID *elemIDs, int &numElemDOFPerElement, double *results)
int getParameters(int &numParams, char **¶mStrings)
int initCRPen(int numCRNodes, const GlobalID *CRNodeIDs, const int *CRFieldIDs, int &CRID)
int initFields(int numFields, const int *fieldSizes, const int *fieldIDs, const int *fieldTypes=NULL)
int getFieldSize(int fieldID, int &numScalars)
int getNumSolnParams(GlobalID nodeID, int &numSolnParams) const
int getBlockNodeIDList(GlobalID elemBlockID, int numNodes, GlobalID *nodeIDs)
int putBlockFieldNodeSolution(GlobalID elemBlockID, int fieldID, int numNodes, const GlobalID *nodeIDs, const double *estimates)
int setCurrentMatrix(int matrixID)
int getCRMultipliers(int numCRs, const int *CRIDs, double *multipliers)
int cumulative_cpu_times(double &initTime, double &loadTime, double &solveTime, double &solnReturnTime)
int setCurrentRHS(int rhsID)
int putBlockNodeSolution(GlobalID elemBlockID, int numNodes, const GlobalID *nodeIDs, const int *offsets, const double *estimates)
int parameters(int numParams, const char *const *paramStrings)
int resetSystem(double s=0.0)
int loadComplete(bool applyBCs=true, bool globalAssemble=true)
int getBlockNodeSolution(GlobalID elemBlockID, int numNodes, const GlobalID *nodeIDs, int *offsets, double *results)
int getEqnNumbers(GlobalID ID, int idType, int fieldID, int &numEqns, int *eqnNumbers)
int getNodalSolution(int numNodes, const GlobalID *nodeIDs, int *offsets, double *results)
int initElemBlock(GlobalID elemBlockID, int numElements, int numNodesPerElement, const int *numFieldsPerNode, const int *const *nodalFieldIDs, int numElemDofFieldsPerElement, const int *elemDOFFieldIDs, int interleaveStrategy)
int putCRMultipliers(int numMultCRs, const int *CRIDs, const double *multEstimates)
int getCRMultIDList(int numMultCRs, int *multIDs)
int getNumNodesPerElement(GlobalID blockID, int &nodesPerElem) const
int sumInElem(GlobalID elemBlockID, GlobalID elemID, const GlobalID *elemConn, const double *const *elemStiffness, const double *elemLoad, int elemFormat)
int initSharedNodes(int numSharedNodes, const GlobalID *sharedNodeIDs, const int *numProcsPerNode, const int *const *sharingProcIDs)
int getNumBlockElemDOF(GlobalID blockID, int &DOFPerElem) const
int sumInElemMatrix(GlobalID elemBlockID, GlobalID elemID, const GlobalID *elemConn, const double *const *elemStiffness, int elemFormat)
int putBlockElemSolution(GlobalID elemBlockID, int numElems, const GlobalID *elemIDs, int dofPerElem, const double *estimates)
int resetInitialGuess(double s=0.0)
int resetRHSVector(double s=0.0)
int setMatScalars(int numScalars, const int *IDs, const double *scalars)
int initSlaveVariable(GlobalID slaveNodeID, int slaveFieldID, int offsetIntoSlaveField, int numMasterNodes, const GlobalID *masterNodeIDs, const int *masterFieldIDs, const double *weights, double rhsValue)
int getNumElemBlocks(int &numElemBlocks) const
int getNumBlockActNodes(GlobalID blockID, int &numNodes) const
int residualNorm(int whichNorm, int numFields, int *fieldIDs, double *norms)
int putIntoRHS(int IDType, int fieldID, int numIDs, const GlobalID *IDs, const double *coefficients)
int resetMatrix(double s=0.0)
int loadCRPen(int CRPenID, int numCRNodes, const GlobalID *CRNodeIDs, const int *CRFieldIDs, const double *CRWeights, double CRValue, double penValue)
int getNumBlockActEqns(GlobalID blockID, int &numEqns) const
int initCRMult(int numCRNodes, const GlobalID *CRNodeIDs, const int *CRFieldIDs, int &CRID)
int loadCRMult(int CRMultID, int numCRNodes, const GlobalID *CRNodeIDs, const int *CRFieldIDs, const double *CRWeights, double CRValue)
int getNumEqnsPerElement(GlobalID blockID, int &numEqns) const
int getNumBlockElements(GlobalID blockID, int &numElems) const
int initElem(GlobalID elemBlockID, GlobalID elemID, const GlobalID *elemConn)
int getBlockFieldNodeSolution(GlobalID elemBlockID, int fieldID, int numNodes, const GlobalID *nodeIDs, double *results)
int loadNodeBCs(int numNodes, const GlobalID *nodeIDs, int fieldID, const int *offsetsIntoField, const double *prescribedValues)
int setRHSScalars(int numScalars, const int *IDs, const double *scalars)
int getLocalNodeIDList(int &numNodes, GlobalID *nodeIDs, int lenNodeIDs)
int loadElemBCs(int numElems, const GlobalID *elemIDs, int fieldID, const double *const *alpha, const double *const *beta, const double *const *gamma)
int getBlockElemIDList(GlobalID elemBlockID, int numElems, GlobalID *elemIDs)
int getNodalFieldSolution(int fieldID, int numNodes, const GlobalID *nodeIDs, double *results)
int sumInElemRHS(GlobalID elemBlockID, GlobalID elemID, const GlobalID *elemConn, const double *elemLoad)
FEI_Impl(fei::SharedPtr< LibraryWrapper > wrapper, MPI_Comm comm, int masterRank=0)