[deal.II] Re: Problem with postprocessor

2017-05-31 Thread 'Seyed Ali Mohseni' via deal.II User Group
I did another trick: Increasing G_c has the same effect to achieve purely elastic behavior. So, I chose a high enough G_c value and it works! I obtain the same results and the duh values grow correctly. Still I cannot understand fully why when cracking is initiated, there is no increase of the

[deal.II] Re: Problem with postprocessor

2017-05-31 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear Thomas, I already run the example with uniform mesh, hence global refinement with 0 refinement cycles. The problem is, a specimen with 100 or 1000 elements is difficult to check due to the terminal output being flooded. I could just output the result for one element, but then wheres the

[deal.II] Problem with postprocessor

2017-05-31 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear Thomas Wick, Dear Timo Heister, I wrote an additional postprocessor in your existing phase-field code to allow postprocessing of strain, stress or elastic energy. Unfortunately, it seems like the STRAIN_XX and STRAIN_XY is not increasing in each step while the STRAIN_YY increases

[deal.II] Re: Crack propagation

2017-04-10 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear Denis Davydov, I am trying to implement the pack_values() and unpack_values() functions for a FullMatrix, but the function itself in quadrature_point_data.h is defined using a vector of double values only. Nevertheless, my initial approach would be the following: struct MyQData: public

[deal.II] Re: Crack propagation

2017-04-09 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear Thomas, Sure, my bad. I am sorry for the inconvenience it may have caused you and Timo. Unfortunately, I was just paying attention to the input text file and oversaw the changes I actually made. Won't happen again. ;) Regarding the speedup, I just figured out how to make use of the

[deal.II] Re: Crack propagation

2017-04-09 Thread 'Seyed Ali Mohseni' via deal.II User Group
Hi, I just figured out how to make use of the CellDataStorage function which has been recently implemented within deal.II. First of all, I want to thank Denis Davydov and Jean-Paul Pelteret for implementing it so nice and stable. :) Without your recent work, I probably would have to find a way

[deal.II] Re: Crack propagation

2017-04-07 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear Thomas, I found the problem. Your version works exactly like discussed in your paper, even faster with my Intel i7, namely around 1400 s. The timeconsuming part is the computation of my B-operator. The B-operator computation is implemented inside* assemble_system (bool residual_only):*

[deal.II] Re: Crack propagation

2017-04-07 Thread 'Seyed Ali Mohseni' via deal.II User Group
Hi, > Each Core i7 CPU has maximum 4 physical cores. So, in MPI mode, solving > the simulation using 4 core is faster than 8 cores in your computer. > This is not true. I checked it, it is slower. Best, Seyed Ali -- The deal.II project is located at http://www.dealii.org/ For mailing

[deal.II] Re: Crack propagation

2017-04-06 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear Thomas, I was wondering, why my computation is rather slow compared to your results within your paper. For instance regarding the shear test you mention that for global refinement the total time amounts to 5036 s. In my case each step takes around 200 s which would result in a total time

[deal.II] Re: Crack propagation

2017-04-01 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear Thomas, Thank you. I checked the values and they are similar. Within your predictor-corrector approach, I assume that you somehow exchange data between each step in order to be able to interpolate the old solution. Am I able to use the same functions to store energy data in each Gauss

[deal.II] Re: Crack propagation

2017-04-01 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear Thomas, Exactly, I did that already. It seems it is identical, but I would like to see, if your energy variable psi_e is identical to mine. This is quite cumbersome for 500 elements or more to check. I mean the computation in the first steps is anyway independent from the phase-field

[deal.II] Re: Crack propagation

2017-03-31 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear Thomas, I would like to check the elastic energy you compute and compare it to my results. For a single element the computation in an elastic regime should be independent from the phase-field approach in primary steps. BR, Seyed Ali -- The deal.II project is located at

[deal.II] Re: Crack propagation

2017-03-31 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear Thomas, I tried what you suggested and it works. Thank you :) There is a slight problem though when I try to compute the same example with the same boundary conditions for the unit_square_4.inp file. I am trying to run a one element test using your phase-field approach. It works, but

[deal.II] Crack propagation

