void Foam::solveLaplacianPDE::read(const dictionary& dict)
{
    solvePDECommonFiniteVolume::read(dict);

    if(active_) {
      if(needsRhoField(true)) {
            readExpressionAndDimension(
                dict,
                "rho",
                rhoExpression_,
                rhoDimension_
            );
        }
        readExpressionAndDimension(
            dict,
            "lambda",
            lambdaExpression_,
            lambdaDimension_
        );
        readExpressionAndDimension(
            dict,
            "source",
            sourceExpression_,
            sourceDimension_
        );
        if(dict.found("sourceImplicit")) {
            readExpressionAndDimension(
                dict,
                "sourceImplicit",
                sourceImplicitExpression_,
                sourceImplicitDimension_
            );
            if(dict.found("sourceImplicitUseSuSp")) {
                sourceImplicitUseSuSp_=readBool(dict.lookup("sourceImplicitUseSuSp"));
            } else {
                WarningIn("Foam::solveLaplacianPDE::read(const dictionary& dict)")
                    << "'sourceImplicitUseSuSp' not set in " << dict.name()
                        << " assuming 'false'" << endl;
             }
        } else {
            if(sourceExpression_!="0") {
                WarningIn("Foam::solveLaplacianPDE::read(const dictionary& dict)")
                    << "Source expression " << sourceExpression_ << " set. "
                        << "Consider factoring out parts to 'sourceImplicit'\n"
                        << endl;

            }
        }
    }
}
Exemplo n.º 2
0
void Foam::solveAreaLaplacianPDE::read(const dictionary& dict)
{
    solvePDECommonFiniteArea::read(dict);

    if(active_) {
        if(!steady_) {
            readExpressionAndDimension(
                dict,
                "rho",
                rhoExpression_,
                rhoDimension_
            );
        }
        readExpressionAndDimension(
            dict,
            "lambda",
            lambdaExpression_,
            lambdaDimension_
        );
        readExpressionAndDimension(
            dict,
            "source",
            sourceExpression_,
            sourceDimension_
        );
        if(dict.found("sourceImplicit")) {
            readExpressionAndDimension(
                dict,
                "sourceImplicit",
                sourceImplicitExpression_,
                sourceImplicitDimension_
            );
       } else {
            if(sourceExpression_!="0") {
                WarningIn("Foam::solveAreaLaplacianPDE::read(const dictionary& dict)")
                    << "Source expression " << sourceExpression_ << " set. "
                        << "Consider factoring out parts to 'sourceImplicit'\n"
                        << endl;

            }
        }
    }
}