Re: [deal.II] Creating periodic Boundary Conditions after doing a uniform subdivision

2017-11-10 Thread Phani Motamarri
Sure, I will definitely try to make a patch to improve the error message.
So if I understand, I have my own git local branch of deal ii develop
branch and I modify the code and commit it in my local branch. After that
how do I get it to central system for your review?

Thanks
Phani

On Fri, Nov 10, 2017 at 3:02 PM, Wolfgang Bangerth 
wrote:

>
> Phani,
>
> 
>> An error occurred in line <3536> of file > s/softwareCentos/dealii/dealii-8.5.1/source/distributed/tria.cc> in
>> function
>>
>> void dealii::parallel::distributed::Triangulation> spacedim>::add_periodicity(const std::vector> :PeriodicFacePair::cell_iterator>,
>> std::allocator> spacedim>::cell_iterator>>> &) [with dim = 3, spacedim = 3]
>>
>> The violated condition was:
>>
>> this->n_levels() == 1
>>
>> Additional information:
>>
>> The triangulation is refined!
>> --
>>
>
> Yes, this seems like a poor error message. Would you like to take a stab
> at writing a patch that improves the error message? We would certainly be
> quite grateful if you did!
>
> If you want to see how to do that, take a look here:
>   http://dealii.org/participate.html
> Also let us know if you need help with this and/or if you think that you
> can't work out how to make such a patch -- though I think that improving an
> error message is a great way to start contributing! :-)
>
> Cheers
>
>  W.
>
> --
> 
> Wolfgang Bangerth  email: bange...@colostate.edu
>www: http://www.math.colostate.edu/~bangerth/
>
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see https://groups.google.com/d/fo
> rum/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.
>

-- 
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.


Re: [deal.II] How to add addtional point to enrichment functions (FE_Enriched)

2017-11-10 Thread Edith Sotelo
Hello again,
My solution:  I just made a local copy of FE_Enriched.cc  
and .h and I am including in my main program the local the Enriched.h 
Still have to implement the rest, maybe more questions to come…

thank you for your help,

Edith


> On Nov 10, 2017, at 1:34 PM, Edith Sotelo  wrote:
> 
> Hello Denis,
> 
> Coming back to this. I think it is still possible to use the FE-Enriched 
> class..  My idea is to  access the “enrichments” class variable that contains 
> the enrichments functions. However this variable is protected. 
> Whatever solution I think of to  access this variable , it ends up modifying 
> the class, which I think it is not the idea. (to make it public, to  declare 
> a friend class/function) 
> 
> My final idea is to implement a get_point (Point  &) function in my 
> enrichment function class and be able to apply it to the enrichments stored 
> in the “enrichments” FE_Enriched class variable, something  similar to what 
> you did in the “multiply_by_enrichment” FE_Enriched member function.
> 
> I will appreciate any suggestion regarding this and thank you for your help.
> 
> Edith
> 
> 
>> On Nov 2, 2017, at 3:03 PM, Denis Davydov > > wrote:
>> 
>> 
>> 
>>> On 2 Nov 2017, at 20:45, Denis Davydov >> > wrote:
>>> 
>>> Hi Edith,
>>> 
 On 2 Nov 2017, at 20:08, Edith Sotelo >>> > wrote:
 
 Hey Denis,
 
 I think I was not clear enough in describing what I want to do . I 
 apologize, that’s my bad. I hope the next lines explain it better
 
 I want to implement Ni*F(x-xi) or   Ni*[F(x)-F(xi)]  for the enrichment 
 part
