Exemplo n.º 1
0
FSIOperator::fluidBchandlerPtr_Type BCh_harmonicExtension (FSIOperator& _oper)
{

    // Boundary condition for the mesh
    debugStream ( 10000 ) << "Boundary condition for the harmonic extension\n";

    BCFunctionBase bcf (fZero);

    FSISolver::fluidBchandlerPtr_Type BCh_he (new FSIOperator::fluidBchandler_Type );

    BCh_he->addBC ("Edges", INOUTEDGE, Essential, Full, bcf,   3);
    BCh_he->addBC ("Edges", INEDGE, Essential, Full, bcf,   3);
    BCh_he->addBC ("Base",  INLET,     Essential, Full, bcf,   3);

    if (_oper.data().method() == "monolithicGE")
    {
        debugStream (10000) << "FSIMonolithic GCE harmonic extension\n";
        FSIMonolithicGE* MOper = dynamic_cast<FSIMonolithicGE*> (&_oper);
        MOper->setStructureDispToHarmonicExtension (_oper.lambdaFluidRepeated() );
        BCh_he->addBC ("Interface", SOLIDINTERFACE, Essential, Full,
                       *MOper->bcvStructureDispToHarmonicExtension(), 3);
    }
    else if (_oper.data().method() == "monolithicGI")
    {

    }

    return BCh_he;
}
Exemplo n.º 2
0
FSIOperator::fluidBchandlerPtr_Type BCh_harmonicExtension (FSIOperator& _oper)
{

    //     debugStream(10000) << "SP harmonic extension\n";
    //     fixedPoint *FPOper = dynamic_cast<fixedPoint *>(&_oper);

    //     FPOper->setStructureDispToHarmonicExtension(_oper.lambdaFluid());

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

    //    FPOper->bcvStructureDispToHarmonicExtension()->showMe(true,std::cout);

    // Boundary condition for the mesh
    debugStream ( 10000 ) << "Boundary condition for the harmonic extension\n";

    BCFunctionBase bcf (fZero);

    FSISolver::fluidBchandlerPtr_Type BCh_he (new FSIOperator::fluidBchandler_Type );



    BCh_he->addBC ("Edges", INOUTEDGE, Essential, Full, bcf,   3);
    BCh_he->addBC ("Edges", INEDGE, Essential, Full, bcf,   3);
    BCh_he->addBC ("Base",  INLET,     Essential, Full, bcf,   3);

    // BCh_he->addBC("Top",         3, Essential, Full, bcf,   3);
    // BCh_he->addBC("Base",        2, Essential, Full, bcf,   3);


    if (_oper.data().method() == "steklovPoincare")
    {
        //         debugStream(10000) << "SP harmonic extension\n";
        //         steklovPoincare *SPOper = dynamic_cast<steklovPoincare *>(&_oper);
        //         SPOper->setFluidInterfaceDisp((LifeV::Vector&) _oper.lambdaFluidRepeated());
        //         BCh_he->addBC("Interface", 1, Essential, Full,
        //                       *SPOper->bcvFluidInterfaceDisp(), 3);
    }
    else if (_oper.data().method() == "exactJacobian")
    {
        debugStream (10000) << "EJ harmonic extension\n";
        FSIExactJacobian* EJOper = dynamic_cast<FSIExactJacobian*> (&_oper);
        EJOper->setStructureDispToHarmonicExtension (_oper.lambdaFluidRepeated() );
        BCh_he->addBC ("Interface", FLUIDINTERFACE, Essential, Full,
                       *EJOper->bcvStructureDispToHarmonicExtension(), 3);
    }
    else if (_oper.data().method() == "fixedPoint")
    {
        debugStream (10000) << "FP harmonic extension\n";
        FSIFixedPoint* FPOper = dynamic_cast<FSIFixedPoint*> (&_oper);

        FPOper->setStructureDispToHarmonicExtension (_oper.lambdaFluidRepeated() );
        BCh_he->addBC ("Interface", FLUIDINTERFACE, Essential, Full,
                       *FPOper->bcvStructureDispToHarmonicExtension(), 3);
    }



    return BCh_he;
}