当前位置: 首页>>代码示例>>C++>>正文


C++ TPZStream类代码示例

本文整理汇总了C++中TPZStream的典型用法代码示例。如果您正苦于以下问题:C++ TPZStream类的具体用法?C++ TPZStream怎么用?C++ TPZStream使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了TPZStream类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Write

void OOPDMOwnerTask::Write (TPZStream& buf, int withclassid)
{
	{
#ifdef LOG4CXX
		stringstream sout;
		sout << "Packing Owner task for Obj " << fTag.Id() << " message type "
		<< fTag.AccessMode() << " with objptr " << (fTag.AutoPointer() != 0) << " version " << fTag.Version()
		<< " To Proc " << fTag.Proc();
		if(fTag.AutoPointer()) sout << " class id " << fTag.AutoPointer()->ClassId();
		sout << "\nTransferReqTask size " << fTransferRequests.size() << endl;
		sout << "Access Requests : ";
		std::set<OOPAccessTag>::iterator it;
		for(it = fTransferRequests.begin(); it != fTransferRequests.end(); it++)
		{
			sout << endl;
			it->ShortPrint(sout);
		}
		LOGPZ_DEBUG(logger,sout.str().c_str());
#endif
	}
	OOPDaemonTask::Write (buf, withclassid);
	fTag.Write( buf, 0);
	int size = fTransferRequests.size();
	buf.Write(&size,1);
	std::set<OOPAccessTag>::iterator it;
	for(it=fTransferRequests.begin(); it!=fTransferRequests.end(); it++)
	{
		OOPAccessTag tag(*it);
		tag.Write(buf,0);
	}
}
开发者ID:labmec,项目名称:oopar,代码行数:31,代码来源:oopdatamanager.cpp

示例2: Write

/* Saves the element data to a stream */
void TPZNullMaterial::Write(TPZStream &buf, int withclassid) const
{
	TPZMaterial::Write(buf,withclassid);
    if (fDim < 1 || fDim >3) {
        DebugStop();
    }
    buf.Write(&fDim);
}
开发者ID:labmec,项目名称:neopz,代码行数:9,代码来源:TPZNullMaterial.cpp

示例3: Read

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
    }
}
开发者ID:JoaoFelipe,项目名称:oceano,代码行数:18,代码来源:pzbndcond.cpp

示例4: ClassId

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
}
开发者ID:JoaoFelipe,项目名称:oceano,代码行数:18,代码来源:pzmattest3d.cpp

示例5: Write

void TMedonhoTask::Write(TPZStream & buf, int withclassid)
{
	LOG4CXX_INFO(logger,"Entering pack");
	OOPTask::Write(buf,withclassid);
	
	//pack start
	buf.Write (&fStart,1);
	//pack end
	buf.Write (&fEnd,1);
	/*  //pack fX  
	 TPZSaveable::WriteObjects(buf,fX);
	 //pack fY
	 TPZSaveable::WriteObjects(buf,fY);
	 //pack dot
	 buf.Write(&fDotResult,1);
	 //pack cross
	 TPZSaveable::WriteObjects(buf,fCrossResult);*/
	LOG4CXX_INFO(logger,"Exiting pack");
}
开发者ID:labmec,项目名称:oopar,代码行数:19,代码来源:tmedonhotask.cpp

示例6: Read

/* 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
}
开发者ID:labmec,项目名称:neopz,代码行数:11,代码来源:TPZNullMaterial.cpp

示例7: Read

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); */
}
开发者ID:labmec,项目名称:oopar,代码行数:19,代码来源:oopdataversion.cpp

示例8: Read

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");
}
开发者ID:labmec,项目名称:oopar,代码行数:20,代码来源:tmedonhotask.cpp

示例9: ClassId