2017-03-30 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear Timo Heister and Thomas Wick, I am trying to run your phase-field crack propagation example, namely the single edge notched tension test, with less than 9 Gauss points. Hence, the fe variable is initialized using FE_Q(degree) where degree cannot be 0. This means degree should always be >1

[deal.II] Re: Interaction with the boundary description for a parallel distributed triangulation

2017-03-14 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear Jean-Paul, > Yes, this looks like a copy-paste error in the documentation. Would you > like to submit a patch to correct it? > Sure. How and where can I submit a patch? When you refine cells at a boundary, the child cell's faces will inherit > the boundary and manifold ID's of the

[deal.II] Interaction with the boundary description for a parallel distributed triangulation

2017-03-13 Thread 'Seyed Ali Mohseni' via deal.II User Group
Hi, I assume there is a mistake within the documentation of parallel::distributed::Triangulation class. Below the "detailed description" part within the second box there is written . Doesn't it have to be ? With regard to the same topic: I would like to know, if it is possible

[deal.II] Re: Access specific element within a distributed triangulation

2017-03-08 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear Bruno, Thanks. That's even better and even in just a single line of code. ;) MPI_Bcast(, 1, MPI_DOUBLE, max_rank, mpi_com); Best, Seyed Ali -- 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 ---

[deal.II] Re: Access specific element within a distributed triangulation

2017-03-08 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear Bruno, Thanks. That's even better and even in just a single line of code. ;) MPI_Bcast(, 1, MPI_DOUBLE, max_rank, mpi_com); Best, Seyed Ali -- 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

[deal.II] Re: Access specific element within a distributed triangulation

