Re: [deal.II] Implementation of Broyden's method

2018-12-10 Thread 'Maxi Miller' via deal.II User Group
Still, that would require me to change every vector from TrilinosWrappers::MPI::Vector to LinearAlgebra::distributed::Vector. Is there any advantage of doing that? (And is there any advantage of using TrilinosWrappers compared to LinearAlgebra (i.e. the built-in functions from deal.II)? Am Mon

Re: [deal.II] Trouble using VectorTools::interpolate_based_on_material_id

2018-12-10 Thread Hamed Babaei
I forgot to mention that I am using deal.ii 9.0.0 version. Thanks -- 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.

Re: [deal.II] Trouble using VectorTools::interpolate_based_on_material_id

2018-12-10 Thread Hamed Babaei
Dear Wolfgang, > In other words, there are no NaNs for me. What do you get? And what > version of > deal.II are you using? > Thank you very much for your help. In fact, what you got is for the case that the material_id for the entire domain (both half of cubes) is included in function_map

Re: [deal.II] Trouble using VectorTools::interpolate_based_on_material_id

2018-12-10 Thread Wolfgang Bangerth
On 12/10/18 10:17 AM, Hamed Babaei wrote: > > I would like to forcefully determine the solution at some regions of my > domain > in which I solve an initial value problem. Therefore, I chose to > use VectorTools::interpolate_based_on_material_id function to implement the > desired constant val

Re: [deal.II] Implementation of Broyden's method

2018-12-10 Thread Bruno Turcksin
Le lun. 10 déc. 2018 à 15:37, 'Maxi Miller' via deal.II User Group a écrit : > > Do the deal.II-internal solvers work on Trilinos-MPI-Vectors? Or is there a > way to "recreate" a trilinos-matrix in the same way as I did here? deal.II solvers are templated on the matrix type, the vector type, and

Re: [deal.II] Implementation of Broyden's method

2018-12-10 Thread 'Maxi Miller' via deal.II User Group
Do the deal.II-internal solvers work on Trilinos-MPI-Vectors? Or is there a way to "recreate" a trilinos-matrix in the same way as I did here? Am Montag, 10. Dezember 2018 21:36:10 UTC+1 schrieb Bruno Turcksin: > > Le lun. 10 déc. 2018 à 15:27, 'Maxi Miller' via deal.II User Group > > a écrit :

Re: [deal.II] Implementation of Broyden's method

2018-12-10 Thread Bruno Turcksin
Le lun. 10 déc. 2018 à 15:27, 'Maxi Miller' via deal.II User Group a écrit : > LinearAlgebraTrilinos::SolverCG solver (solver_control); You cannot use Trilinos solvers with your own matrix type. With Trilinos solvers, you need to use a Trilinos matrix. You want to use deal.II's own solvers wh

Re: [deal.II] Implementation of Broyden's method

2018-12-10 Thread 'Maxi Miller' via deal.II User Group
I tried to implement that (as in example 20) with a class for the matrix class jacobian_approximation : public Subscriptor { public: jacobian_approximation(std::function residual_function, const MPI_Comm &mpi_communicator, const IndexSet& d

Re: [deal.II] Evaluation of (grad u)^T values at the quadrature points

2018-12-10 Thread Jaman
Thank you so much. I appreciate your help. On Monday, December 10, 2018 at 1:54:28 PM UTC-5, Wolfgang Bangerth wrote: > > On 12/10/18 11:25 AM, Jaman wrote: > > > > I have stuck in another piece of the weak form. I have an inner product > (\grad > > u^{n-1}:\grad u^n I, \grad v), where : is t

Re: [deal.II] Evaluation of (grad u)^T values at the quadrature points

2018-12-10 Thread Wolfgang Bangerth
On 12/10/18 11:25 AM, Jaman wrote: > > I have stuck in another piece of the weak form. I have an inner product > (\grad > u^{n-1}:\grad u^n I, \grad v), where : is the contraction between the two > tensors,  "I" is the identity matrix and v is the test function. > > I understand that scalar_pr

Re: [deal.II] Evaluation of (grad u)^T values at the quadrature points

2018-12-10 Thread Jaman
Dear Wolfgang, I have stuck in another piece of the weak form. I have an inner product (\grad u^{n-1}:\grad u^n I, \grad v), where : is the contraction between the two tensors, "I" is the identity matrix and v is the test function. I understand that scalar_product(old_time_gradient_values[q],

[deal.II] Re: Trouble using VectorTools::interpolate_based_on_material_id

2018-12-10 Thread Hamed Babaei
I just realized I made a mistake and uploaded the executable instead of the mini code itself! It is uploaded again here. On Monday, December 10, 2018 at 11:17:40 AM UTC-6, Hamed Babaei wrote: > > Hello, > > I would like to forcefully determine the solution at some regions of my > domain in whi

Re: [deal.II] How to solve a 2D problem on the boundary in 3D simulations

2018-12-10 Thread Wolfgang Bangerth
On 12/9/18 9:02 PM, Jiaqi ZHANG wrote: > > > I am using DGP to solve a 3D problem which requires me to first solve a 2D > problem (boundary condition) on the boundary at each time step. > My question is how to assemble a 2D problem on the boundary in 3D simulations. > I cannot find similar tutor

Re: [deal.II] Evaluation of (grad u)^T values at the quadrature points

2018-12-10 Thread Wolfgang Bangerth
On 12/9/18 9:49 PM, Jaman wrote: > > If I have a weak form as ((grad u)^T, grad v), can I write its contribution > to > the system matrix in the same way as shown in the blue text? > > for (unsigned int q=0; q    { >     for (unsigned int k=0; k        grad_phi[k] =  fe_values.gradient (k,q)