Control points are missing in changed code by reference of cook_membrance.cc

77 views
Skip to first unread message

Lance Zhang

unread,
Jul 1, 2023, 6:10:06 AM7/1/23
to deal.II User Group
Hello,

I updated some parts in cook_membrance.cc to fulfill requests.

But after updating I have one issue.Normally the rectangle has 6 surfaces and control points on each surface as while.In my updated code,I can only see control point in two surfaces.

May I know which parts in code I should change?

image_2023-07-01_120629896.png
Screenshot from 2023-07-01 11-57-07.png

Here is the code from cc file.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1096   template <int dim,typename NumberType>
1097   void Solid<dim,NumberType>::make_grid()
1098   {
1099     // Divide the beam, but only along the x- and y-coordinate directions
1100     std::vector< unsigned int > repetitions(dim, parameters.elements_per_edge);
1101     // Only allow one element through the thickness
1102     // (modelling a plane strain condition)
1103     if (dim == 3){
1104      repetitions[dim-1] = 1;
1105
1106     //repetitions[0] = 0;
1107     //repetitions[1] = 0;
1108     //repetitions[2] = 1;
1109     }
1110 //    const Point<dim> bottom_left = (dim == 3 ? Point<dim>(0.0, 0.0, -0.5) : Point<dim>(0.0, 0.0));
1111   //  const Point<dim> top_right = (dim == 3 ? Point<dim>(48.0, 44.0, 0.5) : Point<dim>(48.0, 44.0));
1112         const Point<dim> top_right =Point<dim>(0.0, 0.0, -10);
1113         const Point<dim> bottom_left =Point<dim>(40,20, 10);
1114         GridGenerator::subdivided_hyper_rectangle(triangulation,
1115                                               repetitions,
1116                                               bottom_left,
1117                                               top_right);
1118 
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Can anyone provide any hint or suggestions?
Thanks in advance!
Lance

Lance Zhang

unread,
Jul 1, 2023, 11:39:35 AM7/1/23
to deal.II User Group
each surface has 32*32 cells.

Wolfgang Bangerth

unread,
Jul 1, 2023, 11:42:43 AM7/1/23
to dea...@googlegroups.com
On 7/1/23 04:10, Lance Zhang wrote:
>
> But after updating I have one issue.Normally the rectangle has 6 surfaces and
> control points on each surface as while.In my updated code,I can only see
> control point in two surfaces.

Lance -- how did you output these points?
Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/


Lance Zhang

unread,
Jul 1, 2023, 12:01:06 PM7/1/23
to dea...@googlegroups.com
Hello Wolfgang,

I used Paraview to review this rectangle and use  the item of Representation->Points to display these points.

And in my option the grid depends on the prm file in the item of Elements per edge.

subsection Geometry
  # Number of elements per long edge of the beam
  set Elements per edge  = 32
(which I guess there is 32 * 32 cells)
image_2023-07-01_175531397.png

I don't know how to set the other surfaces as what it looks like the surface of XoY
image_2023-07-01_175738594.png


The surface of ZOX:

image_2023-07-01_175922479.png

May I know how I can set the values to obtain 32*32 cells?

Best regards
Lance

Wolfgang Bangerth <bang...@colostate.edu> 于2023年7月1日周六 17:42写道:
--
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 a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/2YU5TDG9WfQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/b2fecfc4-6900-999a-fed9-a0b4c41d69ef%40colostate.edu.

Lance Zhang

unread,
Jul 1, 2023, 12:26:32 PM7/1/23
to deal.II User Group
Hello,

Using Gaussian Point in Paraview:

image_2023-07-01_182615990.png

Wolfgang Bangerth

unread,
Jul 1, 2023, 12:43:15 PM7/1/23
to dea...@googlegroups.com
On 7/1/23 10:00, Lance Zhang wrote:
>
> I used Paraview to review this rectangle and use  the item of
> Representation->Points to display these points.

Lance -- I do not know what Paraview does to select and visualize these
points. As you already found out, all of the cells are there when you
visualize the mesh. You'll have to figure out how Paraview defines the points
it shows when you do Representation->Points -- but that's a Paraview question.

Best
W>

Lance Zhang

unread,
Jul 1, 2023, 12:52:25 PM7/1/23
to dea...@googlegroups.com
Hello Wolfgang,

thanks for your reply.

One quick question,is the issue about cells in zox(only 32 cells) surface related to the paraview? (in xoy surface there is 32*32 surfaces)

Best regards
Lance

Wolfgang Bangerth <bang...@colostate.edu> 于 2023年7月1日周六 18:43写道:
--
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 a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/2YU5TDG9WfQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.

Simranjeet Singh

unread,
Jul 2, 2023, 3:37:54 AM7/2/23
to deal.II User Group
Hi Lance,
I am not sure if I understand your question correctly, but if you're asking "Why is there only one division along the z-axis", I believe that is what you're essentially doing with your code-
"1099     // Divide the beam, but only along the x- and y-coordinate directions"
...
"1101     // Only allow one element through the thickness"

Also, in this case, the point cloud looks fine, there are 8 points defining one cell -> six surfaces per cell.
You have 32*32*1 cells in total.
Regards,
Simranjeet

Lance Zhang

unread,
Jul 2, 2023, 8:26:13 AM7/2/23
to dea...@googlegroups.com
Hello  Simranjeet,

thanks for your reply.

I got the solution to the issue.

Best regards
Lance

Simranjeet Singh <simrn...@gmail.com> 于2023年7月2日周日 09:37写道:
Reply all
Reply to author
Forward
0 new messages