1 #ifndef _FEI_Implementation_hpp_
2 #define _FEI_Implementation_hpp_
12 #include <fei_fwd.hpp>
14 #include <fei_SharedPtr.hpp>
80 int parameters(
int numParams,
const char *
const* paramStrings);
100 const int* matrixIDs,
129 const int *fieldSizes,
131 const int *fieldTypes = NULL);
156 int numNodesPerElement,
157 const int* numFieldsPerNode,
158 const int*
const* nodalFieldIDs,
159 int numElemDofFieldsPerElement,
160 const int* elemDOFFieldIDs,
161 int interleaveStrategy);
173 const GlobalID* elemConn);
224 int offsetIntoSlaveField,
226 const GlobalID* masterNodeIDs,
227 const int* masterFieldIDs,
228 const double* weights,
239 const GlobalID *sharedNodeIDs,
240 const int* numProcsPerNode,
241 const int *
const *sharingProcIDs);
252 const GlobalID* CRNodes,
265 const GlobalID* CRNodes,
320 const GlobalID *nodeIDs,
322 const int* offsetsIntoField,
323 const double* prescribedValues);
337 const GlobalID* elemIDs,
339 const double *
const *alpha,
340 const double *
const *beta,
341 const double *
const *gamma);
360 const GlobalID* elemConn,
361 const double*
const* elemStiffness,
362 const double* elemLoad,
381 const GlobalID* elemConn,
382 const double*
const* elemStiffness,
395 const GlobalID* elemConn,
396 const double* elemLoad);
409 const GlobalID* CRNodes,
411 const double* CRWeights,
426 const GlobalID* CRNodes,
428 const double* CRWeights,
437 const double* rhsEntries);
444 const double* rhsEntries);
446 int sumIntoMatrixDiagonal(
int IDType,
450 const double* coefficients);
458 const double* scalars);
463 const double* scalars);
468 bool globalAssemble=
true);
477 int solve(
int& status);
492 int version(
const char*& versionString);
498 double& solnReturnTime);
505 const GlobalID *nodeIDs,
511 const GlobalID* nodeIDs,
519 const GlobalID *nodeIDs,
525 const GlobalID *elemIDs,
526 int& numElemDOFPerElement,
538 double *multipliers);
554 const GlobalID *nodeIDs,
556 const double *estimates);
562 const GlobalID *nodeIDs,
563 const double *estimates);
568 const GlobalID *elemIDs,
570 const double *estimates);
575 const double* multEstimates);
669 const GlobalID* nodeIDs,
712 const GlobalID* nodeIDs,
713 const double* nodeData);
716 {
return *problemStructure_; }
719 {
return *problemStructure_; }
728 void deleteRHSScalars();
730 int allocateInternalFEIs();
732 void debugOut(
const char* msg);
733 void debugOut(
const char* msg,
int whichFEI);
735 void buildLinearSystem();
736 int aggregateSystem();
738 void messageAbort(
const char* msg);
739 void notAllocatedAbort(
const char* name);
740 void needParametersAbort(
const char* name);
741 void badParametersAbort(
const char* name);
743 void setDebugOutput(
const char* path,
const char* name);
750 std::vector<fei::SharedPtr<LinearSystemCore> > lscArray_;
751 bool haveLinSysCore_;
756 int numInternalFEIs_;
757 bool internalFEIsAllocated_;
759 std::vector<int> matrixIDs_;
760 std::vector<int> numRHSIDs_;
761 std::vector<int*> rhsIDs_;
765 std::vector<double> matScalars_;
767 std::vector<double*> rhsScalars_;
770 int index_soln_filter_;
771 int index_current_filter_;
772 int index_current_rhs_row_;
776 bool setSolveTypeCalled_;
777 bool initPhaseIsComplete_;
779 bool aggregateSystemFormed_;
780 int newMatrixDataLoaded_;
782 Data *soln_fei_matrix_;
783 Data *soln_fei_vector_;
795 #ifdef FEI_HAVE_IOSFWD
796 std::ostream* dbgOStreamPtr_;
798 ostream* dbgOStreamPtr_;
801 #ifdef FEI_HAVE_IOSFWD
802 std::ofstream* dbgFStreamPtr_;
804 ofstream* dbgFStreamPtr_;
807 double initTime_, loadTime_, solveTime_, solnReturnTime_;
810 char** paramStrings_;
int getBlockNodeSolution(GlobalID elemBlockID, int numNodes, const GlobalID *nodeIDs, int *offsets, double *results)
int resetSystem(double s=0.0)
int putBlockFieldNodeSolution(GlobalID elemBlockID, int fieldID, int numNodes, const GlobalID *nodeIDs, const double *estimates)
int getParameters(int &numParams, char **¶mStrings)
int setRHSScalars(int numScalars, const int *IDs, const double *scalars)
virtual ~FEI_Implementation()
int getNodalFieldSolution(int fieldID, int numNodes, const GlobalID *nodeIDs, double *results)
int putBlockNodeSolution(GlobalID elemBlockID, int numNodes, const GlobalID *nodeIDs, const int *offsets, const double *estimates)
int sumInElem(GlobalID elemBlockID, GlobalID elemID, const GlobalID *elemConn, const double *const *elemStiffness, const double *elemLoad, int elemFormat)
int loadElemBCs(int numElems, const GlobalID *elemIDs, int fieldID, const double *const *alpha, const double *const *beta, const double *const *gamma)
FEI_Implementation(fei::SharedPtr< LibraryWrapper > libWrapper, MPI_Comm comm, int masterRank=0)
int loadNodeBCs(int numNodes, const GlobalID *nodeIDs, int fieldID, const int *offsetsIntoField, const double *prescribedValues)
int getNodalSolution(int numNodes, const GlobalID *nodeIDs, int *offsets, double *results)
int initSlaveVariable(GlobalID slaveNodeID, int slaveFieldID, int offsetIntoSlaveField, int numMasterNodes, const GlobalID *masterNodeIDs, const int *masterFieldIDs, const double *weights, double rhsValue)
int iterations(int &itersTaken) const
int setIDLists(int numMatrices, const int *matrixIDs, int numRHSs, const int *rhsIDs)
int getBlockFieldNodeSolution(GlobalID elemBlockID, int fieldID, int numNodes, const GlobalID *nodeIDs, double *results)
int getNumElemBlocks(int &numElemBlocks) const
int sumInElemMatrix(GlobalID elemBlockID, GlobalID elemID, const GlobalID *elemConn, const double *const *elemStiffness, int elemFormat)
int initCRPen(int numCRNodes, const GlobalID *CRNodes, const int *CRFields, int &CRID)
int version(const char *&versionString)
int initCRMult(int numCRNodes, const GlobalID *CRNodes, const int *CRFields, int &CRID)
int getEqnNumbers(GlobalID ID, int idType, int fieldID, int &numEqns, int *eqnNumbers)
int resetInitialGuess(double s=0.0)
int sumInElemRHS(GlobalID elemBlockID, GlobalID elemID, const GlobalID *elemConn, const double *elemLoad)
int sumIntoRHS(int IDType, int fieldID, int numIDs, const GlobalID *IDs, const double *rhsEntries)
int initElemBlock(GlobalID elemBlockID, int numElements, int numNodesPerElement, const int *numFieldsPerNode, const int *const *nodalFieldIDs, int numElemDofFieldsPerElement, const int *elemDOFFieldIDs, int interleaveStrategy)
int setSolveType(int solveType)
int getNumBlockActEqns(GlobalID blockID, int &numEqns) const
int loadComplete(bool applyBCs=true, bool globalAssemble=true)
int getBlockNodeIDList(GlobalID elemBlockID, int numNodes, GlobalID *nodeIDs)
int getBlockElemSolution(GlobalID elemBlockID, int numElems, const GlobalID *elemIDs, int &numElemDOFPerElement, double *results)
int initElem(GlobalID elemBlockID, GlobalID elemID, const GlobalID *elemConn)
int getCRMultIDList(int numMultCRs, int *multIDs)
int setCurrentRHS(int rhsID)
int getNumEqnsPerElement(GlobalID blockID, int &numEqns) const
int getBlockElemIDList(GlobalID elemBlockID, int numElems, GlobalID *elemIDs)
int cumulative_cpu_times(double &initTime, double &loadTime, double &solveTime, double &solnReturnTime)
int putBlockElemSolution(GlobalID elemBlockID, int numElems, const GlobalID *elemIDs, int dofPerElem, const double *estimates)
int putNodalFieldData(int fieldID, int numNodes, const GlobalID *nodeIDs, const double *nodeData)
int parameters(int numParams, const char *const *paramStrings)
int initFields(int numFields, const int *fieldSizes, const int *fieldIDs, const int *fieldTypes=NULL)
int getNumCRMultipliers(int &numMultCRs)
int getNumNodesPerElement(GlobalID blockID, int &nodesPerElem) const
int putIntoRHS(int IDType, int fieldID, int numIDs, const GlobalID *IDs, const double *rhsEntries)
int loadCRPen(int CRID, int numCRNodes, const GlobalID *CRNodes, const int *CRFields, const double *CRWeights, double CRValue, double penValue)
int getCRMultipliers(int numCRs, const int *CRIDs, double *multipliers)
int getNumBlockElements(GlobalID blockID, int &numElems) const
int resetMatrix(double s=0.0)
int initSharedNodes(int numSharedNodes, const GlobalID *sharedNodeIDs, const int *numProcsPerNode, const int *const *sharingProcIDs)
int getNumSolnParams(GlobalID nodeID, int &numSolnParams) const
int getNumLocalNodes(int &numNodes)
int loadCRMult(int CRID, int numCRNodes, const GlobalID *CRNodes, const int *CRFields, const double *CRWeights, double CRValue)
int getLocalNodeIDList(int &numNodes, GlobalID *nodeIDs, int lenNodeIDs)
int putCRMultipliers(int numMultCRs, const int *CRIDs, const double *multEstimates)
int setMatScalars(int numScalars, const int *IDs, const double *scalars)
int resetRHSVector(double s=0.0)
int getFieldSize(int fieldID, int &numScalars)
int residualNorm(int whichNorm, int numFields, int *fieldIDs, double *norms)
int getNumBlockElemDOF(GlobalID blockID, int &DOFPerElem) const
int getNumBlockActNodes(GlobalID blockID, int &numNodes) const
int setCurrentMatrix(int matID)