Thanks for the answer, Daniel.

On Monday, March 6, 2017 at 7:49:53 PM UTC+1, Daniel Arndt wrote:

So my first question is, should I avoid using this class and implement 
>> parallel loops by hand (via TBB or other means)?
>>
>  

> "amandus"[1] is in fact based on MeshWorker. If you are trying to do 
> something similar to what is in the examples there, you have a good chance 
> to be successful.
> The problem really is the documentation, but with working code you should 
> be able to understand the concepts.
>  
>

Yes, I understand the concept, and I appreciate the code you posted, it 
should be really useful.
 

> Then, my doubts about the use of MeshWorkers. I cannot really grasp it 
>> even after reading tutorials 12, 16, and 39.
>>
>> What is the purpose of the cell, boundary, and face functions? The cell 
>> is called exactly on each n-dimensional cell, I've checked that number, 
>> what about the other two? Boundary is called, as I read, for each 
>> n-dimensional cell on the boundary (numbers again match). Face function is 
>> called on each internal (n-1)-dimensional face (not on the boundary), as 
>> far as I understand. Is this correct?
>>
>  

> In MeshWorker, you are basically only writing the assembly loops for your 
> bilinear forms. You don't have to care about how to handle hanging nodes 
> and the like.
>

That's good, but in the same loop I could assemble (one or more) bilinear 
form and (one or more) linear form for the RHS.
 

> In a typical DG formulation your bilinear form consists of a cell term, a 
> boundary term and face term. These relate to the cell, boundary and face 
> functions you are talking about. You should be able to see this in step-39. 
>

I have implemented both serial and parallel (MeshWorker) version of the 
same bilinear form, and I got two different matrices. And if I see it 
correctly, it's not just numerical noise. In mathematica, with 
matpar/matser imported with a text file, resulting from system_matrix.print(
std::cout):

In[17]:= Norm[matpar - matser]

Out[17]= 2.1304 * 10^10

In[20]:= {Eigenvalues[matpar, 10], Eigenvalues[matser, 10]}

Out[20]= {
{1.14866 * 10^11, 1.14329 * 10^11, 
  1.13441 * 10^11, 1.1221 * 10^11, 
  1.1065 * 10^11, 1.1055 * 10^11, 
  1.10036 * 10^11, 1.09185 * 10^11, 
  1.08777 * 10^11, 
  1.08005 * 10^11}, 
{1.35992 * 10^11, 
  1.35304 * 10^11, 1.34166 * 10^11, 
  1.32589 * 10^11, 1.30589 * 10^11, 
  1.30502 * 10^11, 1.29842 * 10^11, 
  1.28749 * 10^11, 1.28188 * 10^11, 
  1.27236 * 10^11}}

In[21]:= {Eigenvalues[matpar, -10], Eigenvalues[matser, -10]}

Out[21]= {
{2.17343 * 10^9, 2.17343 * 10^9, 
  2.16945 * 10^9, 2.16945 * 10^9, 
  2.16728 * 10^9, 2.16728 * 10^9, 
  1.34634 * 10^9, 1.34634 * 10^9, 
  1.25769 * 10^9, 
  1.25769 * 10^9}, 
{4.5406 * 10^7, 
  3.14171 * 10^7, 1.95205 * 10^7, 
  1.69433 * 10^7, 1.00199 * 10^7, 
  5.97384 * 10^6, 1.747 * 10^6, 
  1.0382 * 10^6, 581593., 28031.9}}

The last two commands give the first 10 and last 10 eigenvalues. Shouldn't 
the two assemblers yield the very same matrix?

When assigning a Neumann condition on faces, for instance in elasticity 
>> apply a load, where is the correct place? I have tried to get the code into 
>> the cell function, but I didn't find a way to get the faces, boundary 
>> markers, and the face values. My code is at the bottom, if you need it.
>>
>  

> In general, your code fragment looks good, but the right-hand side should 
> be handled in a different integrator object similar to what is done in 
> step-39.
>

Uh, ok, I'll use that. This could have an impact on the performances, 
though.
 

> Neumann boundary conditions are normally considered in a weak sense and 
> incorporated as boundary term into the bilinear form. So this should be in 
> the boundary method of your MatrixIntegrator.
> There is an elasticity example in amandus. Maybe this is useful.
>

Thanks!
 

> Is there an analogous of the FullMatrix for the right hand side vector? 
>> The only thing similar to a vector in the DoFInfo is a BlockVector...
>>
>  

> What exactly do you mean? In general, all vectors are considered to be 
> block vectors with only one block that you can access via "dinfo.vector 
> <https://www.dealii.org/8.4.1/doxygen/deal.II/classMeshWorker_1_1LocalResults.html#af80df9fc19df1713b3d41690f9c71527>
> (0).block(0);".
>

Good info, thanks.
 

> If you initialize the "MeshWorker::DoFInfo" object with a "BlockInfo" 
> object, you also have access to individual blocks. The structure then 
> resembles the structure of your FiniteElement.
>

I will try this as soon as possible.
 

> [1] https://bitbucket.org/guidokanschat/amandus 
>

Thanks for the code, I'm reading it right now.

Cheers! 

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to