@Daniel:

So you have a FESystem<2>(FE_Q<2>(1),2) element, i.e. linear continuous 
> elements with two components, and the vector represents corresponding local 
> DoF values?
>

 Exactly. I defined first 

FESystem<dim> fe;

and then 

template<int dim>
SolidMechanics<dim>::SolidMechanics(): ..., fe(FE_Q<dim>(1), dim), ...

as constructor initializer. 
Here dim=2 would result in what you just mentioned.

In particular, assigning the value to the DoF with the corresponding 
> support point and component is all you have to do.
>

Is there a command that allows me to assign values to the DoF. Can you 
please explain this a bit more.

The Gauss quadrature points never include the vertices [1] so saying that 
> the values represent forces for each vertex and at the same time that the 
> values are computed within Gauss points sounds contradictory.
>

Yes, you are right. I described it a bit mixed up. The vector is just 
shaped and designed for our global DoFs structure. You initialize it by:

 
Vector<double> cell_cf(dofs_per_cell);

Of course integration points and vertices are different. Thanks for the 
reference, it may come useful.

Note that this approach is only suitable for Q1 elements. For higher 
polynomial degree, you have to calculate the values for all the support 
points of the finite element.

Would you suggest another approach? Since it may be useful to implement 
this in a general way, useable for higher degrees of freedom. 


@Jean-Paul:

Providing the theory is for our benefit (and therefore yours). No one here 
> is necessarily an expert in what you're trying to accomplish. So, for all 
> of your explanation, an equation or two might go a long way to help us 
> understand exactly what you're trying to achieve and, therefore, help us 
> suggest how you would accomplish it. If you can't express your problem 
> clearly then please don't be surprised if you don't receive any meaningful 
> assistance. Help us help you.
>

Of course, but I just wanted to save you from additional headaches :) 
The computation of configurational forces is accomplished by the following 
formula:


<https://lh3.googleusercontent.com/-B38RUw135-c/WIjDUOvqsfI/AAAAAAAAAEI/4rD24zbgMeoI9O-2MFpXt77UTbGAHjmLQCLcB/s1600/config_forces.png>

Deal.II does not attempt to be the beginning and end of provided 
> functionality. Yes, there are times when deal.II does not provide some 
> functionality that you require. There are a zoo of other libraries that you 
> could also use to extend your code and fill in the gaps that deal.II does 
> not provide. Of course, we always welcome extensions to existing features 
> (e.g the relatively new CellDataStorage class 
> <https://www.dealii.org/developer/doxygen/deal.II/classCellDataStorage.html>
>  and TransferableQuadraturePointData class 
> <https://www.dealii.org/developer/doxygen/deal.II/classTransferableQuadraturePointData.html>)
>  
> or the addition of new ones.
>

How can I use these new features? Is there a step example or tutorial? Is 
this TransferableQuadraturePointData the same like in step-18?

 Is this a deal.II error or a user error? Have you repopulate the 
> local_dof_indices vector for each new cell that you're doing this 
> "assembly" on? It looks like all contributions are going to a fixed set of 
> global DoFs.


I think more of a user error. Deal.II is nice and very elegantly designed. 
I just don't think it will automatically assemble it correctly in this 
case. First I have to understand it, before telling the program. ;)

I just did this:

std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);

typename DoFHandler<dim>::active_cell_iterator cell = dof_handler.
begin_active(), endc = dof_handler.end();
for (; cell != endc; ++cell)
{
    if ( cell->is_locally_owned() )
    {
       fe_values.reinit(cell);

     ... configurational forces computation ...

    }
    
    configurational_forces = cell_cf;
    
    cell->get_dof_indices(local_dof_indices);

    constraints.distribute_local_to_global(cell_cf, local_dof_indices, 
configurational_forces);
}


I am really not sure, if the hanging node constraints have anything to do 
with my desired assembly at the moment. I assume they play a role when I 
refine the mesh.
So what exactly do you mean by repopulating each cell?

Many thanks, this group here is full of nice people. Hopefully, I can help 
you also as a reward in future. :)

Kind regards,
S. A. Mohseni

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to