Ejemplo n.º 1
0
      static void create_boundary_elements(element_type & element, inserter_type & inserter)
      {
        BoundaryElementType boundary_element( inserter.get_physical_container_collection() );

        int index = 0;
        for (int i = 0; i < boundary_elements<simplex_tag<n>, vertex_tag >::num; ++i)
            for (int j = i+1; j < boundary_elements<simplex_tag<n>, vertex_tag >::num; ++j)
                for (int k = j+1; k < boundary_elements<simplex_tag<n>, vertex_tag >::num; ++k)
                {
                    boundary_element.container(dimension_tag<0>()).set_handle( element.container( dimension_tag<0>() ).handle_at(i), 0 );
                    boundary_element.container(dimension_tag<0>()).set_handle( element.container( dimension_tag<0>() ).handle_at(j), 1 );
                    boundary_element.container(dimension_tag<0>()).set_handle( element.container( dimension_tag<0>() ).handle_at(k), 2 );

                    element.set_boundary_element( boundary_element, inserter.template insert<true, true>(boundary_element), index++ );
                }
      }
 // apply the functional
 virtual value_type
 operator()( const element_type& x ) const
 {
     //auto vector = sumAllVectors( true );
     auto vector = M_backend->newVector( this->space() );
     sumAllVectors( vector, true );
     vector->close();
     return M_backend->dot( *vector, x.container() );
 }
Ejemplo n.º 3
0
    // apply the functional
    virtual value_type
    operator()( const element_type& x ) const
    {
        auto vector = M_backend->newVector( this->space() );
        form1( _test=this->space(),_vector=vector) = M_expr;
        vector->close();

        return M_backend->dot( *vector, x.container() );
    }
Ejemplo n.º 4
0
      static void create_boundary_elements(element_type & element, inserter_type & inserter)
      {
        BoundaryElementType boundary_element( inserter.get_physical_container_collection() );
        int index = 0;

        boundary_element.container(dimension_tag<0>()).set_handle( element.container( dimension_tag<0>() ).handle_at(0), 0 );
        boundary_element.container(dimension_tag<0>()).set_handle( element.container( dimension_tag<0>() ).handle_at(1), 1 );
        element.set_boundary_element( boundary_element, inserter.template insert<true, true>(boundary_element), index++ );

        boundary_element.container(dimension_tag<0>()).set_handle( element.container( dimension_tag<0>() ).handle_at(0), 0 );
        boundary_element.container(dimension_tag<0>()).set_handle( element.container( dimension_tag<0>() ).handle_at(2), 1 );
        element.set_boundary_element( boundary_element, inserter.template insert<true, true>(boundary_element), index++ );

        boundary_element.container(dimension_tag<0>()).set_handle( element.container( dimension_tag<0>() ).handle_at(1), 0 );
        boundary_element.container(dimension_tag<0>()).set_handle( element.container( dimension_tag<0>() ).handle_at(3), 1 );
        element.set_boundary_element( boundary_element, inserter.template insert<true, true>(boundary_element), index++ );

        boundary_element.container(dimension_tag<0>()).set_handle( element.container( dimension_tag<0>() ).handle_at(2), 0 );
        boundary_element.container(dimension_tag<0>()).set_handle( element.container( dimension_tag<0>() ).handle_at(3), 1 );
        element.set_boundary_element( boundary_element, inserter.template insert<true, true>(boundary_element), index++ );
      }
Ejemplo n.º 5
0
 // apply the functional
 virtual value_type
 operator()( const element_type& x ) const
 {
     M_vector->close();
     return M_backend->dot( *M_vector, x.container() );
 }