main(int argc, char *argv[]) { /* init modem */ outportb(com_base + lc,0x83); /* Set baud rate, No parity, 8 bits */ outportb(com_base + dll,96); /* 1200 baud */ outportb(com_base + dlh,0); outportb(com_base + lc,no_parity); outportb(com_base + mc,0x03); /* Turn ON DTR and RTS */ /* set up modem control string */ send(scat("ATDT%s\r",paramstr(1))); }
int test_Matrix::test3() { #ifdef HAVE_FEI_FETI testData* testdata = new testData(localProc_, numProcs_); std::vector<int>& idTypes = testdata->idTypes; std::vector<int>& ids = testdata->ids; fei::SharedPtr<FiniteElementData> fedata(new FETI_DP_FiniteElementData(comm_)); std::string paramstr("debugOutput ."); char* param = const_cast<char*>(paramstr.c_str()); CHK_ERR( fedata->parameters(1, ¶m) ); fei::SharedPtr<fei::Factory> factory(new snl_fei::Factory(fedata, idTypes[0])); fei::SharedPtr<fei::VectorSpace> vectorSpacePtr = test_VectorSpace::create_VectorSpace(comm_, testdata, localProc_, numProcs_, false, false, "U_FEMat", factory); fei::SharedPtr<fei::MatrixGraph> matrixGraphPtr = test_MatrixGraph::create_MatrixGraph(testdata, localProc_, numProcs_, false, false, "U_FEMat", vectorSpacePtr, factory); CHK_ERR( matrixGraphPtr->initComplete() ); fei::SharedPtr<fei::Vector> vec_fed = factory->createVector(vectorSpacePtr); fei::SharedPtr<fei::Matrix> mat_fed = factory->createMatrix(matrixGraphPtr); fei::Matrix_Impl<FiniteElementData>* smat2 = dynamic_cast<fei::Matrix_Impl<FiniteElementData>*>(mat_fed.get()); if (smat2 == NULL) { ERReturn(-1); } int blockID=0; int numIndices = matrixGraphPtr->getConnectivityNumIndices(blockID); std::vector<int> indicesArray(numIndices); int* indicesPtr = &indicesArray[0]; int checkNumIndices = 0; CHK_ERR( matrixGraphPtr->getConnectivityIndices(blockID, 0, numIndices, indicesPtr, checkNumIndices) ); std::vector<double> data(ids.size(), 1.0); double* dptr = &data[0]; std::vector<double*> coefPtrs(ids.size(), dptr); CHK_ERR( mat_fed->sumIn(blockID, 0, &coefPtrs[0]) ); CHK_ERR( vec_fed->sumIn(blockID, 0, &data[0]) ); CHK_ERR( mat_fed->gatherFromOverlap() ); CHK_ERR( fedata->loadComplete() ); delete testdata; MPI_Barrier(comm_); #endif //HAVE_FEI_FETI return(0); }