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


C++ BoundaryOperator::dualToRange方法代码示例

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


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

示例1: logic_error

AdjointAbstractBoundaryOperator<BasisFunctionType, ResultType>::
AdjointAbstractBoundaryOperator(
        const BoundaryOperator<BasisFunctionType, ResultType>& boundaryOp,
        int symmetry) :
    Base(boundaryOp.dualToRange(),
         boundaryOp.domain() == boundaryOp.range() ?
             boundaryOp.dualToRange() :
             // assume that domain == dualToRange, we'll verify it
             // in the body of the constructor
             boundaryOp.range(),
         boundaryOp.domain(),
         "adj(" + boundaryOp.label() + ")",
         symmetry & AUTO_SYMMETRY ?
             boundaryOp.abstractOperator()->symmetry() :
             symmetry),
    m_operator(boundaryOp)
{
    if (boost::is_complex<BasisFunctionType>())
        throw std::logic_error(
            "AdjointAbstractBoundaryOperator(): Taking the adjoint of operators "
            "acting on complex-valued basis functions is not supported");
    if (boundaryOp.domain() != boundaryOp.range() &&
            boundaryOp.domain() != boundaryOp.dualToRange())
        throw std::runtime_error(
                "AdjointAbstractBoundaryOperator::"
                "AdjointAbstractBoundaryOperator(): "
                "Dual to the domain of the operator to invert cannot be determined "
                "since the domain is different from both "
                "the range and the space dual to its range");
}
开发者ID:nicolas-chaulet,项目名称:bempp,代码行数:30,代码来源:adjoint_abstract_boundary_operator.cpp

示例2: runtime_error

AbstractBoundaryOperatorPseudoinverse<BasisFunctionType, ResultType>::
AbstractBoundaryOperatorPseudoinverse(
        // TODO: add a solver argument specifying how to calculate the pseudoinv.
        const BoundaryOperator<BasisFunctionType, ResultType>& operatorToInvert) :
    Base(operatorToInvert.range(), operatorToInvert.domain(),
         operatorToInvert.domain() == operatorToInvert.range() ?
             operatorToInvert.dualToRange() :
             // assume that domain == dualToRange, we'll verify it
             // in the body of the constructor
             operatorToInvert.range(),
         "pinv(" + operatorToInvert.label() + ")",
         throwIfUninitialized(operatorToInvert,
                              "AbstractBoundaryOperatorPseudoinverse::"
                              "AbstractBoundaryOperatorPseudoinverse(): "
                              "the boundary operator to be inverted must be "
                              "initialized"
                              ).abstractOperator()->symmetry()),
    m_operator(operatorToInvert),
    m_id(boost::make_shared<AbstractBoundaryOperatorPseudoinverseId<
         BasisFunctionType, ResultType> >(
             operatorToInvert))
{
    if (operatorToInvert.domain() != operatorToInvert.range() &&
            operatorToInvert.domain() != operatorToInvert.dualToRange())
        throw std::runtime_error(
                "AbstractBoundaryOperatorPseudoinverse::"
                "AbstractBoundaryOperatorPseudoinverse(): "
                "Dual to the domain of the operator to invert cannot be determined "
                "since the domain is different from both "
                "the range and the space dual to its range");
}
开发者ID:huidong80,项目名称:bempp,代码行数:31,代码来源:abstract_boundary_operator_pseudoinverse.cpp


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