• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ debugStream函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: celerity0

// ===================================================
// Conversion Methods
// ===================================================
void
OneDFSIPhysicsLinear::fromUToW ( Real& W1, Real& W2, const Real& U1, const Real& U2, const UInt& iNode ) const
{
    W1 = U2 + celerity0 ( iNode ) * ( U1 - M_dataPtr->area0 ( iNode ) );

    W2 = U2 - celerity0 ( iNode ) * ( U1 - M_dataPtr->area0 ( iNode ) );

#ifdef HAVE_LIFEV_DEBUG
    debugStream ( 6320 ) << "[OneDFSIModel_Physics_Linear::fromUToW] Q " << U2 << "\n";
    debugStream ( 6320 ) << "[OneDFSIModel_Physics_Linear::fromUToW] W1 " << W1 << "\n";
    debugStream ( 6320 ) << "[OneDFSIModel_Physics_Linear::fromUToW] W2 " << W2 << "\n";
    debugStream ( 6320 ) << "[OneDFSIModel_Physics_Linear::fromUToW] celerity " << celerity0 ( iNode ) << "\n";
    debugStream ( 6320 ) << "[OneDFSIModel_Physics_Linear::fromUToW] ( _U1 - area0( iNode ) ) " << ( U1 - M_dataPtr->area0 ( iNode ) ) << "\n";
#endif
}
开发者ID:Danniel-UCAS,项目名称:lifev,代码行数:18,代码来源:OneDFSIPhysicsLinear.cpp


示例2: debugStream

void
FSISolver::iterate()
{
    debugStream( 6220 ) << "============================================================\n";
    debugStream( 6220 ) << "Solving FSI at time " << M_data->dataFluid()->dataTime()->time() << " with FSI: " << M_data->method()  << "\n";
    debugStream( 6220 ) << "============================================================\n";

    // Update the system
    M_oper->updateSystem( );

    // We extract a copy to the solution (\todo{uselessly})
    vectorPtr_Type lambda(new vector_Type(M_oper->solution()));
    //M_oper->solutionPtr(lambda);//copy of a shared_ptr

    // the newton solver
    UInt maxiter = M_data->maxSubIterationNumber();
    UInt status = NonLinearRichardson( *lambda,
                                       *M_oper,
                                       M_data->absoluteTolerance(),
                                       M_data->relativeTolerance(),
                                       maxiter,
                                       M_data->errorTolerance(),
                                       M_data->NonLinearLineSearch(),
                                       M_out_res,
                                       M_data->dataFluid()->dataTime()->time() );

    // We update the solution
    M_oper->updateSolution( *lambda );

    if (status == EXIT_FAILURE)
    {
        std::ostringstream __ex;
        __ex << "FSISolver::iterate ( " << M_data->dataFluid()->dataTime()->time() << " ) Inners iterations failed to converge\n";
        throw std::logic_error( __ex.str() );
    }
    else
    {
        //M_oper->displayer().leaderPrint("FSI-  Number of inner iterations:              ", maxiter, "\n" );
        if (M_epetraWorldComm->MyPID() == 0)
        {
            M_out_iter << M_data->dataFluid()->dataTime()->time() << " " << maxiter;
        }
    }

    debugStream( 6220 ) << "FSISolver iteration at time " << M_data->dataFluid()->dataTime()->time() << " done\n";
    debugStream( 6220 ) << "============================================================\n";
    std::cout << std::flush;
}
开发者ID:nuraiman,项目名称:lifev,代码行数:48,代码来源:FSISolver.cpp


示例3: debugStream

void
MultiscaleModelFSI1D::buildModel()
{

#ifdef HAVE_LIFEV_DEBUG
    debugStream ( 8130 ) << "MultiscaleModelFSI1D::buildModel() \n";
#endif

    // Display data
    //    if ( M_comm->MyPID() == 0 )
    //        M_data->showMe();

    M_solver->buildConstantMatrices();

    // Update previous solution
    copySolution ( *M_solution, *M_solution_tn );

#ifdef JACOBIAN_WITH_FINITEDIFFERENCE
    if ( M_couplings.size() > 0 )
    {
        updateLinearModel();
    }
#endif

}
开发者ID:hamed20,项目名称:lifev,代码行数:25,代码来源:MultiscaleModelFSI1D.cpp


示例4: BCh_monolithicFluid

