本文整理汇总了C++中TextParser::getInspectedVector方法的典型用法代码示例。如果您正苦于以下问题:C++ TextParser::getInspectedVector方法的具体用法?C++ TextParser::getInspectedVector怎么用?C++ TextParser::getInspectedVector使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextParser
的用法示例。
在下文中一共展示了TextParser::getInspectedVector方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReadDfiProc
// #################################################################
//
void DfiInfo::ReadDfiProc(string fname)
{
TextParser tpCntl;
string str;
string label,label_base,label_leaf;
int ct;
int nnode=0;
int iv[3];
REAL_TYPE v[3];
//入力ファイルをセット
int ierror = tpCntl.read(fname);
if ( ierror )
{
Hostonly_ stamped_printf("\tinput file not found '%s'\n",fname.c_str());
Exit(0);
}
//Domain
//Global_Origin
label = "/Domain/GlobalOrigin";
for (int n=0; n<3; n++) v[n]=0.0;
if ( !(tpCntl.getInspectedVector(label, v, 3 )) )
{
Hostonly_ stamped_printf("\tParsing error : fail to get '%s'\n",label.c_str());
Exit(0);
}
Global_Origin[0]=v[0];
Global_Origin[1]=v[1];
Global_Origin[2]=v[2];
//Global_Region
label = "/Domain/GlobalRegion";
for (int n=0; n<3; n++) v[n]=0.0;
if ( !(tpCntl.getInspectedVector(label, v, 3 )) )
{
Hostonly_ stamped_printf("\tParsing error : fail to get '%s'\n",label.c_str());
Exit(0);
}
Global_Region[0]=v[0];
Global_Region[1]=v[1];
Global_Region[2]=v[2];
//Global_Voxel
label = "/Domain/GlobalVoxel";
for (int n=0; n<3; n++) iv[n]=0;
if ( !(tpCntl.getInspectedVector(label, iv, 3 )) )
{
Hostonly_ stamped_printf("\tParsing error : fail to get '%s'\n",label.c_str());
Exit(0);
}
Global_Voxel[0]=iv[0];
Global_Voxel[1]=iv[1];
Global_Voxel[2]=iv[2];
//Global_Division
label = "/Domain/GlobalDivision";
for (int n=0; n<3; n++) iv[n]=0.0;
if ( !(tpCntl.getInspectedVector(label, iv, 3 )) )
{
Hostonly_ stamped_printf("\tParsing error : fail to get '%s'\n",label.c_str());
Exit(0);
}
Global_Division[0]=iv[0];
Global_Division[1]=iv[1];
Global_Division[2]=iv[2];
//MPI
//NumberOfRank
label = "/MPI/NumberOfRank";
if ( !(tpCntl.getInspectedValue(label, ct )) )
{
Hostonly_ stamped_printf("\tParsing error : fail to get '%s'\n",label.c_str());
Exit(0);
}
else {
NumberOfRank = ct;
}
//NumberOfGroup
label = "/MPI/NumberOfGroup";
if ( !(tpCntl.getInspectedValue(label, ct )) )
{
Hostonly_ stamped_printf("\tParsing error : fail to get '%s'\n",label.c_str());
Exit(0);
}
else {
NumberOfGroup = ct;
}
////RankID_in_MPIworld
//label = "/DistributedFileInfo/RankIDinMPIworld";
//.........这里部分代码省略.........