On 8/16/21 10:37 AM, ibrahim zawra wrote:

 real problem for graphical board . I used GMSH and identified different material_ids on different parts and made sure it is correct using the function print mesh info. I wrote the class Material data to substitute the coefficient function. but I tried several things but it didn't work.

You don't say what specifically you have tried and how or why it didn't work. But the usual way to do this would be in the assemble_system() function, where you would do

  for (auto &cell : dof_handler.active_cell_iterators())
  {
    fe_values.reinit (cell);

    SymmetricTensor<4,dim> strain_stress_tensor;
    if (cell->material_id() == ...)
      strain_stress_tensor = ...whatever is appropriate for this material...;
    else
      strain_stress_tensor = ...whatever is appropriate for other materials..;

    for (unsigned int q=...)
      for (unsigned int i=...)
        for (unsigned int j=...)
          cell_matrix(i,j) += ...something that uses the strain stress tensor;

    ...
  }

Best
 W.

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 [email protected]
                           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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/243f5027-5e4b-a943-4f9c-028f8155891e%40colostate.edu.

Reply via email to