FSIOperator::fluidBchandlerPtr_Type BCh_monolithicFluid (FSIOperator& _oper, bool const& isOpen = true)
{
    // Boundary conditions for the fluid velocity
    debugStream ( 10000 ) << "Boundary condition for the fluid\n";

    if (! _oper.isFluid() )
    {
        return FSIOperator::fluidBchandlerPtr_Type();
    }

    FSIOperator::fluidBchandlerPtr_Type BCh_fluid ( new FSIOperator::fluidBchandler_Type );

    BCFunctionBase bcf      (fZero);
    BCFunctionBase in_flow  (/*uInterpolated*/u2normal/*aortaPhisPress*/);
    //    BCFunctionBase out_flow (fZero);
    //BCFunctionBase in_flow  (LumpedHeart::outPressure);

    BCFunctionBase out_press (FlowConditions::outPressure0);
    BCFunctionBase bcfw0 (w0);

    // if(!isOpen)
    //   BCh_fluid->addBC("InFlow" , INLET,  Natural, Full, bcf,3);


    BCh_fluid->addBC ("OutFlow", OUTLET,  Natural,  Normal, out_press);
    //BCh_fluid->addBC("OutFlow", INOUTEDGE,  EssentialEdges,  Full, bcf,3);

    return BCh_fluid;
}
开发者ID:chknipp,项目名称:lifev,代码行数:29,代码来源:boundaryConditions.hpp


示例5: debugStream

// ===================================================
// Methods
// ===================================================
const Real&
Parser::evaluate ( const ID& id )
{
    if ( M_evaluate )
    {
        M_results.clear();
        stringIterator_Type start, end;

        for ( UInt i (0); i < M_strings.size(); ++i )
        {
            start = M_strings[i].begin();
            end   = M_strings[i].end();
#ifdef HAVE_BOOST_SPIRIT_QI
#ifdef ENABLE_SPIRIT_PARSER
            qi::phrase_parse ( start, end, M_calculator, ascii::space, M_results );
#else
            std::cerr << "!!! ERROR: The Boost Spirit parser has been disabled !!!" << std::endl;
            std::exit ( EXIT_FAILURE );
#endif /* ENABLE_SPIRIT_PARSER */
#else
            std::cerr << "!!! ERROR: Boost version < 1.41 !!!" << std::endl;
            std::exit ( EXIT_FAILURE );
#endif
        }
        M_evaluate = false;
    }

#ifdef HAVE_LIFEV_DEBUG
    debugStream ( 5030 ) << "Parser::evaluate          results[ " << id << "]: " << M_results[id] << "\n";
#endif

    return M_results[id];
}
开发者ID:Danniel-UCAS,项目名称:lifev,代码行数:36,代码来源:Parser.cpp


示例6: debugStream

void
MultiscaleModelMultiscale::updateModel()
{

#ifdef HAVE_LIFEV_DEBUG
    debugStream ( 8110 ) << "MultiscaleModelMultiscale::updateModel() \n";
#endif

    for ( multiscaleModelsContainerConstIterator_Type i = M_modelsList.begin(); i != M_modelsList.end(); ++i )
    {
        ( *i )->updateModel();
    }

    for ( multiscaleCouplingsContainerConstIterator_Type i = M_couplingsList.begin(); i != M_couplingsList.end(); ++i )
    {
        ( *i )->updateCoupling();

        if ( M_algorithm->type() != Explicit )
        {
            ( *i )->extrapolateCouplingVariables();
        }
        else
        {
            ( *i )->initializeCouplingVariables();
        }
    }
}
开发者ID:hamed20,项目名称:lifev,代码行数:27,代码来源:MultiscaleModelMultiscale.cpp


示例7: BCh_monolithicFluid

FSIOperator::fluidBchandlerPtr_Type BCh_monolithicFluid (FSIOperator& _oper, bool const& /*isOpen=true*/)
{
    // Boundary conditions for the fluid velocity
    debugStream ( 10000 ) << "Boundary condition for the fluid\n";

    if (! _oper.isFluid() )
    {
        return FSIOperator::fluidBchandlerPtr_Type();
    }

    FSIOperator::fluidBchandlerPtr_Type BCh_fluid ( new FSIOperator::fluidBchandler_Type );

    BCFunctionBase bcf      (fZero);
    BCFunctionBase in_flow  (uInterpolated);
    //    BCFunctionBase out_flow (fZero);

    BCFunctionBase out_press3 (FlowConditions::outPressure0);

    BCFunctionBase InletVect (aneurismFluxInVectorial);
    //BCFunctionBase bcfw0 (w0);

    //Inlets
    BCh_fluid->addBC ("InFlow" , INLET,  EssentialVertices, Full, InletVect, 3);

    //Outlets

    //Absorbing BC seemed not to work
    //Absorbing BC on outlet 2and3 caused instabilities
    BCh_fluid->addBC ("out3", OUTLET, Natural,  Normal, out_press3);
    //BCh_fluid->addBC("out3", OUTLET, Natural,  Normal, bcf);

    return BCh_fluid;
}
开发者ID:chknipp,项目名称:lifev,代码行数:33,代码来源:boundaryConditions.hpp


