One more hint maybe. I have just modified the code " Quasi-Static 
Finite-Strain Compressible Elasticity " for my purposes. If anybody know 
how to put out stresses from this code i would be able to implement it into 
my code too.

BBah schrieb am Donnerstag, 19. Mai 2022 um 12:17:07 UTC+2:

> I just can't find any sample or example how to put out my stress tensor. 
> It should be pretty easy because my stress is stored for each cell in my 
> PointHistory class but how to access these stresses and put them out ? I 
> hope somebody can help me
>
> BBah schrieb am Donnerstag, 19. Mai 2022 um 08:47:30 UTC+2:
>
>> Hello Mr. Bangerth,
>>
>> i am just trying to put out the norm of the stresses like in step 18. Is 
>> there a way to save my stress tensor for each cell and put it out ? In step 
>> 18 there is a loop through each cell and the locally owned are used to put 
>> out the stresses. Is there a way to do the same with the workstream object 
>> ? Been searching for a while for a solution but could not find one. Putting 
>> out the strains is easy since the gradient of the displacements are saved 
>> but how to do the same with the stresses ? 
>>
>> Wolfgang Bangerth schrieb am Mittwoch, 18. Mai 2022 um 19:19:36 UTC+2:
>>
>>>
>>> BBah, 
>>> I have to admit that I don't understand what precisely your question is 
>>> -- 
>>> your first email does not contain enough information what you have 
>>> already 
>>> tried, or what exactly you want to do. 
>>>
>>> But regarding what you have below: segmentation faults are the best kind 
>>> of 
>>> error because you can see in a debugger where they happen and, in the 
>>> majority 
>>> of cases, why. So my suggestion would be to run your code in a debugger 
>>> and 
>>> explore the local variables you have at the point where the segmentation 
>>> fault 
>>> appears. 
>>>
>>> Best 
>>> W. 
>>>
>>>
>>> On 5/18/22 06:58, BBah wrote: 
>>> > *** Caution: EXTERNAL Sender *** 
>>> > 
>>> > 
>>> > My PointHistory class does include old_stress but running this code 
>>> leads to a 
>>> > segmentation fault: 
>>> > 
>>> > template<intdim,typenameNumberType> 
>>> > classPointHistory 
>>> >   { 
>>> > public: 
>>> > PointHistory() 
>>> >     : old_stress(SymmetricTensor<2, dim,NumberType>()) 
>>> >     {} 
>>> > 
>>> > virtual~PointHistory() 
>>> >     {} 
>>> > 
>>> >     // The first function is used to create a material object and to 
>>> >     // initialize all tensors correctly: The second one updates the 
>>> stored 
>>> >     // values and stresses based on the current deformation measure 
>>> >     // $\textrm{Grad}\mathbf{u}_{\textrm{n}}$. 
>>> > voidsetup_lqp(constParameters::AllParameters&parameters) 
>>> >     { 
>>> > material= 
>>> > 
>>> std::make_shared<Material_Compressible_Neo_Hook_One_Field_Pert<dim,NumberType>>(
>>>  
>>>
>>> > parameters.mu, parameters.nu); 
>>> > update_values(Tensor<2, dim,NumberType>()); 
>>> >     } 
>>> > 
>>> > voidupdate_values(constTensor<2, dim,NumberType> &Grad_u_n) 
>>> >     { 
>>> > constTensor<2, dim>F=Physics::Elasticity::Kinematics::F(Grad_u_n); 
>>> > constNumberTypedet_F=determinant(F); 
>>> > 
>>> constSymmetricTensor<2,dim,NumberType>C=Physics::Elasticity::Kinematics::C(F);
>>>  
>>>
>>> > old_stress=material->get_s_piola(det_F,C); 
>>> > } 
>>> > } 
>>> > } 
>>> > ... 
>>> > BBah schrieb am Mittwoch, 18. Mai 2022 um 14:52:56 UTC+2: 
>>> > 
>>> > Hello everybody, 
>>> > 
>>> > i am trying to output my stresses by using a similar approach like in 
>>> Step 18: 
>>> > / 
>>> > / 
>>> > // 
>>> > /Vector<double> 
>>> > <
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dealii.org%2Fdeveloper%2Fdoxygen%2Fdeal.II%2FclassVector.html&data=05%7C01%7CWolfgang.Bangerth%40colostate.edu%7C93909e30cad24c0a527308da38ce10db%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637884755678420908%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=pEYhiU6dAl1jTb3WZ33S23bytqGJSYz1lnagt7%2FTMhM%3D&reserved=0>
>>>  
>>>
>>> > norm_of_stress(triangulation 
>>> > <
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dealii.org%2Fdeveloper%2Fdoxygen%2Fdeal.II%2Fp4est__wrappers_8cc.html%23ace00f2f80d9780ef9aa1007e1c22c6a4&data=05%7C01%7CWolfgang.Bangerth%40colostate.edu%7C93909e30cad24c0a527308da38ce10db%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637884755678420908%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=424Lf3OfGKyQK8uC958uVax7ZaDYZiL%2Bb7Dn96hpXY8%3D&reserved=0>.n_active_cells());/
>>>  
>>>
>>> > // 
>>> > /{/ 
>>> > // 
>>> > /for (auto &cell : triangulation 
>>> > <
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dealii.org%2Fdeveloper%2Fdoxygen%2Fdeal.II%2Fp4est__wrappers_8cc.html%23ace00f2f80d9780ef9aa1007e1c22c6a4&data=05%7C01%7CWolfgang.Bangerth%40colostate.edu%7C93909e30cad24c0a527308da38ce10db%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637884755678420908%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=424Lf3OfGKyQK8uC958uVax7ZaDYZiL%2Bb7Dn96hpXY8%3D&reserved=0>.active_cell_iterators())/
>>>  
>>>
>>> > // 
>>> > /if (cell->is_locally_owned())/ 
>>> > // 
>>> > /{/ 
>>> > // 
>>> > /SymmetricTensor<2, dim> 
>>> > <
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dealii.org%2Fdeveloper%2Fdoxygen%2Fdeal.II%2FclassSymmetricTensor.html&data=05%7C01%7CWolfgang.Bangerth%40colostate.edu%7C93909e30cad24c0a527308da38ce10db%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637884755678420908%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=QWJKOTdqFj45PBcEDv99p%2BalxOU0ZX4yWMNDOwI4A9g%3D&reserved=0>
>>>  
>>>
>>> > accumulated_stress;/ 
>>> > // 
>>> > /for (unsigned int q = 0; q < quadrature_formula.size(); ++q)/ 
>>> > // 
>>> > /accumulated_stress +=/ 
>>> > // 
>>> > /reinterpret_cast<PointHistory<dim> *>(cell->user_pointer())[q]/ 
>>> > // 
>>> > /.old_stress;/ 
>>> > // 
>>> > // 
>>> > /norm_of_stress(cell->active_cell_index()) =/ 
>>> > // 
>>> > /(accumulated_stress / quadrature_formula.size()).norm 
>>> > <
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dealii.org%2Fdeveloper%2Fdoxygen%2Fdeal.II%2FnamespaceLocalIntegrators_1_1Divergence.html%23a8bcfc37d2a2be8faa18628a601ecf112&data=05%7C01%7CWolfgang.Bangerth%40colostate.edu%7C93909e30cad24c0a527308da38ce10db%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637884755678420908%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=5zOh%2FfIHg2bBxOS%2Fknjym6WcZdNe2gigXP3kRwUFYGU%3D&reserved=0>();/
>>>  
>>>
>>> > // 
>>> > /}/ 
>>> > // 
>>> > /else/ 
>>> > // 
>>> > /norm_of_stress(cell->active_cell_index()) = -1e 
>>> > <
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dealii.org%2Fdeveloper%2Fdoxygen%2Fdeal.II%2FnamespacePhysics_1_1Elasticity_1_1Kinematics.html%23a9587d5229555daa5b1fa1ba2f8a40adb&data=05%7C01%7CWolfgang.Bangerth%40colostate.edu%7C93909e30cad24c0a527308da38ce10db%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637884755678420908%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=pxCA31XYwa8X3owS8q2PlEvNubYKcuxuy%2BG5JzhWOfQ%3D&reserved=0>+20;/
>>>  
>>>
>>> > // 
>>> > /}/ 
>>> > // 
>>> > /data_out.add_data_vector 
>>> > <
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dealii.org%2Fdeveloper%2Fdoxygen%2Fdeal.II%2FclassDataOut__DoFData.html%23ac43d3b1f6e67424f36e474627fe8e401&data=05%7C01%7CWolfgang.Bangerth%40colostate.edu%7C93909e30cad24c0a527308da38ce10db%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637884755678420908%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=heoPGbf9WzO8QEAS0BcgofppbS2Hzifk9c%2FxRwrDCfo%3D&reserved=0>(norm_of_stress,
>>>  
>>>
>>> > "norm_of_stress");/ 
>>> > / 
>>> > / 
>>> > I have implemented my problem like in Step 44 by using the Workstream 
>>> > object. How can i implement this part of code in my case ? How can i 
>>> call 
>>> > my "old_stress" from the PointHistory for each cell ? 
>>> > 
>>> > -- 
>>> > The deal.II project is located at http://www.dealii.org/ 
>>> > <
>>> https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.dealii.org%2F&data=05%7C01%7CWolfgang.Bangerth%40colostate.edu%7C93909e30cad24c0a527308da38ce10db%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637884755678420908%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=M8lw31enD8i2UeX7%2FirbZi6%2B7KlVUwvp20OAzdaTs6A%3D&reserved=0>
>>>  
>>>
>>> > For mailing list/forum options, see 
>>> > https://groups.google.com/d/forum/dealii?hl=en 
>>> > <
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fforum%2Fdealii%3Fhl%3Den&data=05%7C01%7CWolfgang.Bangerth%40colostate.edu%7C93909e30cad24c0a527308da38ce10db%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637884755678420908%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=brWNnejKbvaTZ6rWfqbr%2FZUFrDHsxRuwvAzd7sUJp%2F0%3D&reserved=0>
>>>  
>>>
>>> > --- 
>>> > 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+un...@googlegroups.com 
>>> > <mailto:dealii+un...@googlegroups.com>. 
>>> > To view this discussion on the web visit 
>>> > 
>>> https://groups.google.com/d/msgid/dealii/24beb6bb-e350-4c8a-a75d-691a48e6f9a2n%40googlegroups.com
>>>  
>>> > <
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fdealii%2F24beb6bb-e350-4c8a-a75d-691a48e6f9a2n%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7CWolfgang.Bangerth%40colostate.edu%7C93909e30cad24c0a527308da38ce10db%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637884755678420908%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=8DnTNBFApFMyjyQpHicCNas8RH6HyGZb0q8aLwlmcJ4%3D&reserved=0>.
>>>  
>>>
>>>
>>>
>>> -- 
>>> ------------------------------------------------------------------------ 
>>> Wolfgang Bangerth email: bang...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/4c20a96b-2412-4eec-b43e-b99f1a85e9d5n%40googlegroups.com.

Reply via email to