Dear getfem users,

I am now trying to build a generic assembling template to integrate a
specific source term in a boundary.
It doesn't seem to be complicated but Iam missing something..

Here are the variables:

U: 2d vector field to be pushed as data, (mf_u : FEM_PK(2,2),
mf_u.qdim()=2).
N: unit vector normal to the boundary (extern normal) (a 2d vector?)
dp: scalar field (mf_p : FEM_PK(2,2), mf_p.qdim()=1).

The source term to be integrated over the boundaries:

f_i=(U.N).dp_i

And here is the piece of code I am trying to make:

    template<typename VECT1, typename VECT2>
        void asm_Fbc_source_term(VECT1 &F, const mesh_im &mim, const
mesh_fem &mf,
                    const mesh_fem &mf_data, const VECT2 &D,
                    const mesh_region &rg) {
        GMM_ASSERT1(mf_data.get_qdim() == 2, "invalid data mesh_fem");

        generic_assembly assem;

        assem.set("d=data(#2);"
              "V(#1)+=comp(vBase(#2)(i,j).Normal()(j).Base(#1)(:)).d(i);");
        assem.push_mi(mim);
        assem.push_mf(mf);
        assem.push_mf(mf_data);
        assem.push_data(D);
        assem.push_vec(F);
        assem.assembly(rg);

    }

In the first test I had the following message:

============================================
|      An error has been detected !!!      |
============================================
Error in getfem_mat_elem.cc, line 121 :
Exact integration not allowed in this context

And then, changing the integration method (mim) from "IM_EXACT_SIMPLEX(2)"
to "IM_NC(2,6)" (newton-cotes of degree 6 on triangles) I started havin this
new message:

getfem_assembling_tensors.cc:145: void
getfem::ATN_reduced_tensor::update_childs_required_shape(): Assertion
`rn.size() == s.size()' failed.
Aborted

Do you guys have any idea what I am doing bad here??

Thanks for your attention,

Iago Barbeiro
_______________________________________________
Getfem-users mailing list
[email protected]
https://mail.gna.org/listinfo/getfem-users

Reply via email to