void
BCInterfaceFunctionParser< PhysicalSolverType >::setData( const BCInterfaceData3D& data )
{

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

    setupParser( data );

    /*
     * MODE          COMPONENT     FUNCTION      |      COMV.SIZE     ARGUMENTS     INTERFACEFUNCTION
     * ------------------------------------------|---------------------------------------------------
     *                                           |
     * COMPONENT     2             x*y*z         |      1             1             function
     * FULL          3             x*y*z         |      1             1             function
     * FULL          1             x*y*z         |      1             1             function
     * FULL          3             (y*z,x*z,x*y) |      1             3             functionID
     * FULL          2             (x,y)         |      1             2             functionID
     * COMPONENT     '1 3'         (x,y)         |      2             2             functionID
     */

#ifdef HAVE_LIFEV_DEBUG
    debugStream( 5021 ) << "BCInterfaceFunction::setData                arguments: " << M_parser->countSubstring( "," ) << "\n";
#endif

    // Note: the map ID is used only for 3D handler.
    if ( M_parser->countSubstring( "," ) )
    {
        //Create the ID map
        if ( data.componentsVector().size() > 1 ) // Component
            for ( ID i( 0 ); i < static_cast< ID > ( data.componentsVector().size() ); ++i )
                M_mapID[data.componentsVector()[i]] = i + 1;
        else
            // if ( data.componentsVector().front() == arguments )  Full
            for ( ID i( 0 ); i < data.componentsVector().front(); ++i )
                M_mapID[i+1] = i+1;
    }
}
// ===================================================
// Set Methods
// ===================================================
void
BCInterfaceFunctionSolverDefined< FSIOperator >::setData( const BCInterfaceData3D& 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);
        BCInterfaceData3D temporaryData ( 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 ) );
    }
}