Re: [deal.II] Question about how to calculate derivative of stiffness matrix with density
On 9/19/23 09:32, Lance Zhang wrote: I would like to use this method to get the optimization of a original object beam to get a shape of optimized object, for example , the shape of bridge. Lance: As I have mentioned on other occasions before, you need to learn to ask better questions. I asked > Right. But what's the operation you want to do with dJ/dΘ? Do you actually > have to have it element by element, or do you want to do a product with > this, etc? but your reply does not actually address this. Instead, your reply was at a level that is far too high and has nothing to do with the concrete problem of dJ/dΘ any more. People have written whole books and PhD theses about shape optimization; the topic is far larger than what can be answered on a mailing list. There is an art to asking questions. If you ask too specific a question (say, how do I store dJ/dΘ), then we can give you an answer that does that specific thing but that does not lead to a practical algorithm because it does not scale to large problems; but because you do not provide us with the context, we can not know what it is you want to do that led you to this very specific question. On the other hand, if questions are too general (say, "I want to do shape optimization"), then all we can really do is to say "go to the library and look up specific algorithms". There is a middle ground of questions of the form "I am working on solving shape optimization problems and in the algorithm I want to implement, there is a step where I need to multiply dJ/dΘ by a vector x so that I can get the search direction; how does one efficiently implement this kind of step? Do I need to store dJ/dΘ somehow, and if so how?" Oftentimes, this sort of question involves writing half a page of text, but you will get better answers if you provide context. My suggestion would be that you work more closely with your adviser where you can go back and forth between questions and answers more easily than is possible on a mailing list. Perhaps your adviser can also help you find where that middle ground of good questions is. That's the role of an adviser, and that's a role we cannot fill on the mailing list. 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/a41ace2f-d681-3ba9-c61a-9abec511879f%40colostate.edu.
Re: [deal.II] Question about how to calculate derivative of stiffness matrix with density
Hello Wolfgang, I would like to use this method to get the optimization of a original object beam to get a shape of optimized object, for example , the shape of bridge. Best regards Lance Wolfgang Bangerth 于 2023年9月19日周二 23:27写道: > On 9/19/23 09:21, Lance Zhang wrote: > > > > I would like to use adjoint equation to get the gradiant dJ/dΘ.A stands > for > > stiffness matrix and Θ stands for density,J stands for destination > function. > > Finally I will get the value of sensitivity. > > Right. But what's the operation you want to do with dJ/dΘ? Do you actually > have to have it element by element, or do you want to do a product with > this, etc? > > 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 a topic in the > Google Groups "deal.II User Group" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/dealii/d-09gOQBL4A/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > dealii+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/dealii/ea732ffc-c612-8e18-fe98-c1088bdc0a8c%40colostate.edu > . > -- 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/CADwW6Pnd-jid6t8NONieuEmh59UXkXQTiGsW7v1ggXHM74UNMw%40mail.gmail.com.
Re: [deal.II] Question about how to calculate derivative of stiffness matrix with density
On 9/19/23 09:21, Lance Zhang wrote: I would like to use adjoint equation to get the gradiant dJ/dΘ.A stands for stiffness matrix and Θ stands for density,J stands for destination function. Finally I will get the value of sensitivity. Right. But what's the operation you want to do with dJ/dΘ? Do you actually have to have it element by element, or do you want to do a product with this, etc? 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/ea732ffc-c612-8e18-fe98-c1088bdc0a8c%40colostate.edu.
Re: [deal.II] Question about how to calculate derivative of stiffness matrix with density
Currently,I have the stiffness matrix A an density vector v. If I know the constructing process of cell matrix in code,how should I calculate the derivative of stiffness matrix with density? A is a 4131*4131 matrix,v is 1024*1 vector. After derivative calculation the result is a 4131*4131*1024 matrix and a Jacobin matrix,if I am wrong ,please provide your suggestions. This is conceptually correct, but it is not how you would store things. That's because while you could probably store 1024 matrices of size 4131x4131, you definitely can't do that any more if you refine once or twice more. But in practice, you also don't have to do that. The density on cell k only affects the matrix entries (i,j) for degrees of freedom i,j that are located on cell k. As a consequence, the (i,j,k) entries of the 4131x4131x1024 object is only going to be nonzero if i,j,k all live on the same cell. In other words, the resulting object is going to be *very* sparse. Of course, this only tells you what *not* to do, but you want to know what to do. This depends on what you need this derivative for. You only tell us *that* you need the derivative, but not why. Can you outline what it is you really want to do? In other words, what do you need the derivative for? Best W. -- 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/8ae56dea-34cf-1eb6-bce5-61e164b10dd9%40colostate.edu.