コード例 #1
0
// ===================================================
// Set Methods
// ===================================================
void
BCInterfaceFunctionSolverDefined< BCHandler, FSIOperator >::setData ( const dataPtr_Type& data )
{

#ifdef HAVE_LIFEV_DEBUG
    debugStream ( 5025 ) << "BCInterfaceFunctionSolverDefined::setData" << "\n";
#endif

    //Set mapFunction
    std::map< std::string, FSIFunction > mapFunction;
    mapFunction["DerFluidLoadToFluid"]              = DerFluidLoadToFluid;
    mapFunction["DerFluidLoadToStructure"]          = DerFluidLoadToStructure;
    mapFunction["DerHarmonicExtensionVelToFluid"]   = DerHarmonicExtensionVelToFluid;
    mapFunction["DerStructureDispToSolid"]          = DerStructureDispToSolid;
    mapFunction["FluidInterfaceDisp"]               = FluidInterfaceDisp;
    mapFunction["FluidLoadToStructure"]             = FluidLoadToStructure;
    mapFunction["HarmonicExtensionVelToFluid"]      = HarmonicExtensionVelToFluid;
    mapFunction["SolidLoadToStructure"]             = SolidLoadToStructure;
    mapFunction["StructureDispToHarmonicExtension"] = StructureDispToHarmonicExtension;
    mapFunction["StructureDispToSolid"]             = StructureDispToSolid;
    mapFunction["StructureToFluid"]                 = StructureToFluid;
    mapFunction["RobinWall"]                        = RobinWall;

    // Retrieving the strings
    M_FSIFunction = mapFunction[ data->baseString() ];

    M_name = data->name();
    M_flag = data->flag();
    M_type = data->type();
    M_mode = data->mode();
    M_componentsVector = data->componentsVector();

    if ( M_FSIFunction == RobinWall )
    {
        factory_Type factory;
        M_vectorFunctionRobin.reserve (2);
        dataPtr_Type temporaryData ( new data_Type ( *data ) );

        // Create the mass term function
        temporaryData->setRobinBaseAlpha();
        M_vectorFunctionRobin.push_back ( factory.createFunctionParser ( temporaryData ) );

        // Create the RHS
        temporaryData->setRobinBaseBeta();
        M_vectorFunctionRobin.push_back ( factory.createFunctionParser ( temporaryData ) );
    }
}
コード例 #2
0
// ===================================================
// Set Methods
// ===================================================
void
BCInterfaceFunctionSolverDefined< BCHandler, StructuralOperator<RegionMesh <LinearTetra> > >::setData ( const dataPtr_Type& data )
{

#ifdef HAVE_LIFEV_DEBUG
    debugStream ( 5025 ) << "BCInterfaceFunctionSolverDefined::setData" << "\n";
#endif

    //Set mapFunction
    std::map< std::string, Solid3DFunction > mapFunction;
    mapFunction["RobinWall"] = RobinWall;

    // Retrieving the strings
    M_solid3DFunction = mapFunction[ data->baseString() ];

    M_name = data->name();
    M_flag = data->flag();
    M_type = data->type();
    M_mode = data->mode();
    M_componentsVector = data->componentsVector();

    if ( M_solid3DFunction == RobinWall )
    {
        factory_Type factory;
        M_vectorFunctionRobin.reserve (2);
        dataPtr_Type temporaryData ( new data_Type ( *data ) );

        // Create the mass term function
        temporaryData->setRobinBaseAlpha();
        M_vectorFunctionRobin.push_back ( factory.createFunctionParser ( temporaryData ) );

        // Create the RHS
        temporaryData->setRobinBaseBeta();
        M_vectorFunctionRobin.push_back ( factory.createFunctionParser ( temporaryData ) );
    }
}