示例8: unregisterProduct

    /**
     * Unregister a product
     *
     * @param id
     * @sa registerProduct
     * @return true if unregistration went fine, false otherwise
     */
    bool unregisterProduct( const identifier_Type& id )
    {
#ifdef HAVE_LIFEV_DEBUG
        debugStream( 2200 ) << "Unregistered type with id : " << id << "\n";
#endif
        return M_associations.erase( id ) == 1;
    }
开发者ID:nuraiman,项目名称:lifev,代码行数:14,代码来源:Factory.hpp


示例9: BCh_solidInvLin

FSIOperator::solidBchandlerPtr_Type BCh_solidInvLin (FSIOperator& _oper)
{

    if (! _oper.isSolid() )
    {
        return FSIOperator::solidBchandlerPtr_Type();
    }

    // Boundary conditions for the solid displacement
    debugStream ( 10000 ) << "Boundary condition for the inverse linear solid\n";
    FSIOperator::solidBchandlerPtr_Type BCh_solidLinInv ( new FSIOperator::solidBchandler_Type );

    BCFunctionBase bcf (fZero);

    BCh_solidLinInv->addBC ("Base",      2, Essential, Full, bcf,  3);
    BCh_solidLinInv->addBC ("EdgesIn",    20, EssentialVertices, Full, bcf,  3);

    //     if (_oper.method() == "steklovPoincare")
    //     {
    //         steklovPoincare *SPOper = dynamic_cast<steklovPoincare *>(&_oper);
    //         SPOper->setSolidInvLinInterfaceStress((LifeV::Vector&) _oper.residual());

    //         BCh_solidLinInv->addBC("Interface", 100, Natural, Full,
    //                                *SPOper->bcvSolidInvLinInterfaceStress(), 3);
    //     }
    //     else
    //     {
    //         exactJacobian  *EJOper = dynamic_cast<exactJacobian *>(&_oper);
    //         EJOper->setDerFluidLoadToStructure(_oper.fluid().residual());
    //         BCh_solidLinInv->addBC("Interface", 1, Natural,   Full,
    //                             *EJOper->bcvDerFluidLoadToStructure(), 3);
    //     }

    return BCh_solidLinInv;
}
开发者ID:Danniel-UCAS,项目名称:lifev,代码行数:35,代码来源:boundaryConditions.hpp


示例10: registerProduct

    /**
     * Register a product.
     *
     * A product is composed of an identifier (typically a
     * std::string) and a functor that will create the associated
     * object.
     *
     * @param id identifier for the object to be registered
     * @param creator the functor that will create the registered
     * object
     *
     * @return true if registration went fine, false otherwise
     */
    bool registerProduct( const identifier_Type& id, creator_Type creator )
    {
#ifdef HAVE_LIFEV_DEBUG
        debugStream( 2200 ) << "Registered type with id : " << id << "\n";
#endif
        return M_associations.insert( typename productId_Type::value_type( id, creator ) ).second;
    }
开发者ID:nuraiman,项目名称:lifev,代码行数:20,代码来源:Factory.hpp


示例11: BCh_monolithicSolid

FSIOperator::solidBchandlerPtr_Type BCh_monolithicSolid (FSIOperator& _oper)
{

    if (! _oper.isSolid() )
    {
        return FSIOperator::solidBchandlerPtr_Type();
    }

    // Boundary conditions for the solid displacement
    debugStream ( 10000 ) << "Boundary condition for the solid\n";
    FSIOperator::solidBchandlerPtr_Type BCh_solid ( new FSIOperator::solidBchandler_Type );

    BCFunctionBase bcf (fZero);

    BCh_solid->addBC ("Top",   RING, Essential, Full, bcf,  3);
    BCh_solid->addBC ("Base",  RING2, Essential, Full, bcf,  3);

    aortaVelIn::S_timestep = _oper.dataFluid()->dataTime()->timeStep();
    BCFunctionBase hyd (fZero);
    BCFunctionBase young (E);
    //robin condition on the outer wall
    _oper.setRobinOuterWall (hyd, young);
    BCh_solid->addBC ("OuterWall", OUTERWALL, Robin, Normal, _oper.bcfRobinOuterWall() );

    return BCh_solid;
}
开发者ID:chknipp,项目名称:lifev,代码行数:26,代码来源:boundaryConditions.hpp


示例12: bbReadFloat

float bbReadFloat(bbStream* s)
{
	if (debug)
		debugStream(s);
	float n = 0;
	s->read((char*)&n, 4);
	return n;
}
开发者ID:Xaymar,项目名称:BlitzNext,代码行数:8,代码来源:bbstream.cpp


示例13: bbReadInt

int bbReadInt(bbStream* s)
{
	if (debug)
		debugStream(s);
	int n = 0;
	s->read((char*)&n, 4);
	return n;
}
开发者ID:Xaymar,项目名称:BlitzNext,代码行数:8,代码来源:bbstream.cpp


