Re: [deal.II] Re: Thermoelastic Problem

2019-08-08 Thread Muhammad Mashhood
Prof. Wolfgang,
 Thank you for the concern and response. I got your 
point there. I will try it in this way then. :)

On Wednesday, August 7, 2019 at 6:38:53 PM UTC+2, Wolfgang Bangerth wrote:
>
> On 8/5/19 3:40 AM, Muhammad Mashhood wrote: 
> > The only thing is that I was wondering if I might be using extra 
> processing 
> > and memory by defining the fe_temperature, dof_handler_temperature and 
> > fe_values_temperature by defining them again in the solid mechanics 
> program. 
> > And if I am, then would there be any alternative method where I can use 
> the 
> > *const SmartPointer > *and *const 
> SmartPointer > FE_Q > *or something similar**to return *fe_temperature* and 
> > *dof_handler_temperature* from *HeatEquation* class to *SolidMechanics* 
> class 
> > (where they are being used for evaluating q_point temperature as I 
> mentioned 
> > above) ? Thank you! 
>
> Muhammad, 
> you are in essence asking general C++ programming questions about the 
> difference between regular member variables and pointers, and how to 
> return 
> objects by value, by reference, or by pointer. The answer is that yes, you 
> can 
> do as you suggest above. But I would suggest you take a look at a good C++ 
> book or online resource to understand *why* the answer is yes :-) 
>
> Best 
>   W. 
>
> -- 
>  
> 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/fdccffe8-426e-48d3-a90a-cefcdfbe52b2%40googlegroups.com.


Re: [deal.II] Re: Thermoelastic Problem

2019-08-07 Thread Wolfgang Bangerth
On 8/5/19 3:40 AM, Muhammad Mashhood wrote:
> The only thing is that I was wondering if I might be using extra processing 
> and memory by defining the fe_temperature, dof_handler_temperature and 
> fe_values_temperature by defining them again in the solid mechanics program. 
> And if I am, then would there be any alternative method where I can use the 
> *const SmartPointer > *and *const SmartPointer FE_Q > *or something similar**to return *fe_temperature* and 
> *dof_handler_temperature* from *HeatEquation* class to *SolidMechanics* class 
> (where they are being used for evaluating q_point temperature as I mentioned 
> above) ? Thank you!

Muhammad,
you are in essence asking general C++ programming questions about the 
difference between regular member variables and pointers, and how to return 
objects by value, by reference, or by pointer. The answer is that yes, you can 
do as you suggest above. But I would suggest you take a look at a good C++ 
book or online resource to understand *why* the answer is yes :-)

Best
  W.

-- 

Wolfgang Bangerth  email: bange...@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/b4bc06b5-3a20-c74c-69a3-23363d7d0f38%40colostate.edu.


Re: [deal.II] Re: Thermoelastic Problem

2019-08-05 Thread Muhammad Mashhood
Dear Prof. Wolfgang,
  Thank you for your concern and 
understanding. 
Yes you are right. I tried something similar instead of copying the 
triangulation. 
I used *const SmartPointer >* to transfer 
triangulation between both thermal and the solid mechanics classes and 
seemingly the objective of using same triangulation for both parts is full 
filled also with same refinement and coarsening. 
While for the sake of using different *dof_handler* for temperature and 
solid mechanics, I currently have to define again the 
temperature_dof_handler as well as the fe_temperature objects in the solid 
mechanics (class) part to do something like following:

  *dof_handler_temperature.distribute_dofs(fe_temperature);*

*  cell_solid_mech = dof_handler.begin_active();*
*  cell_temperature = dof_handler_temperature.begin_active();*
(for loop for *cell_solid_mech and **cell_temperature* )





*  fe_values_solid_mech.reinit(cell_solid_mech);  
fe_values_temperature.reinit(cell_temperature);  cell_matrix = 
0;  cell_rhs = 0;  
fe_values_temperature.get_function_values(temperature_solution, 
temperature_solution_qpoint);  *
*fe_values_solid_mech[displacement].get_function_symmetric_gradients(displacement_solution,
   
strain_tensor);*  

So in this way, I am successful in using the common triangulation for both 
parts but with different corresponding dof_handlers.
The only thing is that I was wondering if I might be using extra processing 
and memory by defining the fe_temperature, dof_handler_temperature and 
fe_values_temperature by defining them again in the solid mechanics 
program. And if I am, then would there be any alternative method where I 
can use the *const SmartPointer > *and *const 
SmartPointer > *or something similar to return * 
fe_temperature* and *dof_handler_temperature* from *HeatEquation* class to 
*SolidMechanics* class (where they are being used for evaluating q_point 
temperature as I mentioned above) ? Thank you!

On Sunday, August 4, 2019 at 11:54:58 PM UTC+2, Wolfgang Bangerth wrote:
>
> On 8/2/19 4:01 AM, Muhammad Mashhood wrote: 
> > 
> > considering the above scenario as well as the concerns, I would be 
> grateful to 
> > receive any suggestion from your side. Hope I am clear in my 
> description. 
> > Waiting for your kind response. Thank you in advance! 
>
> Instead of copying triangulations, you always have the option of just 
> creating 
> the two objects the same, and then refining them in exactly the same way. 
> Would that solve your problem? 
>
> Best 
>   W. 
>
>
> -- 
>  
> 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/91710d89-ac27-4df9-bbb3-1298853d705f%40googlegroups.com.


Re: [deal.II] Re: Thermoelastic Problem

2019-08-04 Thread Wolfgang Bangerth
On 8/2/19 4:01 AM, Muhammad Mashhood wrote:
> 
> considering the above scenario as well as the concerns, I would be grateful 
> to 
> receive any suggestion from your side. Hope I am clear in my description.
> Waiting for your kind response. Thank you in advance!

Instead of copying triangulations, you always have the option of just creating 
the two objects the same, and then refining them in exactly the same way. 
Would that solve your problem?

Best
  W.


-- 

Wolfgang Bangerth  email: bange...@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/e7e69c28-5bdb-ab5e-5e07-0c716cdf8f19%40colostate.edu.


Re: [deal.II] Re: Thermoelastic Problem

2019-05-28 Thread Wolfgang Bangerth
On 5/24/19 2:46 AM, Muhammad Mashhood wrote:
> Thank you for informative reply and posting this concern on the forum. I am 
> also interested in thermoelastic problem and new use of deal.ii.
> My question is that other than the tutorial steps 26 & 18 or 20,21 & 22, is 
> there pre-developed application at "https://www.dealii.org/; for this field 
> of 
> study?

None that immediately implements the thermoelastic problem. But there are of 
course many building blocks you can find in a variety of tutorial programs and 
code gallery programs.

Best
  W.

-- 

Wolfgang Bangerth  email: bange...@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/1c66e935-f866-a40e-b311-7e9239c7633a%40colostate.edu.
For more options, visit https://groups.google.com/d/optout.