void
OOPTask::Write (TPZStream & buf, int withclassid)
{
	TPZSaveable::Write (buf, withclassid);
	// ObjectId packing and unpacking
	fTaskId.Write (buf);
	//Logging purpose only
	buf.Write (&fProc);		// Processor where the task should be
    int updateversion = fUpdateVersions;
    buf.Write(&updateversion,1);
	// executed
	fDependRequest.Write(buf,0);//, withclassid);
#ifdef LOG4CXX
	stringstream sout;
	sout << "Writing Task ClassId: " << ClassId() << " ObjID: " << Id() << " Depend list \n";
	fDependRequest.ShortPrint( sout);
	LOGPZ_DEBUG(logger, sout.str ());
#endif
	
}
开发者ID:labmec,项目名称:oopar,代码行数:20,代码来源:ooptask.cpp

示例10: Read

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);
}
开发者ID:labmec,项目名称:neopz,代码行数:22,代码来源:pzgraphmesh.cpp

示例11: Read

/*
 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
	}
    */
}
开发者ID:JoaoFelipe,项目名称:oceano,代码行数:41,代码来源:pzmaterial.cpp

示例12: ClassId

void TPZDohrMatrix<TVar,TSubStruct >::Write( TPZStream &buf, int withclassid )
{
    SAVEABLE_STR_NOTE(buf,"TPZMatrix<TVar>::Write ()");
    TPZMatrix<TVar>::Write(buf, withclassid);
    SAVEABLE_STR_NOTE(buf,"fAssembly->Write");
    TPZPersistenceManager::WritePointer(fAssembly.operator ->(), &buf);
    SAVEABLE_STR_NOTE(buf,"fNumCoarse");
    buf.Write(&fNumCoarse);
    SAVEABLE_STR_NOTE(buf,"fNumThreads");
    buf.Write(&fNumThreads);
    typename SubsList::iterator it;
    int size = fGlobal.size();
    SAVEABLE_STR_NOTE(buf,"fGlobal.size()");
    buf.Write(&size);
    for (it=fGlobal.begin(); it != fGlobal.end(); it++) {
        SAVEABLE_STR_NOTE(buf,"fGlobal[...]");
        (*it)->Write(buf,0);
    }
    size = 0;
    int classid = ClassId();
    SAVEABLE_STR_NOTE(buf,"ClassId");
    buf.Write(&classid );
}
开发者ID:labmec,项目名称:neopz,代码行数:23,代码来源:tpzdohrmatrix.cpp

示例13:

void TPZStepSolver<TVar>::Write(TPZStream &buf, int withclassid)
{
	TPZSolver<TVar>::Write(buf, withclassid);
	fPrecond->Write(buf, 1);
	int lfSolver = fSolver;
	buf.Write(&lfSolver, 1);
	int lfDT = fDecompose;
	buf.Write(&lfDT, 1);
	buf.Write(&fNumIterations, 1);
	buf.Write(&fNumVectors, 1);
	buf.Write(&fTol, 1);
	buf.Write(&fOverRelax, 1);
	buf.Write(&fFromCurrent, 1);
	int size = fSingular.size();
	buf.Write(&size, 1);
	std::list<int>::iterator it = fSingular.begin();
	for(;it != fSingular.end(); it++)
	{
		buf.Write(&*it, 1);
	}
}
开发者ID:JoaoFelipe,项目名称:oceano,代码行数:21,代码来源:pzstepsolver.cpp

示例14: Write

void TPZYCCamClayPV::Write(TPZStream& buf, int withclassid) const {
    buf.Write(&fGamma);
    buf.Write(&fM);
    buf.Write(&fPt);
    buf.Write(&fLogHardening);
    buf.Write(&fLogBulkModulus);
    buf.Write(&fA0);
    buf.Write(&fE0);
    fER.Write(buf, withclassid);
}
开发者ID:labmec,项目名称:neopz,代码行数:10,代码来源:TPZYCCamClayPV.cpp

示例15: Read

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);
}
开发者ID:labmec,项目名称:neopz,代码行数:10,代码来源:TPZYCCamClayPV.cpp


注:本文中的TPZStream类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。