>>> 
>>> (below I assume you have the same FE for enriched and non-enriched parts).
>>> 
>>> If you have a FE space spanned by { Ni(x), Ni(x) * F(x-xi) } then it 
>>> essentially means you have a different enrichment function for each DoF.
>>> You might as well write it as  {Ni(x), Ni(x) * Fi (x) }   where Fi(x) := 
>>> F(x-xi)
>>> That won’t work with FE_Enriched because a single function F(x) is used to 
>>> enrich all DoFs on the element.
>>> There is no mechanism to selectively pick up a single DoF. You would have 
>>> to do this manually.
>>> 
>>> If you need to enrich only a hand-full of all DoFs (say 10 out of 10) 
>>> each with a different function, 
>>> then you can try to work out the chain-rule in your bilinear forms 
>>> manually. That’s easy but tedious, see 
>>> https://github.com/dealii/dealii/blob/master/tests/fe/fe_enriched_step-36b.cc#L455-L590
>>>  
>>> 
>>> which implements PUM without FE_Enriched.
>>> What is worse is managing FE_Collection and figuring out all the 
>>> constraints to keep continuous FE space. 
>> 
>> p.s. constraints are actually simpler in this case. For scalar problem you 
>> only need two components in FE_System — one for enriched DoFs and one for 
>> standard.
>> 
>> 
>>> On each element you would go  local_dof -> global_dof -> 
>>> enrichment_function.
>>> I guess it’s doable, but not trivial in implementation.
>>> 
>>> 
>>> The second case you have a space spanned by { Ni(x), Ni(x) * [F(x) - F(xi)] 
>>> } \equiv {Ni(x), Ni(x) * F(x) } is perfectly doable with FE_Enriched.
>>> 
>>> Regards,
>>> Denis.
>>> 
>>> 
 
 where:
 Ni is the i-th standard basis function,
 F is a enrichment function ,
 xi is the dof coordinate of the i-th standard basis function.
 
 That’s why I think  I need to look for the corresponding xi point  during 
 assembly… 
 
 Thank you for your patience.
 
 
 
> On Nov 2, 2017, at 10:56 AM, Denis Davydov  > wrote:
> 
> Hi Edith,
> 
>> On 2 Nov 2017, at 15:46, Edith Sotelo > > wrote:
>> 
>> 
>> Hi  Denis,
>> Thank you for answering my (odd) questions...
>> 
>> I think I meant that I do not see how I could pass a point that is 
>> calculated during assembly when constructing the enrichments functions. 
>> So to pass the point during 
> 
> what do you **have to** calculate this point during assembly? If it’s 
> just a support point of the FE basis or a vertex, surely you can get it 
> prior to assembly.
> You can also use pointers to a Point in your custom function and 
> then modify the value outside.
> 
>> assembly I think I need to get to the enrichment functions that are 
>> already in the “enrichments” vector,  and this is a protected  member of 
>> the FE_Enriched class … so I was thinking to make it public…  maybe you 
>> have a different suggestion...
>> 
>> I want to do this to try a couple of things..
>> 
>> * I want to test a function like this : Cos ( z) with  z=sqrt ( (x-xo)^2 
>> + (y-yo)^2), where  (xo, yo) is the point I need to pass..

Re: [deal.II] Creating periodic Boundary Conditions after doing a uniform subdivision

2017-11-10 Thread Wolfgang Bangerth


Phani,



An error occurred in line <3536> of file 
 
in function


void dealii::parallel::distributed::Triangulationspacedim>::add_periodicity(const 
std::vectorspacedim>::cell_iterator>, 
std::allocatorspacedim>::cell_iterator>>> &) [with dim = 3, spacedim = 3]


The violated condition was:

this->n_levels() == 1

Additional information:

The triangulation is refined!
--


Yes, this seems like a poor error message. Would you like to take a stab 
at writing a patch that improves the error message? We would certainly 
be quite grateful if you did!


If you want to see how to do that, take a look here:
  http://dealii.org/participate.html
Also let us know if you need help with this and/or if you think that you 
can't work out how to make such a patch -- though I think that improving 
an error message is a great way to start contributing! :-)


Cheers
 W.

--

Wolfgang Bangerth  email: bange...@colostate.edu
   www: http://www.math.colostate.edu/~bangerth/

--
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.


Re: [deal.II] How to add addtional point to enrichment functions (FE_Enriched)

2017-11-10 Thread Edith Sotelo
Hello Denis,

Coming back to this. I think it is still possible to use the FE-Enriched 
class..  My idea is to  access the “enrichments” class variable that contains 
the enrichments functions. However this variable is protected. 
Whatever solution I think of to  access this variable , it ends up modifying 
the class, which I think it is not the idea. (to make it public, to  declare a 
friend class/function) 

My final idea is to implement a get_point (Point  &) function in my 
enrichment function class and be able to apply it to the enrichments stored in 
the “enrichments” FE_Enriched class variable, something  similar to what you 
did in the “multiply_by_enrichment” FE_Enriched member function.

I will appreciate any suggestion regarding this and thank you for your help.

Edith


> On Nov 2, 2017, at 3:03 PM, Denis Davydov  wrote:
> 
> 
> 
>> On 2 Nov 2017, at 20:45, Denis Davydov > > wrote:
>> 
>> Hi Edith,
>> 
>>> On 2 Nov 2017, at 20:08, Edith Sotelo >> > wrote:
>>> 
>>> Hey Denis,
>>> 
>>> I think I was not clear enough in describing what I want to do . I 
>>> apologize, that’s my bad. I hope the next lines explain it better
>>> 
>>> I want to implement Ni*F(x-xi) or   Ni*[F(x)-F(xi)]  for the enrichment part
>> 
>> (below I assume you have the same FE for enriched and non-enriched parts).
>> 
>> If you have a FE space spanned by { Ni(x), Ni(x) * F(x-xi) } then it 
>> essentially means you have a different enrichment function for each DoF.
>> You might as well write it as  {Ni(x), Ni(x) * Fi (x) }   where Fi(x) := 
>> F(x-xi)
>> That won’t work with FE_Enriched because a single function F(x) is used to 
>> enrich all DoFs on the element.
>> There is no mechanism to selectively pick up a single DoF. You would have to 
>> do this manually.
>> 
>> If you need to enrich only a hand-full of all DoFs (say 10 out of 10) 
>> each with a different function, 
>> then you can try to work out the chain-rule in your bilinear forms manually. 
>> That’s easy but tedious, see 
>> https://github.com/dealii/dealii/blob/master/tests/fe/fe_enriched_step-36b.cc#L455-L590
>>  
>> 
>> which implements PUM without FE_Enriched.
>> What is worse is managing FE_Collection and figuring out all the constraints 
>> to keep continuous FE space. 
> 
> p.s. constraints are actually simpler in this case. For scalar problem you 
> only need two components in FE_System — one for enriched DoFs and one for 
> standard.
> 
> 
>> On each element you would go  local_dof -> global_dof -> enrichment_function.
>> I guess it’s doable, but not trivial in implementation.
>> 
>> 
>> The second case you have a space spanned by { Ni(x), Ni(x) * [F(x) - F(xi)] 
>> } \equiv {Ni(x), Ni(x) * F(x) } is perfectly doable with FE_Enriched.
>> 
>> Regards,
>> Denis.
>> 
>> 
>>> 
>>> where:
>>> Ni is the i-th standard basis function,
>>> F is a enrichment function ,
>>> xi is the dof coordinate of the i-th standard basis function.
>>> 
>>> That’s why I think  I need to look for the corresponding xi point  during 
>>> assembly… 
>>> 
>>> Thank you for your patience.
>>> 
>>> 
>>> 
 On Nov 2, 2017, at 10:56 AM, Denis Davydov >>> > wrote:
 
 Hi Edith,
 
> On 2 Nov 2017, at 15:46, Edith Sotelo  > wrote:
> 
> 
> Hi  Denis,
> Thank you for answering my (odd) questions...
> 
> I think I meant that I do not see how I could pass a point that is 
> calculated during assembly when constructing the enrichments functions. 
> So to pass the point during 
 
 what do you **have to** calculate this point during assembly? If it’s just 
 a support point of the FE basis or a vertex, surely you can get it prior 
 to assembly.
 You can also use pointers to a Point in your custom function and then 
 modify the value outside.
 
> assembly I think I need to get to the enrichment functions that are 
> already in the “enrichments” vector,  and this is a protected  member of 
> the FE_Enriched class … so I was thinking to make it public…  maybe you 
> have a different suggestion...
> 
> I want to do this to try a couple of things..
> 
> * I want to test a function like this : Cos ( z) with  z=sqrt ( (x-xo)^2 
> + (y-yo)^2), where  (xo, yo) is the point I need to pass..
> 
> * I would like to implement the  kronecker delta property: f(x)-f(xi) 
> where xi is the coordinate of the dof
> 
> 
>  and I was also thinking that I would probably need to work with DG 
> methods. But I can try the 1D test you suggested first to find out the 
> continuity of my functions
> 
> Thank you for your help.
> 
> Edith
> 
> 
>> On Nov 2, 2017, at 1:49 AM, Denis Davydov > > wrote:
>> 

Re: [deal.II] Creating periodic Boundary Conditions after doing a uniform subdivision

2017-11-10 Thread Phani Motamarri
Dear Wolfgang,

I get the following assertion:


An error occurred in line <3536> of file

in function

void dealii::parallel::distributed::Triangulation::add_periodicity(const
std::vector::cell_iterator>,
std::allocator::cell_iterator>>> &) [with dim = 3, spacedim = 3]

The violated condition was:

this->n_levels() == 1

Additional information:

The triangulation is refined!
--

Thanks
Phani

On Fri, Nov 10, 2017 at 9:07 AM, Wolfgang Bangerth 
wrote:

> On 11/10/2017 01:31 AM, Phani Motamarri wrote:
>
>> However, when I was trying to call the function
>> "triangulation.add_periodicity()" using the refined triangulation
>> object, it gives me an assertion error saying the "triangulation is
>> refined" and exits the code in debug mode.
>>
>
> Jean-Paul already explained what is happening, but I'm curious what the
> exact error message is that you are getting. Can you copy-paste the
> assertion? Maybe we can improve the error message.
>
> Best
>  W.
>
> --
> 
> Wolfgang Bangerth  email: bange...@colostate.edu
>www: http://www.math.colostate.edu/~bangerth/
>
>
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see https://groups.google.com/d/fo
> rum/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.
>

-- 
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.


Re: [deal.II] Creating periodic Boundary Conditions after doing a uniform subdivision

2017-11-10 Thread Phani Motamarri
Dear Jean-Paul,

Thanks for your message. So if the periodicity condition is retained and
propagated when refined, I assume that I need to then only follow steps 4
and 5 to populate new constraintMatrix associated with periodic boundary
conditions of the refined mesh

i.e


4.Gather the periodic face pairs using GridTools::collect_periodic_faces(

)(DoFHandler
)

5.Populate the constraintMatrix for the refined mesh using
DoFTools::make_periodicity_constraints(matchedFacePairs,
constraintPeriodic)



Am I missing anything here in populating constraintMatrix of the refined
mesh?


Regards

Phani



On Fri, Nov 10, 2017 at 3:55 AM, Jean-Paul Pelteret 
wrote:

> Dear Phani,
>
> The problem, as the error message suggests, is that you’re calling
> “triangulation.add_periodicity()” after you’ve performed some (global)
> refinement. You can only call this function on the coarsest mesh, and
> therefore you typically only need to do so once after you’ve created the
> initial mesh. So what you need to do is call this function before
> “triangulation.refine_global()”. Note that whatever internal information
> within the triangulation is set when informing it of  the periodicity
> condition is retained (and propagated consistently to the refined levels)
> when performing subsequent refinement.
>
> I hope that this helps.
>
> Kind regards,
> Jean-Paul
>
>
> On 10 Nov 2017, at 09:31, Phani Motamarri  wrote:
>
> Hello all,
>
> I have an existing triangulation and I have enforced periodic boundary
> conditions and created the relevant constraintMatrix using the following
> five steps just as in the manual:
>
>
>1. Create a mesh
>2. Gather the periodic faces using GridTools::collect_periodic_faces()
>
> 
> (Triangulation
>)
>3. Add the periodicity information to the mesh using
>parallel::distributed::Triangulation::add_periodicity()
>
> 
>4. Gather the periodic faces using GridTools::collect_periodic_faces()
>
> 
> (DoFHandler
>)
>5. Add periodicity constraints using DoFTools::make_
>periodicity_constraints()
>
> 
>
>
> Now I performed a global refinement on this mesh and dofHandler gets
> updated to the new mesh and I need to solve a Poisson problem on the
> refined mesh with periodic boundary conditions. I am trying to follow
> exactly the above steps to create the constraintMatrix related to the
> periodic boundary conditions associated with the newly refined mesh.
> However, when I was trying to call the function "triangulation.add_
> periodicity()" using the refined triangulation object, it gives me an
> assertion error saying the "triangulation is refined" and exits the code in
> debug mode.
>
>  Infact the manual also says that
> "Before this function can be used the Triangulation
> 
>  has
> to be initialized and must not be refined".
>
> Any suggestions would be helpful to set periodic boundary conditions for
> the refined mesh.
>
> Regards
> Phani
>
>
>
> --
> 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.
>
>
> --
> 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.
>

-- 
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 y

Re: [deal.II] Creating periodic Boundary Conditions after doing a uniform subdivision

2017-11-10 Thread Wolfgang Bangerth

On 11/10/2017 01:31 AM, Phani Motamarri wrote:
However, when I was trying to call the function 
"triangulation.add_periodicity()" using the refined triangulation object, it 
gives me an assertion error saying the "triangulation is refined" and exits 
the code in debug mode.


Jean-Paul already explained what is happening, but I'm curious what the exact 
error message is that you are getting. Can you copy-paste the assertion? Maybe 
we can improve the error message.


Best
 W.

--

Wolfgang Bangerth  email: bange...@colostate.edu
   www: http://www.math.colostate.edu/~bangerth/

--
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.


Re: [deal.II] Creating periodic Boundary Conditions after doing a uniform subdivision

2017-11-10 Thread Jean-Paul Pelteret
Dear Phani,

The problem, as the error message suggests, is that you’re calling 
“triangulation.add_periodicity()” after you’ve performed some (global) 
refinement. You can only call this function on the coarsest mesh, and therefore 
you typically only need to do so once after you’ve created the initial mesh. So 
what you need to do is call this function before 
“triangulation.refine_global()”. Note that whatever internal information within 
the triangulation is set when informing it of  the periodicity condition is 
retained (and propagated consistently to the refined levels) when performing 
subsequent refinement.

I hope that this helps.

Kind regards,
Jean-Paul
 
> On 10 Nov 2017, at 09:31, Phani Motamarri  wrote:
> 
> Hello all,
> 
> I have an existing triangulation and I have enforced periodic boundary 
> conditions and created the relevant constraintMatrix using the following five 
> steps just as in the manual:
> 
> Create a mesh
> Gather the periodic faces using GridTools::collect_periodic_faces() 
> 
>  (Triangulation 
> )
> Add the periodicity information to the mesh using 
> parallel::distributed::Triangulation::add_periodicity() 
> 
> Gather the periodic faces using GridTools::collect_periodic_faces() 
> 
>  (DoFHandler 
> )
> Add periodicity constraints using DoFTools::make_periodicity_constraints() 
> 
> 
> Now I performed a global refinement on this mesh and dofHandler gets updated 
> to the new mesh and I need to solve a Poisson problem on the refined mesh 
> with periodic boundary conditions. I am trying to follow exactly the above 
> steps to create the constraintMatrix related to the periodic boundary 
> conditions associated with the newly refined mesh.  However, when I was 
> trying to call the function "triangulation.add_periodicity()" using the 
> refined triangulation object, it gives me an assertion error saying the 
> "triangulation is refined" and exits the code in debug mode.
> 
>  Infact the manual also says that
> "Before this function can be used the Triangulation 
> 
>  has to be initialized and must not be refined".
> 
> Any suggestions would be helpful to set periodic boundary conditions for the 
> refined mesh.
> 
> Regards
> Phani
> 
> 
> 
> -- 
> 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 
> .

-- 
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.


[deal.II] Creating periodic Boundary Conditions after doing a uniform subdivision

2017-11-10 Thread Phani Motamarri
Hello all,

I have an existing triangulation and I have enforced periodic boundary 
conditions and created the relevant constraintMatrix using the following 
five steps just as in the manual:


   1. Create a mesh
   2. Gather the periodic faces using GridTools::collect_periodic_faces() 
   

(Triangulation 
   )
   3. Add the periodicity information to the mesh using 
   parallel::distributed::Triangulation::add_periodicity() 
   

   4. Gather the periodic faces using GridTools::collect_periodic_faces() 
   

(DoFHandler 
   )
   5. Add periodicity constraints using 
   DoFTools::make_periodicity_constraints() 
   



Now I performed a global refinement on this mesh and dofHandler gets 
updated to the new mesh and I need to solve a Poisson problem on the 
refined mesh with periodic boundary conditions. I am trying to follow 
exactly the above steps to create the constraintMatrix related to the 
periodic boundary conditions associated with the newly refined mesh.  
However, when I was trying to call the function 
"triangulation.add_periodicity()" 
using the refined triangulation object, it gives me an assertion error 
saying the "triangulation is refined" and exits the code in debug mode.

 Infact the manual also says that
"Before this function can be used the Triangulation 

 has 
to be initialized and must not be refined".

Any suggestions would be helpful to set periodic boundary conditions for 
the refined mesh.

Regards
Phani


-- 
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.


Re: [deal.II] CellDataStorage with mesh refinement

2017-11-10 Thread 'Frederik S.' via deal.II User Group
Hey Jean-Paul!

Sorry it took so long to answer, I was on a conference this week and didn't 
come to write you.

Thank you for offering your help! I will definitely try to implement this 
and I'll try my best, to have it as close to the current layout of 
ContinuousQuadratureDataTransfer as possible. I'm thinking of giving the 
prepare_for_coarsening_and_refinement-function some kind of switch (only 
continuous data - only discontinuous data - both types of data), 
implementing the corresponding discontinuous interpolation and adding a 
pack_discontiuous_values/unpack_discontiuous_values-function to 
TransferableQuadraturePointData, to see which values are continuous (-> 
pack_values) and which are discontinuous (-> pack_discontiuous_values). I 
think two seperate pack functions would be easier to handle and more 
straightforward than one pack-function with some masking-variable. 
What do you think, does this sound like a good concept?


Am Donnerstag, 2. November 2017 09:50:03 UTC+1 schrieb Jean-Paul Pelteret:
>
> Dear Frederik,
>
> Sorry for taking a little time to get back to you. What you’ve mentioned 
> in terms of a DiscontinuousQuadratureDataTransfer is exactly the concept 
> that we laid out in this issue when we first implemented this class (see 
> the last point in the check list).
> https://github.com/dealii/dealii/issues/2555
> In my opinion, inheriting a value from the closest QP (as if there are 
> patches on a cell where the internal variable values are constant) is good 
> first attempt to deal with this difficult situation. If you’re willing to 
> try to implement it then I’d be happy to provide assistance if you need it.
>
> Best regards,
> Jean-Paul
>
> On 31 Oct 2017, at 12:08, 'Frederik S.' via deal.II User Group <
> dea...@googlegroups.com > wrote:
>
> Hi Jean-Paul,
>
> Thank you for your answer!
> I have a truly discontinuous case, the case you mentioned with internal 
> yield variables. Do you think it will be easier to use the method Timo 
> mentioned "from scratch" or will it be easier to copy the source files of 
> ContinuousQuadratureDataTransfer class and alter them to 
> DiscontinuousQuadratureDataTransfer with 
> some kind of nearest neighbor Interpolation?
> Probably  it will still be reasonable to use 
> ContinuousQuadratureDataTransfer for the continuous data I have. I yet 
> don't absolutely understand which order to use for the mass_quadrature 
> element? data_quadrature is the quadrature rule I'm using in my model 
> and projection_fe has to be of an order high enough to interpolate this 
> data correctly, am I at least right there?
>
> Best regards,
> Frederik 
> PS: Thanks, I forgot GeometryInfo at this point
>
> Am Freitag, 27. Oktober 2017 16:22:14 UTC+2 schrieb Jean-Paul Pelteret:
>
>> Hi Frederik,
>>
>> I’m being wildly presumptuous here (so feel free to say if I’ve presumed 
>> incorrectly), but unless you have a special set of data that needs to be 
>> considered then the ContinuousQuadratureDataTransfer 
>> 
>>  class *may* still be relevant to your use case. There is no requirement 
>> that your global FE space be continuous to use this class. Whats relevant 
>> is this snippet from the documentation:
>>
>> *"the data located at data_quadrature of each cell is L2-projected to the 
>> continuous space defined by a single FiniteElement projection_fe “*
>>
>> What happens is that, for each cell, the specified QP data is projected 
>> to the finite element space specified by the input *projection_fe*, and 
>> then interpolated onto the new cell (or children cells in the case of 
>> refinement) of the refined triangulation. So I think that it might be 
>> possible that you've misinterpreted is what exactly the “Continuous” part 
>> of the class name refers to: It is assumed that for each individual cell 
>> the data is continuous within the cell (i.e. can be directly interpolated 
>> using the input FE), while the data between cells may not be. An example 
>> case where data is truly discontinuous within a cell (and therefore where 
>> this class is not applicable) would be the internal variables for yield or 
>> damage in plasticity. Would you care to elaborate more on what you’re using 
>> this for?
>>
>> Best regards,
>> Jean-Paul
>>
>> P.S. You really want to use the GeometryInfo 
>> 
>>  class 
>> to get this value:
>> *for (unsigned int child=0; child<8; child++){*
>>
>> On 26 Oct 2017, at 18:50, 'Frederik S.' via deal.II User Group > googlegroups.com> wrote:
>>
>> Hello!
>>
>> I've got a question on the usage of CellDataStorage for refined cells for 
>> a parallelized simulation. Below you'll find a sample of the code I use for 
>> refinement. 
>>
>> I'm transf