16 #ifdef HAVE_FEI_AZTECOO
25 #define fei_file "test_FEI_Impl.cpp"
56 const double*
const* coefs1,
57 const double*
const* coefs2)
59 for(
int i=0; i<n; ++i) {
60 for(
int j=0; j<n; ++j) {
61 double diff = coefs1[i][j] - coefs2[i][j];
62 if (diff > 1.e-20 || diff < -1.e-20) {
76 #ifdef HAVE_FEI_AZTECOO
83 std::string param0(
"name test1");
85 osstr <<
"debugOutput ";
86 if (
path_.empty()) osstr <<
".";
89 std::string param1 = osstr.str();
92 char** params =
new char*[numParams];
93 params[0] =
const_cast<char*
>(param0.c_str());
94 params[1] =
const_cast<char*
>(param1.c_str());
105 1, &(testdata->
ids[0])) );
111 int numNodesPerElem = testdata->
ids.size();
112 std::vector<int> numFieldsPerNode(numNodesPerElem, 1);
113 std::vector<int*>nodalFieldIDs(numNodesPerElem, &(testdata->
fieldIDs[0]));
118 &numFieldsPerNode[0],
126 &(testdata->
ids[0])) );
128 std::vector<int*> sharingProcs2D(testdata->
sharedIDs.size());
139 &sharingProcs2D[0]) );
144 std::vector<double> rhsData(testdata->
ids.size(), 1.0);
154 testdata->
ids.size(),
160 int BCFieldID = testdata->
fieldIDs[0];
161 double* values =
new double[numBCNodes];
162 int* offsetsIntoField =
new int[numBCNodes];
163 for(
int ii=0; ii<numBCNodes; ++ii) {
165 offsetsIntoField[ii] = 0;
169 offsetsIntoField, values) );
171 delete [] offsetsIntoField;
176 int numActiveNodes = 0;
178 if (numActiveNodes != (
int)testdata->
ids.size()) {
185 int totalFieldSize = 0;
186 for(
int ii=0; ii<(int)testdata->
fieldSizes.size(); ++ii) {
190 double* soln =
new double[numActiveNodes*totalFieldSize];
191 int* offsets =
new int[numActiveNodes+1];
197 delete [] localNodes;
204 double initTime, loadTime, solveTime, solnReturnTime;
220 std::string param0(
"name test1");
222 osstr <<
"debugOutput ";
223 if (
path_.empty()) osstr <<
".";
226 std::string param1 = osstr.str();
229 char** params =
new char*[numParams];
230 params[0] =
const_cast<char*
>(param0.c_str());
231 params[1] =
const_cast<char*
>(param1.c_str());
242 1, &(testdata->
ids[0])) );
247 int numNodesPerElem = testdata->
ids.size();
248 std::vector<int> numFieldsPerNode(numNodesPerElem, 1);
249 std::vector<int*>nodalFieldIDs(numNodesPerElem, &(testdata->
fieldIDs[0]));
254 &numFieldsPerNode[0],
262 &(testdata->
ids[0])) );
264 std::vector<int*> sharingProcs2D(testdata->
sharedIDs.size());
275 &sharingProcs2D[0]) );
280 std::vector<double> rhsData(testdata->
ids.size(), 1.0);
293 int BCFieldID = testdata->
fieldIDs[0];
294 double* values =
new double[numBCNodes];
295 int* offsetsIntoField =
new int[numBCNodes];
296 for(ii=0; ii<numBCNodes; ++ii) {
298 offsetsIntoField[ii] = 0;
302 offsetsIntoField, values) );
305 delete [] offsetsIntoField;
309 int numActiveNodes = 0;
311 if (numActiveNodes != (
int)testdata->
ids.size()) {
318 int totalFieldSize = 0;
319 for(ii=0; ii<(int)testdata->
fieldSizes.size(); ++ii) {
323 double* soln =
new double[numActiveNodes*totalFieldSize];
324 int* offsets =
new int[numActiveNodes+1];
330 delete [] localNodes;
337 double initTime, loadTime, solveTime, solnReturnTime;
int getNumLocalNodes(int &numNodes)
std::vector< int > fieldSizes
int setIDLists(int numMatrices, const int *matrixIDs, int numRHSs, const int *rhsIDs)
std::vector< int > fieldIDs
int initFields(int numFields, const int *fieldSizes, const int *fieldIDs, const int *fieldTypes=NULL)
std::vector< int > sharedIDs
int getFieldSize(int fieldID, int &numScalars)
int setCurrentMatrix(int matrixID)
int cumulative_cpu_times(double &initTime, double &loadTime, double &solveTime, double &solnReturnTime)
int setCurrentRHS(int rhsID)
int parameters(int numParams, const char *const *paramStrings)
int loadComplete(bool applyBCs=true, bool globalAssemble=true)
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 initSharedNodes(int numSharedNodes, const GlobalID *sharedNodeIDs, const int *numProcsPerNode, const int *const *sharingProcIDs)
int resetInitialGuess(double s=0.0)
int setMatScalars(int numScalars, const int *IDs, const double *scalars)
std::vector< int > sharingProcs
int compareCoefs(int n, const double *const *coefs1, const double *const *coefs2)
test_FEI_Impl(MPI_Comm comm)
int putIntoRHS(int IDType, int fieldID, int numIDs, const GlobalID *IDs, const double *coefficients)
std::vector< int > numSharingProcsPerID
int initElem(GlobalID elemBlockID, GlobalID elemID, const GlobalID *elemConn)
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)
#define FEI_OSTRINGSTREAM