Example #1
0
void GridMaker::buildMesh1()
{
	m_grid.cutEdges();
	clearTetra();
	m_grid.countNodes();
	RedBlueRefine rbr;
	aphid::sdb::Array<aphid::sdb::Coord3, IFace > tris;
	m_grid.begin();
	while(!m_grid.end() ) {
		BccCell fCell(m_grid.coordToCellCenter(m_grid.key() ) );
		
		fCell.connectRefinedTetrahedrons(m_tets, tris, rbr, m_grid.value(), &m_grid, m_grid.key() );
		m_grid.next();
	}
	
	m_triInds.clear();
	
	tris.begin();
	while(!tris.end() ) {
	
		m_triInds.push_back(tris.key() );
		tris.next();
	}
	
	tris.clear();
}
bool CSigCreate::CreateSigStruct()
{

	//先检索出所有的手机ID,以便之后存储方便。可通过UePosition文件进行检索
	GetPhoneID();
	GetCellID(&m_cellInfo);

	ifstream fPos("UePosition.txt");
	if(!fPos)
		return false;
	string s;
	while( getline(fPos,s) )
    {
       UePosition pos;
	  if( GetUePositionPerLine(s.c_str(),&pos))
	  {//读取到一行手机数据
		  GetCoordnateInfo(&pos);
	  }
    }
	fPos.close();


	//基本结构建立,读取cell信息
	ifstream fCell("UePhyReport.txt");
	if(!fCell)
		return false;

	string str;
	while(getline(fCell,str))
	{
		UePhyReport rpt;
		GetUePhyReportPerLine(str.c_str(),&rpt);
		CellInfo* pC = GetCellInfo(rpt.nPhoneID,rpt.nID);

		if(!pC)
		{
			return false;
		}
		RangeCellInfo info;
		info.dbTime = rpt.dbTime;
		info.rsrpInfo = rpt.dbRsrp;

		pC->range.push_back(info);
//		pC->nID

		cout<< str.c_str()<<endl;
	}


	fCell.close();
	return true;

}
Example #3
0
void GridMaker::buildMesh()
{ 
	clearTetra();
	m_grid.countNodes();
	m_grid.begin();
	while(!m_grid.end() ) {
		BccCell fCell(m_grid.coordToCellCenter(m_grid.key() ) );
		
		fCell.connectTetrahedrons(m_tets, m_grid.value(), &m_grid, m_grid.key() );
		m_grid.next();
	}
}