本文整理汇总了C++中GetPot::checkVariable方法的典型用法代码示例。如果您正苦于以下问题:C++ GetPot::checkVariable方法的具体用法?C++ GetPot::checkVariable怎么用?C++ GetPot::checkVariable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GetPot
的用法示例。
在下文中一共展示了GetPot::checkVariable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dataFile
bool
BCInterfaceData::isBase( const GetPot& dataFile, const char* base, std::string& baseString )
{
baseString = dataFile( base, " " );
return dataFile.checkVariable( base );
}
示例2: dataFile
// ===================================================
// Private Methods
// ===================================================
void
MultiscaleModelFSI1D::setupGlobalData ( const std::string& fileName )
{
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 8130 ) << "MultiscaleModelFSI1D::setupGlobalData( fileName ) \n";
#endif
GetPot dataFile ( fileName );
//Global data time
M_data->setTimeData ( M_globalData->dataTime() );
//Global physical quantities
if ( !dataFile.checkVariable ( "1D_Model/PhysicalParameters/density" ) )
{
M_data->setDensity ( M_globalData->fluidDensity() );
}
if ( !dataFile.checkVariable ( "1D_Model/PhysicalParameters/viscosity" ) )
{
M_data->setViscosity ( M_globalData->fluidViscosity() );
}
if ( !dataFile.checkVariable ( "1D_Model/PhysicalParameters/venousPressure" ) )
{
M_data->setVenousPressure ( M_globalData->fluidVenousPressure() );
}
if ( !dataFile.checkVariable ( "1D_Model/PhysicalParameters/externalPressure" ) )
{
M_data->setExternalPressure ( M_globalData->solidExternalPressure() );
}
if ( !dataFile.checkVariable ( "1D_Model/PhysicalParameters/densityWall" ) )
{
M_data->setDensityWall ( M_globalData->solidDensity() );
}
if ( !dataFile.checkVariable ( "1D_Model/PhysicalParameters/poisson" ) )
{
M_data->setPoisson ( M_globalData->solidPoissonCoefficient() );
}
if ( !dataFile.checkVariable ( "1D_Model/PhysicalParameters/young" ) )
{
M_data->setYoung ( M_globalData->solidYoungModulus() );
}
//After changing some parameters we need to update the coefficients
M_data->updateCoefficients();
}