2017-03-08 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear all, I was able to solve the MPI variable problem. For the users who may have the same issue once: if ( this_mpi_process == max_rank ) { for (unsigned int i = 0; i < n_mpi_processes; ++i) { if ( i != max_rank ) MPI_Send(, 1, MPI_DOUBLE, i, 0, mpi_com); } } else {

[deal.II] Re: Access specific element within a distributed triangulation

2017-03-08 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear all, I was able to solve the MPI variable problem. For the users who may have the same issue once: if ( this_mpi_process == max_rank ) { for (unsigned int i = 0; i < n_mpi_processes; ++i) { if ( i != max_rank ) MPI_Send(, 1, MPI_DOUBLE, i, 0, mpi_com); } } else {

[deal.II] Re: Access specific element within a distributed triangulation

2017-03-08 Thread 'Seyed Ali Mohseni' via deal.II User Group
@Prof. Bangerth: I will try to learn debugging parallel code and also to follow your words of advice. Please do not apologize since I don't think you ever became rude. I mean, after 1 emails I would definitely not be as calm as you. Thank you. :) @Daniel: Thumbs up. From your words I

[deal.II] Re: Access specific element within a distributed triangulation

2017-03-07 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear all, With MPI_Allreduce it works like a charm. Thank you very much everyone. Especially Prof. Bangerth and Daniel. Kind regards, S. A. Mohseni -- 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

[deal.II] Re: Access specific element within a distributed triangulation

2017-03-07 Thread 'Seyed Ali Mohseni' via deal.II User Group
I think I figured it out ;) After thinking about your suggestion, Prof. Bangerth. It came to my mind, that the result of my max_rank variable is stored on a specific processor due to MPI_Reduce. That means I cannot access these data parts without being currently at the correspinding processor

[deal.II] Re: Access specific element within a distributed triangulation

2017-03-03 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear Daniel, Thanks a lot. I understand now. Example 3 is exactly what I need, I try the MPI_MAXLOC approach. But is it necessary to #include ? Since deal.II won't recognize functions such as MPI_Comm_rank (MPI_COMM_WORLD, ) for

[deal.II] Re: Access specific element within a distributed triangulation

2017-03-02 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear Daniel, Thank you. Does your approach also apply to MPICH? Since I am using MPICH, I wonder, if this command can be used there also. This struct variable, is there an example within deal.II steps? Or do you have an example in C++ I can learn from. To be honest I am not yet very familiar

[deal.II] Re: Access specific element within a distributed triangulation

2017-03-02 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear Prof. Bangerth and Jean-Paul, What I understood so far is, that the Utilities::MPI::max() function computes the maximum between all processors for each row of my vector. This means if I have a vector of 20 entries, each entry has 8 values distributed on 8 cores for instance. As a result,

[deal.II] Re: Access specific element within a distributed triangulation

2017-02-26 Thread 'Seyed Ali Mohseni' via deal.II User Group
Thank you everyone. I understand your suggestions. From what I learned now in deal.II is, that each cell is owned by a specific processor which means I cannot access the information within a locally owned cell. That's why I have to loop over all cells and work with distributed data without

[deal.II] Re: Access specific element within a distributed triangulation

2017-02-26 Thread 'Seyed Ali Mohseni' via deal.II User Group
Thank you everyone. I understand your suggestions. From what I learned now in deal.II is, that each cell is owned by a specific processor which means I cannot access the information within a locally owned cell. That's why I have to loop over all cells and work with distributed data without

[deal.II] Re: Access specific element within a distributed triangulation

2017-02-24 Thread 'Seyed Ali Mohseni' via deal.II User Group
Thanks for your suggestions. Generally, in FEM you number elements like in the below picture: I understand of course, that the cells (elements) in deal.II are

[deal.II] Access specific element within a distributed triangulation

2017-02-24 Thread 'Seyed Ali Mohseni' via deal.II User Group
Hi, Is it possible to access a specific element within a parallel distributed triangulation by means of the following procedure for instance: typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); for (; cell != endc; ++cell) { if

[deal.II] Re: Synchronization issue for parallel computation of material forces

2017-02-06 Thread 'Seyed Ali Mohseni' via deal.II User Group
Maybe this helps: How do you compute "reaction forces" within deal.II? Did you ever compute reaction forces and write them as output within a parallel framework? Best, Seyed Ali -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see

[deal.II] Re: Synchronization issue for parallel computation of material forces

2017-02-04 Thread 'Seyed Ali Mohseni' via deal.II User Group
Thanks, Jean-Paul. I was thinking maybe something in the same way like step-40. I tried your approach, but can I just set it equal to each other? I did the following: *Main class* LA::MPI::Vector configurational_forces; LA::MPI::Vector local_configurational_forces; *setup_system() class*

[deal.II] Re: Synchronization issue for parallel computation of material forces

2017-02-02 Thread 'Seyed Ali Mohseni' via deal.II User Group
And this is the procedure how I output them: DataOut data_out; data_out.attach_dof_handler(dof_handler); std::vector configurational_forces_magnitude(dim, "config_forces"); std::vector configurational_forces_interpretation(dim, DataComponentInterpretation::component_is_part_of_vector);

[deal.II] Synchronization issue for parallel computation of material forces

2017-02-02 Thread 'Seyed Ali Mohseni' via deal.II User Group
Hi, With regard to the approach which was recently discussed in: https://groups.google.com/d/msg/dealii/25C57MYvfpg/JFB8aXKoAgAJ There is a little problem when computing the material forces in a parallel setting.

[deal.II] Re: Shape function derivatives

2017-02-01 Thread 'Seyed Ali Mohseni' via deal.II User Group
@Prof. Bangerth: Thank you very much :) Finally, I understand how the stiffness matrix in step-18 is constructed. Your shape function derivatives are basically already the B-operator. Kind regards, S. A. Mohseni -- The deal.II project is located at http://www.dealii.org/ For mailing

[deal.II] Shape function derivatives

