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<const DoFHandler<dim> > *and *const SmartPointer<const 
> FE_Q<dim><dim> > *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.

Reply via email to