Re: [deal.II] How to create the magnitude of my solution in a new Vector?

2022-12-12 Thread Abbas
EXACTLY. However, it is not clear to me how can I store that value, so that in the next iteration I would be able to compare it with the current value at the q-point, and take the maximum between the two ,and then store that for the next iteration and so on. On Tuesday, December 13, 2022

Re: [deal.II] Hoe to merge hyper_cube_with_cylindrical_hole with hyper_ball()

2022-12-12 Thread Deepika Kushwah
Thank you Prof. for your reply. I have already attached the code in previous mail. But after reading more about Datapostprocedure class I understood that I can't multiply an array directly to the computed_quantities. I have also checked the attached link. I understand how we can assign

Re: [deal.II] What's the best strategy to speed up assembly?

2022-12-12 Thread Wolfgang Bangerth
On 12/11/22 16:08, Kev Se wrote: Now, for the residual I need this term for my "last solution" vector, but I couldn't find a corresponding function for that problem. What I did find was /fe_iv[component_1].get_function_values((vF_dot_n > 0), last_solution_ghost, tmp_array);/ which, however,

Re: [deal.II] How to create the magnitude of my solution in a new Vector?

2022-12-12 Thread Wolfgang Bangerth
On 12/12/22 05:41, Abbas wrote: I am solving a vector problem similar to step-8. I have aVector solution with u_x and u_y at each dof. I would like to have another Vector magnitude which stores the magnitude \sqrt(u_x^2+u_y^2) at each dof. Now it is clear that solution has double the size of

Re: [deal.II] Factorization of ChunkSparseMatrix

2022-12-12 Thread Wolfgang Bangerth
Corbin, I'm looking to LU factorize a ChunkSparseMatrix instance (the same type as is used in step-51). However, it seems that ChunkSparseMatrix does not inherit from SparseMatrix, so I receive the predictable: undefined reference to 'void dealii::SparseDirectUMFPACK::factorize

Re: [deal.II] Issues with single element boundary conditions

2022-12-12 Thread Wolfgang Bangerth
On 12/12/22 03:55, BBah wrote: When i add the BC i cannot see any movement of my element: constintboundary_id1=11; VectorTools::interpolate_boundary_values(dof_handler_ref, boundary_id1, ZeroFunction(n_components), constraints, fe.component_mask(u_fe));           const int boundary_id=10;

Re: [deal.II] How to access variables in the postprocessor object

2022-12-12 Thread Wolfgang Bangerth
On 12/12/22 08:01, Raúl Aparicio Yuste wrote: These variables are saved on the data_out object, so I use “data_out.write_vtk(output);” and I get them on the vtk file. However, I do not know how to access to these new variables (computed_quantities) from another file different from the one

Re: [deal.II] Hoe to merge hyper_cube_with_cylindrical_hole with hyper_ball()

2022-12-12 Thread Wolfgang Bangerth
1. I have created the following geometry using CellData class. Now I wanted to calculate stresses and strains under dirichlet and Neumann boundary conditions for the attached triangulation. For strain calculations I have used the DataPostprocedure tensor class, but my problem is how to

Re: [deal.II] How to access variables in the postprocessor object

2022-12-12 Thread Jean-Paul Pelteret
Hi Raul, The “input_data” argument to the evaluate_vector_field() function has a method that can be called to retrieve the cell that is currently being processed: https://dealii.org/developer/doxygen/deal.II/structDataPostprocessorInputs_1_1CommonInputs.html#a2bc88342acd8e41314c8c1328bd98a67

Re: [deal.II] Principal stress components

2022-12-12 Thread Jean-Paul Pelteret
Hi Raul, I’m a bit late to the discussion, but maybe this piece of information might still be useful to you. There is a function that computes and returns the eigenvalues and eigenvectors of symmetric tensors:

[deal.II] How to access variables in the postprocessor object

2022-12-12 Thread Raúl Aparicio Yuste
It is not clear to me how to access an object in the structure “Postprocessor”. The idea is that I compute the solution, but I am also computing secondary variables using the postprocessor structure in this way: dealii::DataOut data_out; data_out.attach_dof_handler(dof_handler);

[deal.II] How to create the magnitude of my solution in a new Vector?

2022-12-12 Thread Abbas
Hello, This might be a simple question but I am stuck. I am solving a vector problem similar to step-8. I have a Vector solution with u_x and u_y at each dof. I would like to have another Vector magnitude which stores the magnitude \sqrt(u_x^2+u_y^2) at each dof. Now it is clear that

[deal.II] Re: Principal stress components

2022-12-12 Thread Raúl Aparicio Yuste
Hello, Please find attached a script in which I calculate the principal stress components by using the eigen library. This example is in 2D for a particular case, but this piece of code can be modified to generalise the calculation of the principal stress components in 3D. Hope it will be

[deal.II] Issues with single element boundary conditions

2022-12-12 Thread BBah
Hello, it is the first time i am using the GridGenerator and i am trying to create just a single element (3D) and add dirichlet BC on one side. I did the following: repetitions[0] = 1; repetitions[1] = 1; // Only allow one element through the thickness // (modelling a plane