void TPZTransform::Read(TPZStream &buf){ buf.Read(&this->fRow, 1); buf.Read(&this->fCol, 1); this->fMult.Read(buf, NULL); this->fSum.Read(buf, NULL); buf.Read(&fStore[0], 12); }
void TPZDohrMatrix<TVar, TSubStruct >::Read(TPZStream &buf, void *context ) { SAVEABLE_SKIP_NOTE(buf); TPZMatrix<TVar>::Read(buf, context); SAVEABLE_SKIP_NOTE(buf); fAssembly = TPZAutoPointerDynamicCast<TPZDohrAssembly<TVar>>(TPZPersistenceManager::GetAutoPointer(&buf)); SAVEABLE_SKIP_NOTE(buf); buf.Read(&fNumCoarse); SAVEABLE_SKIP_NOTE(buf); buf.Read(&fNumThreads); int sz; SAVEABLE_SKIP_NOTE(buf); buf.Read(&sz); for (int i=0; i<sz; i++) { TPZAutoPointer<TSubStruct > sub = new TSubStruct; SAVEABLE_SKIP_NOTE(buf); sub->Read(buf,0); fGlobal.push_back(sub); } int classid; SAVEABLE_SKIP_NOTE(buf); buf.Read(&classid ); if (classid != ClassId()) { DebugStop(); } }
void TPZArtDiff::Read(TPZStream &buf, void *context) { int ArtDiffType; buf.Read(&ArtDiffType, 1); fArtDiffType = static_cast<TPZArtDiffType>(ArtDiffType); buf.Read(&fGamma, 1); buf.Read(&fDelta, 1); buf.Read(&fCFL, 1); }
void TPZStepSolver<TVar>::Read(TPZStream &buf, void *context) { TPZSolver<TVar>::Read(buf, context); fPrecond = dynamic_cast<TPZSolver<TVar> *>(TPZSaveable::Restore(buf, context)); int lfSolver = 0; buf.Read(&lfSolver, 1); fSolver = (typename TPZMatrixSolver<TVar>::MSolver)lfSolver; int lfDT = 0; buf.Read(&lfDT, 1); fDecompose = (DecomposeType)lfDT; buf.Read(&fNumIterations, 1); buf.Read(&fNumVectors, 1); buf.Read(&fTol, 1); buf.Read(&fOverRelax, 1); buf.Read(&fFromCurrent, 1); int size = 0; buf.Read(&size, 1); fSingular.resize(size); std::list<int>::iterator it = fSingular.begin(); for(;it != fSingular.end(); it++) { buf.Read(&*it, 1); } }
void TPZConservationLaw::Read(TPZStream &buf, void *context) { TPZMaterial::Read(buf, context); buf.Read(&fDim,1); buf.Read(&fTimeStep,1); buf.Read(&fCFL,1); buf.Read(&fGamma,1); fContributionTime = Last_CT; fResidualType = Residual_RT; }
void OOPDouble::Read(TPZStream & buf, void * context){ TPZSaveable::Read(buf, context); buf.Read(&fValue); int clsid=0; buf.Read(&clsid); if(clsid!=ClassId()){ #ifdef LOG4CXX std::stringstream sout; sout << "ClassId missmatch on OOPDouble::Read"; LOGPZ_ERROR(logger,sout.str().c_str()); #endif } }
void OOPMergeMatrix::Read(TPZStream & buf, void * context){ OOPTask::Read(buf, context); int clsid = 0; buf.Read(&clsid); if(ClassId()!=clsid){ cout << "ClassId Missmatch\n"; } buf.Read(&m_SubId, 1); cout << "m_SubId " << m_SubId << endl; cout.flush(); m_Vector.Read(buf, 0); m_Vector.Print("Depois de lido" , cout, EFormatted); cout.flush(); }
void TPZGeoCloneMesh::Read(TPZStream &buf, void *context) { TPZGeoMesh::Read(buf,context); try { fGeoReference = dynamic_cast<TPZGeoMesh *>(TPZPersistenceManager::GetInstance(&buf)); buf.Read<int64_t>(fMapNodes); std::map<int64_t,int64_t> MappingElements; TPZGeoEl *gelorig, *gelcloned; buf.Read<int64_t>(MappingElements); std::map<int64_t,int64_t>::iterator it = MappingElements.begin(); while(it != MappingElements.end()) { gelorig = fGeoReference->ElementVec()[it->first]; gelcloned = ElementVec()[it->second]; fMapElements.insert(std::make_pair(gelorig,gelcloned)); it++; } // Writing index of the elements in fReferenceElement TPZStack<int64_t> RefElements; buf.Read(RefElements); for(int64_t ii=0;ii<RefElements.size();ii++) { fReferenceElement.push_back(fGeoReference->ElementVec()[RefElements[ii]]); } // Reading index of the elements in fPatchElement std::set<int> PatchElements; buf.Read(PatchElements); std::set<int>::iterator itpatch = PatchElements.begin(); while(itpatch != PatchElements.end()) { fPatchElements.insert(fGeoReference->ElementVec()[*itpatch]); itpatch++; } int64_t indexroot; buf.Read(&indexroot); fGeoRoot = ElementVec()[indexroot]; } catch(const exception& e) { cout << "Exception catched! " << e.what() << std::endl; cout.flush(); } }
void TPZBndCond::Read(TPZStream &buf, void *context) { TPZMaterial::Read(buf, context); buf.Read(&fType, 1); fBCVal1.Read(buf, 0); fBCVal2.Read(buf, 0); int MatId; buf.Read(&MatId,1); TPZCompMesh * pCM = (TPZCompMesh * )/*dynamic_cast<TPZCompMesh *>*/(context); fMaterial = pCM->FindMaterial(MatId); if(!fMaterial) { std::cout << " reading a boundary condition without material object!!\n"; #ifdef LOG4CXX LOGPZ_FATAL(logger,"reading a boundary condition without material object!!"); #endif } }
void TPZMaterialTest3D::Read(TPZStream &buf, void *context) { TPZMaterial::Read(buf,context); fXf.Read( buf,0 ); buf.Read( &geq3, 1); #ifdef DEBUG2 int classid = -1; buf.Read( &classid,1 ); if( classid != ClassId() ) { std::stringstream sout; sout << "Error restoring object " << __PRETTY_FUNCTION__ << " waiting for ClassId()= " << ClassId() << " restored : " << classid; LOGPZ_ERROR( logger,sout.str().c_str() ); } #endif }
void OOPDataVersion::Read (TPZStream & buf, void * context) { int aux = 0, size = 0; buf.Read (&size); fVersion.resize (0); int i; for (i = 0; i < size; i++) { buf.Read (&aux); fVersion.push_back (aux); } buf.Read (&size); fLevelCardinality.resize (0); for (i = 0; i < size; i++) { buf.Read (&aux); fLevelCardinality.push_back (aux); } // vector<int>::iterator ivc = aux_vc.begin(); /* buf->UpkInt(&aux_vc[0],aux); i->fVersion.SetData(aux_vc,aux_vl); */ }
/* Reads the element data from a stream */ void TPZNullMaterial::Read(TPZStream &buf, void *context) { TPZMaterial::Read(buf,context); buf.Read(&fDim); #ifdef PZDEBUG if (fDim < 1 || fDim >3) { DebugStop(); } #endif }
void TMedonhoTask::Read(TPZStream & buf, void * context) { LOG4CXX_INFO(logger,"Entering unpack"); OOPTask::Read(buf,context); //unpack start buf.Read (&fStart,1); //pack end buf.Read (&fEnd,1); // //unpack fX // TPZSaveable::ReadObjects(buf,fX); // //unpack fY // TPZSaveable::ReadObjects(buf,fY); // //unpack dot // buf.Read(&fDotResult,1); // //unpack cross // TPZSaveable::ReadObjects(buf,fCrossResult); LOG4CXX_INFO(logger,"Exiting unpack"); }
void OOPTask::Read (TPZStream & buf, void *context) { TPZSaveable::Read (buf, context); fTaskId.Read (buf); // Finished OOPObjectId unpacking //Logging purpose only buf.Read (&fProc); int updateversion; buf.Read(&updateversion); fUpdateVersions = (updateversion != 0); fDependRequest.Read (buf, context); #ifdef LOG4CXX stringstream sout; sout << "Read Task ClassId: " << ClassId() << " ObjID:" << Id(); fDependRequest.ShortPrint( sout); LOGPZ_DEBUG(logger, sout.str().c_str()); #endif }
/* Reads the element data from a stream */ void TPZMaterial::Read(TPZStream &buf, void *context) { TPZSaveable::Read(buf,context); buf.Read(&fId,1); buf.Read(&gBigNumber,1); TPZSaveable *sav = TPZSaveable::Restore(buf, context); { TPZFunction *func = dynamic_cast<TPZFunction *>(sav); if(!func) { DebugStop(); } fForcingFunction = func; } /* int forcingIdx = -1; buf.Read( &forcingIdx,1 ); #ifdef DEBUG2 { std::stringstream sout; sout << " Read forcing function index " << forcingIdx; LOGPZ_DEBUG( logger,sout.str().c_str() ); } #endif if ( forcingIdx > -1 && forcingIdx < GFORCINGVEC.NElements() ) { fForcingFunction = GFORCINGVEC[ forcingIdx ] ; #ifdef DEBUG2 { std::stringstream sout; sout << " Seting forcing function index " << forcingIdx; LOGPZ_DEBUG( logger,sout.str().c_str() ); } #endif } */ }
void TPZYCCamClayPV::Read(TPZStream& buf, void* context) { buf.Read(&fGamma); buf.Read(&fM); buf.Read(&fPt); buf.Read(&fLogHardening); buf.Read(&fLogBulkModulus); buf.Read(&fA0); buf.Read(&fE0); fER.Read(buf, context); }
/** * Unpacks the object class_id * @param buf A pointer to TSendStorage class to be unpacked. */ void TContribution::Read (TPZStream & buf, void * context){ fDestinationMesh.Read(buf); int i,sz; buf.Read(&sz); fFrom.resize(sz); for(i=0; i<sz; i++) buf.Read(&fFrom[i]); buf.Read(&sz); fTo.resize(sz); for(i=0; i<sz; i++) buf.Read(&fTo[i]); buf.Read(&sz); fLocalIndices.resize(sz); for(i=0; i<sz; i++) { int lsz,il; buf.Read(&lsz); fLocalIndices[i].resize(lsz); for(il=0; il<lsz; il++) { buf.Read(&fLocalIndices[i][il]); } } buf.Read(&fNContributions); }
void TPZGraphMesh::Read(TPZStream& buf, void* context) { fCompMesh = dynamic_cast<TPZCompMesh *>(TPZPersistenceManager::GetInstance(&buf)); fGeoMesh = dynamic_cast<TPZGeoMesh *>(TPZPersistenceManager::GetInstance(&buf)); TPZManVector<int> mat_ids; buf.Read(mat_ids); for (auto matid: mat_ids) { fMaterialIds.insert(matid); } buf.Write(&fDimension); buf.Read(&fDimension); buf.ReadPointers(fElementList); fNodeMap.Read(buf, context); buf.Read(&fResolution); int fStyleInt; buf.Read(&fStyleInt); fStyle = TPZDrawStyle(fStyleInt); buf.Read(&fFileName); this->SetFileName(fFileName); ///Forcing to close the previously open file, if any. buf.Read(fScalarNames); buf.Read(fVecNames); buf.Read(fTensorNames); }
void OOPDMOwnerTask::Read (TPZStream & buf, void * context) { OOPDaemonTask::Read (buf, context); fTag.Read( buf, context); int size; buf.Read(&size,1); #ifdef LOG4CXX { stringstream sout; sout << "Tag Received "; fTag.ShortPrint( sout); sout << "TransferReqTask size " << size << "\n"; LOGPZ_DEBUG(DaemonLogger, sout.str().c_str()); } #endif int i; for(i=0; i<size; i++) { OOPAccessTag tag; tag.Read(buf,0); fTransferRequests.insert(tag); } #ifdef LOG4CXX { stringstream sout; sout << "<--Receiveing OwnerTask with Tag:"; fTag.ShortPrint( sout); sout << "\nAccess Requests : "; std::set<OOPAccessTag>::iterator it; for(it = fTransferRequests.begin(); it != fTransferRequests.end(); it++) { sout << endl; it->ShortPrint(sout); } LOGPZ_DEBUG(DaemonLogger, sout.str().c_str()); } #endif }
/** @brief Reads the element data from a stream */ void TPZLagrangeMultiplier::Read(TPZStream &buf, void *context) { TPZDiscontinuousGalerkin::Read(buf, context); buf.Read(&fNStateVariables); }