2017-02-01 Thread 'Seyed Ali Mohseni' via deal.II User Group
Hi, I found some issue when constructing the FE B-operator for multiple elements. In a single element it works perfectly. My approach is the following: template FullMatrix get_b_operator (const FEValues _values, const unsigned int dofs_per_cell, const unsigned int q) { FullMatrix tmp(dim,

[deal.II] Re: Assembly of material forces

2017-01-31 Thread 'Seyed Ali Mohseni' via deal.II User Group
@Prof. Bangerth: The upper one where pseudocolor is written, is from VisIt and deal.II. Below as a reference I showed my results from the C++ code. Both simulations are done using Q4 quadrilateral elements. There are no triangular elements here and the meshes are identical. They are

[deal.II] Re: Assembly of material forces

2017-01-31 Thread 'Seyed Ali Mohseni' via deal.II User Group
@Prof. Bangerth: The upper one where pseudocolor is written, is from VisIt and deal.II. Below as a reference I showed my results from the C++ code. Both simulations are done using Q4 quadrilateral elements. There are no triangular elements here and the meshes are identical. They are

[deal.II] Re: Assembly of material forces

2017-01-28 Thread 'Seyed Ali Mohseni' via deal.II User Group
First of all, thank you for all your suggestions. They helped me a lot, especially from Prof. Bangerth and Jean-Paul. Many thanks ;) I solved the assembly by listening to Prof. Bangerth's advice that I should try to implement things in a deal.II way. And after Jean-Paul told me to take a look

[deal.II] Re: Assembly of material forces

2017-01-28 Thread 'Seyed Ali Mohseni' via deal.II User Group
First of all, thank you for all your suggestions. They helped me a lot, especially from Prof. Bangerth and Jean-Paul. Many thanks ;) I somehow figured the assembly out by listening to Prof. Bangerth's advice that I should try to solve it the deal.II way. And after Jean-Paul told me to take a

[deal.II] Re: Assembly of material forces

2017-01-25 Thread 'Seyed Ali Mohseni' via deal.II User Group
@Daniel: So you have a FESystem<2>(FE_Q<2>(1),2) element, i.e. linear continuous > elements with two components, and the vector represents corresponding local > DoF values? > Exactly. I defined first FESystem fe; and then template SolidMechanics::SolidMechanics(): ..., fe(FE_Q(1), dim),

[deal.II] Re: Assembly of material forces

2017-01-25 Thread 'Seyed Ali Mohseni' via deal.II User Group
@Daniel: So you have a FESystem<2>(FE_Q<2>(1),2) element, i.e. linear continuous > elements with two components, and the vector represents corresponding local > DoF values? > Exactly. I defined first FESystem fe; and then template SolidMechanics::SolidMechanics(): ..., fe(FE_Q(1), dim),

[deal.II] Re: Assembly of material forces

2017-01-25 Thread 'Seyed Ali Mohseni' via deal.II User Group
My problem is not the theory. I am just not a deal.II expert and therefore it is still quite difficult for me to implement my approach. Going in to theoretical detail would take maybe much longer. Maybe it is better instead, if I reformulate my question like this: There is a vector called

[deal.II] Re: Assembly of material forces

2017-01-25 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear Prof. Bangerth, It fails, because I tried to use the same procedure for the standard assembly such as in step-18 or step-40 and I received some awkward contour plots which won't match with what I showed from the C++ code. Hence, fails is refered to my own failure in understanding the core

[deal.II] Assembly of material forces

2017-01-24 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear deal.II experts, I have a question regarding the assembly of material forces also known as configurational forces. First of all, I have constructed my own solid mechanics code within deal.II which I already validated with our own C++ code. Hence, the deal.II code works until here.

[deal.II] Re: Postprocessing using the same variable twice

2017-01-22 Thread 'Seyed Ali Mohseni' via deal.II User Group
Thank you, Daniel. I solved my problem already in the following way before reading your post: DataOut data_out; data_out.attach_dof_handler(dof_handler); // [ DISPLACEMENT COMPONENTS ]= std::vector displacement_components; switch (dim) { case 1:

[deal.II] Postprocessing using the same variable twice

2017-01-22 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear all, Is it possible to output the magnitude of displacements and its components all together? std::vector data_component_interpretation(dim, DataComponentInterpretation:: component_is_part_of_vector); The above allows me to output the displacements as a vector field and shows one

[deal.II] Re: Elastic energy computation