示例14: bbReadByte

int bbReadByte(bbStream* s)
{
	if (debug)
		debugStream(s);
	int n = 0;
	s->read((char*)&n, 1);
	return n;
}
开发者ID:Xaymar,项目名称:BlitzNext,代码行数:8,代码来源:bbstream.cpp


示例15: bbCopyStream

void bbCopyStream(bbStream* s, bbStream* d, int buff_size)
{
	if (debug) {
		debugStream(s);
		debugStream(d);
		if (buff_size < 1 || buff_size > 1024 * 1024)
			ThrowRuntimeException("Illegal buffer size");
	}
	char* buff = new char[buff_size];
	while (s->eof() == 0 && d->eof() == 0) {
		int n = s->read(buff, buff_size);
		d->write(buff, n);
		if (n < buff_size)
			break;
	}
	delete buff;
}
开发者ID:Xaymar,项目名称:BlitzNext,代码行数:17,代码来源:bbstream.cpp


示例16: bbWriteLine

void bbWriteLine(bbStream* s, BBStr* t)
{
	if (debug)
		debugStream(s);
	s->write(t->data(), t->size());
	s->write("\r\n", 2);
	delete t;
}
开发者ID:Xaymar,项目名称:BlitzNext,代码行数:8,代码来源:bbstream.cpp


示例17: debugStream

Real
BCInterfaceFunctionParser< PhysicalSolverType >::functionTimeSpaceID( const Real& t, const Real& x, const Real& y, const Real& z, const ID& id )
{

#ifdef HAVE_LIFEV_DEBUG
    debugStream( 5021 ) << "BCInterfaceFunction::functionTimeSpaceID: " << "\n";
    debugStream( 5021 ) << "                                                           x: " << x << "\n";
    debugStream( 5021 ) << "                                                           y: " << y << "\n";
    debugStream( 5021 ) << "                                                           z: " << z << "\n";
    debugStream( 5021 ) << "                                                           t: " << t << "\n";
    debugStream( 5021 ) << "                                                          id: " << id << "\n";
#endif

    M_parser->setVariable( "t", t );
    M_parser->setVariable( "x", x );
    M_parser->setVariable( "y", y );
    M_parser->setVariable( "z", z );

    this->dataInterpolation();

#ifdef HAVE_LIFEV_DEBUG
    debugStream( 5021 ) << "                                                evaluate(" << M_mapID[id] << ") : " << M_parser->evaluate( M_mapID[id] ) << "\n";
#endif

    return M_parser->evaluate( M_mapID[id] );
}
开发者ID:nuraiman,项目名称:lifev,代码行数:26,代码来源:BCInterfaceFunctionParser.hpp


示例18: flagConverter

Real
MultiscaleModelFSI1D::boundaryDeltaArea ( const multiscaleID_Type& boundaryID, bool& solveLinearSystem )
{
    bcSide_Type bcSide = flagConverter ( boundaryID );

    solveLinearModel ( solveLinearSystem );

    Real A      = M_solver->boundaryValue ( *M_solution, OneDFSI::A, bcSide );
    Real Adelta = M_solver->boundaryValue ( *M_linearSolution, OneDFSI::A, bcSide );

#ifdef HAVE_LIFEV_DEBUG
    debugStream ( 8130 ) << "MultiscaleModelFSI1D::boundaryDeltaArea( boundaryID, solveLinearSystem ) \n";
    debugStream ( 8130 ) << "A:          " << A <<  "\n";
    debugStream ( 8130 ) << "Adelta:     " << Adelta <<  "\n";
#endif

    return (Adelta - A) / M_bcDelta;
}
开发者ID:hamed20,项目名称:lifev,代码行数:18,代码来源:MultiscaleModelFSI1D.cpp


示例19: bbWriteString

void bbWriteString(bbStream* s, BBStr* t)
{
	if (debug)
		debugStream(s);
	int n = t->size();
	s->write((char*)&n, 4);
	s->write(t->data(), t->size());
	delete t;
}
开发者ID:Xaymar,项目名称:BlitzNext,代码行数:9,代码来源:bbstream.cpp


示例20: debugStream

void
BCInterfaceFunctionParser< OneDFSIBCHandler, OneDFSISolver >::setData ( const std::shared_ptr< BCInterfaceData >& data )
{

#ifdef HAVE_LIFEV_DEBUG
    debugStream ( 5022 ) << "BCInterfaceFunction::setData" << "\n";
#endif

    setupParser ( data );
}
开发者ID:lifev,项目名称:lifev,代码行数:10,代码来源:BCInterfaceFunctionParser1D.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ debugString函数代码示例发布时间:2022-05-30
下一篇:
C++ debugScript函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap