[deal.II] Re: Periodic Boundary Condition

2017-01-06 Thread Daniel Arndt
Hamed, [...] > Considering for example the term [*M*+k*theta**A*]**U* in my right-hand > side, since the mass matrix(M) and laplace matrix(A) in the local level > have the size of *dofs_per_cell * dofs_per_cell* I need to have a local > solution vector to multiply with them. However, > FEVal

[deal.II] Re: Periodic Boundary Condition

2017-01-05 Thread Hamed Babaei
Dear Daniel, You can obtain local DoF values from a global FE vector using > FEValuesBase::get_function_values [1], create the right-hand side locally > as you wish and use ConstraintMatrix::distribute_local_to_global to create > the global right-hand side. This is outlined in step-21 for exam

[deal.II] Re: Periodic Boundary Condition

2017-01-05 Thread Daniel Arndt
Hamed, [...] > However, to be able to use ConstraintMatrix::distribute_local_to_global, I > can assemble system_matrix in local level instead of global level. Having > that said, I can not do so for the system_rhs because solution and > old_solution vectors are global vectors. > You can obtai

[deal.II] Re: Periodic Boundary Condition

2017-01-02 Thread Hamed Babaei
Dear Daniel, Happy new year. I wish a wonderful new year for you ! This is only (directly) possible if you are not using inhomogeneous > constraints. In that case, you can call > ConstraintMatrix::distribute_local_to_global separately for matrix and > right-hand side. > I am struggling to ap

Re: [deal.II] Re: Periodic boundary condition in Meshworker.

2016-11-16 Thread sudarshan kumar
Thanks a lot J-P and Daniel, Let me please see how it works. Sudarshan On Wed, Nov 16, 2016 at 7:16 PM, Daniel Arndt < d.ar...@math.uni-goettingen.de> wrote: > Sudarshan, > > J-P is right. You can use constraints within the MeshWorker framework and > hence also periodic boundary conditions

[deal.II] Re: Periodic Boundary Condition

2016-11-16 Thread Daniel Arndt
Hamed, As you can see my assembly in the first post, my system_matrix and > system_rhs are not made directly from cell_system_matrix or > cell_system_rhs, but they are the result of some manipulations on > mass_matrix, laplase_matrix and nl_matrix (the same approach as step_25) > that have alr

[deal.II] Re: Periodic boundary condition in Meshworker.

2016-11-16 Thread Daniel Arndt
Sudarshan, J-P is right. You can use constraints within the MeshWorker framework and hence also periodic boundary conditions. In more detail, you have to provide the assembler with the ConstraintMatrix. In addition to step-45 for periodic boundary conditions, you should also have a look to step-

[deal.II] Re: Periodic boundary condition in Meshworker.

2016-11-16 Thread Jean-Paul Pelteret
Sudarshan, Does MeshWorker take a constraints matrix? I suspect that it does . If so then yes, you should be able to implement periodic boundary conditions. I

[deal.II] Re: Periodic Boundary Condition

2016-11-16 Thread Hamed Babaei
Dear Daniel, As you can see my assembly in the first post, my system_matrix and system_rhs are not made directly from cell_system_matrix or cell_system_rhs, but they are the result of some manipulations on mass_matrix, laplase_matrix and nl_matrix (the same approach as step_25) that have alrea

[deal.II] Re: Periodic Boundary Condition

2016-11-16 Thread Daniel Arndt
Hamed, Let me ask a more specific question. I was wondering how to apply any sort > of constraints ( that may be periodic BC or so) in an assembly function > like mine in which some manipulations is done on mass_matrix and > laplase_matrix. > Following some posts in forum I found I can use void

[deal.II] Re: Periodic Boundary Condition

2016-11-16 Thread Hamed Babaei
Dear Daniel, Let me ask a more specific question. I was wondering how to apply any sort of constraints ( that may be periodic BC or so) in an assembly function like mine in which some manipulations is done on mass_matrix and laplase_matrix. Following some posts in forum I found I can use void

[deal.II] Re: Periodic Boundary Condition

2016-11-15 Thread Daniel Arndt
Hamed, Am Dienstag, 15. November 2016 19:09:18 UTC+1 schrieb Hamed Babaei: > > Hi all, > > Following step-45, I am going to implement periodic boundary condition on > my code for a Thermo-elastic problem, in which the thermal and elastic > parts are solved separately (I have two different dof_ha

[deal.II] Re: Periodic Boundary Condition

2016-11-15 Thread Hamed Babaei
In addition I just tried to apply periodic boundary condition constraints at the end of assembly using, void ConstraintMatrix::condense. However, it seems this function doesn't work with TrilinosWrappers::sparsematrix but dealii ones. Thanks -- The deal.II project is located at http://www.dea