2017-01-16 Thread 'Seyed Ali Mohseni' via deal.II User Group
Thanks, I understand now. I just deleted the post, because I misunderstood what you meant earlier. I thought you are refering to the left eps_phi_i (first) and right eps_phi_j (second). But you were talking about: template inline SymmetricTensor<2,dim> get_strain (const

[deal.II] Re: Elastic energy computation

2017-01-16 Thread 'Seyed Ali Mohseni' via deal.II User Group
I checked the second one. It doesn't coincide with the strain tensor I obtain from the energy computation after I solve the system, e.g. - in GAUSS point 1 - ASSEMBLY STRAIN TENSOR 0 0.105662 0.105662 0.211325 ENERGY STRAIN TENSOR 0.001081 -0.000738 -0.000738 -0.008525 ... etc.

[deal.II] Elastic energy computation

2017-01-16 Thread 'Seyed Ali Mohseni' via deal.II User Group
Hi, Is it possible to compute the elastic energy for a simple 2D cube before we solve the system? Because I checked the displacement gradients and they are 0 due to having no solution probably. Hence, I wonder how would someone be able to compute the elastic energy with the following formula:

[deal.II] Re: Strain tensor and displacement gradients

2017-01-14 Thread 'Seyed Ali Mohseni' via deal.II User Group
I checked the Gauss points within my normal computation using FEValues and compared them with the evaluation points from the DataPostprocessor: GAUSS POINT COORDINATES 0.211325 0.211325 0.788675 0.211325 0.211325 0.788675 0.788675 0.788675 EVALUATION POINTS 0.00

[deal.II] Re: Strain tensor and displacement gradients

2017-01-14 Thread 'Seyed Ali Mohseni' via deal.II User Group
>From what I learned, all information we obtain from FEValues is automatically mapped from the unit cell to the physical space/coordinates. By patch vertices you mean the nodes of each element, hence DataPostprocessor gives me the gradients with respect to the mapped gauss points to the nodes

[deal.II] Re: Strain tensor and displacement gradients

2017-01-14 Thread 'Seyed Ali Mohseni' via deal.II User Group
>From what I learned, all informtion we obtain from FEValues is aoutomatically mapped from the unit cell to the physical space/coordinates. By patch vertices you mean the nodes of each element, hence DataPostprocessor gives me the gradients with respect to the mapped gauss points to the nodes

[deal.II] Re: Examples makefile

2017-01-14 Thread 'Seyed Ali Mohseni' via deal.II User Group
Hi Victor, I would check first of all, if you compiled Trilinos with the correct settings, e.g. mkdir build cd build cmake \ -DCMAKE_C_COMPILER=/path_to_your_installation/mpich-3.2/bin/mpicc \ -DCMAKE_CXX_COMPILER=/path_to_your_installation/mpich-3.2/bin/mpicxx \

[deal.II] Re: Strain tensor and displacement gradients

2017-01-14 Thread 'Seyed Ali Mohseni' via deal.II User Group
Hi, Using the postprocessor approach according to step-33 I have computed the strain tensor successfully by means of the Postprocessor::compute_derived_quantities_vector function and its displacement gradient duh. Unfortunately, within an arbitrary function called right after I solve the

[deal.II] Strain tensor and displacement gradients

2017-01-14 Thread 'Seyed Ali Mohseni' via deal.II User Group
Hi, Using the postprocessor approach according to step-33 I have computed the strain tensor successfully by means of the Postprocessor::compute_derived_quantities_vector function and its displacement gradient duh. Unfortunately, within an arbitrary function called right after I solve the

[deal.II] Re: Relationships between material parameters

2017-01-12 Thread 'Seyed Ali Mohseni' via deal.II User Group
Your ideas are very constructive and useful, I didn't think it would be so complex to make it general in deal.II. I am not an expert still, but how about we make it something similar to the FEValues class where you just specify the necessary parameters and the desired conversion. @ Jean-Paul:

[deal.II] Relationships between material parameters

2017-01-10 Thread 'Seyed Ali Mohseni' via deal.II User Group
Hi everyone, I am just implementing some material parameter relationships such as lambda = E * v / (1 + v) / (1 - 2 * v) for instance. There is a table for such conversion of quantities. Would it be beneficial to have such a library that computes and converts these quantities automatically

[deal.II] Relationship between material parameters

2017-01-10 Thread 'Seyed Ali Mohseni' via deal.II User Group
Hi everyone, I am just implementing some material parameter relationships such as lambda = E * v / (1 + v) / (1 - 2 * v) for instance. There is a table for such conversion of quantities. Would it be beneficial to have such a library that computes and converts these quantities automatically