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


C++ Flow::setFID方法代码示例

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


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

示例1: main


//.........这里部分代码省略.........

    cout << "\tBuilding Particle List" << endl;

	ParticleContainer flowXParticles( UberMesh.flowField[0], num_X_planar_flows, STEPSIZE );
	ParticleContainer flowYParticles( UberMesh.flowField[1], num_Y_planar_flows, STEPSIZE );
	ParticleContainer flowZParticles( UberMesh.flowField[2], num_Z_planar_flows, STEPSIZE );

	ParticleContainer* flowParticles[3] = { &flowXParticles, &flowYParticles, &flowZParticles };
	long int numFlows[3] = { num_X_planar_flows, num_Y_planar_flows, num_Z_planar_flows };

	cout << "\tGenerating Precomputed Flow Map" << endl;
	double start,end;

	GET_TIME( start );

	for( int d = 0; d < 3; d++ )
	{
		#pragma omp parallel for
		for( long int i = 0; i < numFlows[d]; i++ )
		{
			Flow* flow = &UberMesh.flowField[d][i];
			long int cellID = flow->cellID;
			if( cellID != -1 )
			{
				double cbb[6];
				UberMesh.getCellBounds( cellID, cbb );

				Particle part = flowParticles[d]->particle[i];

				//cerr << "Particle Cell Advection: " << d << " " << i << endl;
				UberMesh.EulerCellAdvection( cellID, 100.0, cbb, part );

				flow->out.setPoint( part.x, part.y, part.z, part.t );
				flow->setFID( cbb );
			}
		}
	}

	GET_TIME( end );

	cout << "\t\tTime To Compute FlowMap: " << end-start << " (seconds)" << endl;

	cout << "\tComputing Acceptable flows" << endl;
	long int num_accepted = UberMesh.computeAllAcceptableFlows();

	cout << "[----------- END -----------]" << endl;

	if( ADVECT_PARTICLES != 0 )
	{
		cout << "Building Advection List" << endl;

		int cbe = 100;

		long int numParticles = 1;
		Particle* advectionList;

		if (ADVECT_PARTICLES == 1 )
			BuildParticleContainerOne( advectionList, STEPSIZE );
		else if (ADVECT_PARTICLES == 2 )
		{
			numParticles = 2;
			BuildParticleContainerTwo( advectionList, STEPSIZE );
		}
		else if (ADVECT_PARTICLES == 3 )
		{
			#if DO_MPI
开发者ID:rbleile,项目名称:ParticleAdvection,代码行数:67,代码来源:Fishtank.C


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