[dune-pdelab] [dune-pdelab-commit] dune-pdelab r788 - trunk/dune/pdelab/localoperator

Christian Engwer christi at uni-hd.de
Sat Nov 6 11:14:33 CET 2010


Hi Felix,

> Log:
> Another fix for the jacobian based alpha_volume and
> alpha_skeleton. Local matrices would be too small for systems.

this was a known issue, when the code was written. In order to avoid
this kind of problems and always allocate the correct size, the
method localVectorSize() was added to the localfunctionspace.

Christian

> 
> Modified:
>    trunk/dune/pdelab/localoperator/defaultimp.hh
> 
> Modified: trunk/dune/pdelab/localoperator/defaultimp.hh
> ==============================================================================
> --- trunk/dune/pdelab/localoperator/defaultimp.hh	Thu Nov  4 22:44:30 2010	(r787)
> +++ trunk/dune/pdelab/localoperator/defaultimp.hh	Fri Nov  5 13:30:18 2010	(r788)
> @@ -554,7 +554,7 @@
>          const LFSU& lfsu, const X& x, const LFSV& lfsv,
>          R& r) const
>        {
> -        LocalMatrix<typename R::value_type> mat(lfsu.size(),lfsu.size(), 0);
> +        LocalMatrix<typename R::value_type> mat(r.size(),x.size(), 0);
>          asImp().jacobian_volume(eg, lfsu, x, lfsv, mat);
>          mat.umv(x,r);
>        }
> @@ -589,14 +589,14 @@
>          const LFSU& lfsu_n, const X& x_n, const LFSV& lfsv_n,
>          R& r_s, R& r_n) const
>        {
> -        LocalMatrix<typename R::value_type> mat_ss(lfsu_s.size(),
> -                                                   lfsu_s.size(), 0);
> -        LocalMatrix<typename R::value_type> mat_sn(lfsu_s.size(),
> -                                                   lfsu_n.size(), 0);
> -        LocalMatrix<typename R::value_type> mat_ns(lfsu_n.size(),
> -                                                   lfsu_s.size(), 0);
> -        LocalMatrix<typename R::value_type> mat_nn(lfsu_n.size(),
> -                                                   lfsu_n.size(), 0);
> +        LocalMatrix<typename R::value_type> mat_ss(r_s.size(),
> +                                                   x_s.size(), 0);
> +        LocalMatrix<typename R::value_type> mat_sn(r_s.size(),
> +                                                   x_n.size(), 0);
> +        LocalMatrix<typename R::value_type> mat_ns(r_n.size(),
> +                                                   x_s.size(), 0);
> +        LocalMatrix<typename R::value_type> mat_nn(r_n.size(),
> +                                                   x_n.size(), 0);
>          asImp().jacobian_skeleton(ig,
>            lfsu_s, x_s, lfsv_s,
>            lfsu_n, x_n, lfsv_n,
> @@ -637,7 +637,7 @@
>          const LFSU& lfsu, const X& x, const LFSV& lfsv,
>          R& r) const
>        {
> -        LocalMatrix<typename R::value_type> mat(lfsu.size(),lfsu.size(), 0);
> +        LocalMatrix<typename R::value_type> mat(x.size(),r.size(), 0);
>          asImp().jacobian_boundary(ig, lfsu, x, lfsv, mat);
>          mat.umv(x,r);
>        }
> 
> _______________________________________________
> dune-pdelab-commit mailing list
> dune-pdelab-commit at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-pdelab-commit
> 




More information about the dune-pdelab mailing list