[deal.II] How to convert stiffness matrix in global degrees of freedom into stiffness matrix in global cells

2023-10-30 Thread Lance Zhang
Hello team, may I know how the stiffness matrix in global degrees of freedom could be converted into stiffness matrix in global cells? I would like to use cook_memebrane.cc to get a stiffness matrix in a way of global cells. Currently,I only got the stiffness matrix

[deal.II] Question about how to calculate derivative of stiffness matrix with density

2023-09-17 Thread Lance Zhang
Dear group, thanks for your time to review this email. I have queation about the ways to get 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

Re: [deal.II] Question about how to calculate derivative of stiffness matrix with density

2023-09-19 Thread Lance Zhang
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: > > > &g

Re: [deal.II] change the value of item modul

2023-07-17 Thread Lance Zhang
;, unsigned int, bool) The violated condition was: skip_undefined || entries->get_child_optional( get_current_full_path(subsection)) Additional information: Line <3> of file On 7/17/23 15:57, Lance Zhang wrote: > > > > The information above is what I wrote,but the

[deal.II] adding openmp in CMakeLists.txt

2023-07-17 Thread Lance Zhang
Hello everyone, I have one problem when I tried to add openmp lib to CMakeLists.txt to use parallel functionality. May I know how I could add openmp lib? And one more question,I wrote two code files which are called gcmma and mma,may I know how could I add these two files in this CMakeLists

[deal.II] change the value of item modul

2023-07-17 Thread Lance Zhang
Hello, I would like to change the value ofset Shear modulus to 1e6 using a parameter in function. so I can control the value of modulus and this parameter will be used and changed in each iteration of loop. There are two ideas 1st)I want to change the value of modulus and the new value

[deal.II] Density of rectangle and objective function in code file cook_membrane.cc

2023-07-08 Thread Lance Zhang
Hello, If I would like to get the density of the rectangle,how should I calculate the value from rectangle in code cook_membrane.cc? How should I design the function J(x,θ) to get the objective function J(x,θ ),?This function indicates the minimum movement.θ is density of this rectangle

Re: [deal.II] Questions about cook_membrane.cc

2023-06-11 Thread Lance Zhang
dinates of the corner with the lowest > coordinates in all space dimensions, the corner with the highest > coordinates in all space dimensions, as well as the subdivisions for all > space dimensions. > > Best, > Daniel > > On Fri, Jun 9, 2023 at 5:27 AM Lance Zhang wrote: &g

[deal.II] How to use cell stiffness matrix to build global stiffness matrix

2023-08-01 Thread Lance Zhang
Hello dear group, I have one question which is about how to build global stiffness matrix with cell stiffness matrix. In our project,the density is a vector (actually we need a mu vector but in the code of deallii mu is a scalar)with different values,I would like to use the element of density

[deal.II] Re: How to use cell stiffness matrix to build global stiffness matrix

2023-08-01 Thread Lance Zhang
Hello Abbas, Thanks for your reply. I will take a look at the step13. Howerver, I would like to know if the cell matrix transform seems like the process below: const Eigen::MatrixXd& cell_matrix, const Eigen::VectorXd& cell_youngs_modulus, const std::vector& local_dof_indices,

[deal.II] Question about how to get the Stiffness matrix partial derivative with respect to density

2023-07-24 Thread Lance Zhang
Hello , Thanks for your time to see this question. The given conditions are stiffness matrix,destination function and x from Ax=b,x is movement ,b is force,A is global stiffness matrix. J(x)=||x||norm-1 There is one equation: dJ(x,θ)/dθ=∂J(x,θ)/∂θ+∂J(x,θ)/∂x

Re: [deal.II] Question about how to get the Stiffness matrix partial derivative with respect to density

2023-07-24 Thread Lance Zhang
Hello Wolfgang, The value of A^-1(θ))(-∂A(θ)/∂θ)x is what I would like to obtain. Thanks in advance! Best regards Lance On Monday, July 24, 2023 at 7:24:53 PM UTC+2 Lance Zhang wrote: > Hello Wolfgang, > > thanks for your reply. > > I will follow your point to see if I could fi

Re: [deal.II] Question about how to get the Stiffness matrix partial derivative with respect to density

2023-07-24 Thread Lance Zhang
Hello Wolfgang, thanks for your reply. I will follow your point to see if I could find the solution. One moire question,how could I get ∂A(θ)/∂θx,because I did not find any information about density vector like θ=[θ1,θ2,...,θm],may I know if I have to set density vector value in this finite

Re: [deal.II] Question about how to get the Stiffness matrix partial derivative with respect to density

2023-07-24 Thread Lance Zhang
that we will obtain in the end. We use adjoint method written in previous emails to calculate dJ(x,Θ)/dΘ. Best regards Lance Wolfgang Bangerth 于 2023年7月24日周一 21:49写道: > On 7/24/23 11:24, Lance Zhang wrote: > > > > One moire question,how could I get ∂A(θ)/∂θx,because I d

[deal.II] Re: matrix multiply matrix

2023-06-22 Thread Lance Zhang
the code is related to cook_membrane.cc. On Thursday, June 22, 2023 at 6:00:55 PM UTC+2 Lance Zhang wrote: > Hello , > > When I use vmult to multiply matrix with vector,I found error information: > Error information: > BOOST_HEADER_DEPRECATED("") > | ^~~~

[deal.II] matrix multiply matrix

2023-06-22 Thread Lance Zhang
Hello , When I use vmult to multiply matrix with vector,I found error information: Error information: BOOST_HEADER_DEPRECATED("") | ^~~ /usr/share/doc/libdeal.ii-doc/examples/cook_membrane3/cook_membrane.cc: In function ‘int main(int, char**)’:

[deal.II] Re: matrix multiply matrix

2023-06-22 Thread Lance Zhang
s? Thanks in advance! Best regards Lance On Thursday, June 22, 2023 at 6:01:44 PM UTC+2 Lance Zhang wrote: > the code is related to cook_membrane.cc. > > On Thursday, June 22, 2023 at 6:00:55 PM UTC+2 Lance Zhang wrote: > >> Hello , >> >> When I use vmult to multiply matr

[deal.II] inverse matrix of matrix with dealii::BlockSparseMatrix

2023-06-22 Thread Lance Zhang
Hello, Currently, I met one problem when I calculate the inverse matrix with datatype of class dealii::BlockSparseMatrix. I searched the website of dealii for the method,but it seems there is no method to get the inverse matrix in BlockSparseMatrix. May I know whether there is any other

[deal.II] Re: inverse matrix of matrix with dealii::BlockSparseMatrix in file cook_membrane.cc

2023-06-22 Thread Lance Zhang
t;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< std::cout<< "L1 norm:"<>>>>>&g

Re: [deal.II] inverse matrix of matrix with dealii::BlockSparseMatrix

2023-06-22 Thread Lance Zhang
Hello Wolfgang, thanks for your message. May I know if there is any method which can be used for adjoint sensitivity method? Best regards Lance On Thursday, June 22, 2023 at 7:29:18 PM UTC+2 Wolfgang Bangerth wrote: > On 6/22/23 06:35, Lance Zhang wrote: > > > > May

Re: [deal.II] Control points are missing in changed code by reference of cook_membrance.cc

2023-07-01 Thread Lance Zhang
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 于 2023年7月1日周六 18:43写道: > On 7/1/23 10:00, Lance Zhang wrote: > > &

[deal.II] Re: Control points are missing in changed code by reference of cook_membrance.cc

2023-07-01 Thread Lance Zhang
each surface has 32*32 cells. On Saturday, July 1, 2023 at 12:10:06 PM UTC+2 Lance Zhang wrote: > 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 poin

Re: [deal.II] Control points are missing in changed code by reference of cook_membrance.cc

2023-07-02 Thread Lance Zhang
or 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 于 2023年7月1日周六 18:43写道: >

[deal.II] finite difference method to calculate the gradient of density in cells by reference file of cook_membrane.cc

2023-07-02 Thread Lance Zhang
Hello , I would like to use finite difference method to calculate the gradient of density in cells. But I got issue when the program was processed at the part of compute_gradient(); Here is the code below about density and gradient. //>>>Density>>>

[deal.II] Re: finite difference method to calculate the gradient of density in cells by reference file of cook_membrane.cc

2023-07-02 Thread Lance Zhang
() with triangulation.n_active_cells(),because dof_handler_ref.n_dofs() is about the number of dofs instead of activae cells. Could anyone provide any suggestions? Best regards Lance On Sunday, July 2, 2023 at 2:36:50 PM UTC+2 Lance Zhang wrote: > Hello , > > I would like to use finite differen

Re: [deal.II] Questions about cook_membrane.cc

2023-06-19 Thread Lance Zhang
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< I will appreciate it if you could provide any hint or suggestions. I wish I could receive your reply. Best regards Lance On Monday, June 12, 2023 at 12:43:40 

Re: [deal.II] How to find the neighbor of one cell

2023-11-29 Thread Lance Zhang
nippet/blob/main/code_snippet.cpp Thanks in advance! Best regards Lance Wolfgang Bangerth 于2023年11月28日周二 01:54写道: > > On 11/27/23 14:52, Lance Zhang wrote: > > > > May I know how to find the neig

Re: [deal.II] How to find the neighbor of one cell

2023-11-29 Thread Lance Zhang
;n_faces(); ++f) > { > if (cell->at_boundary(f)) > continue; > auto neighbor = cell->neighbor(f); > int neighbor_index = neighbor->active_cell_index();//get the > global index of the cell if it exists > [...] > &

[deal.II] How to find the cell index by using global dof index

2023-12-03 Thread Lance Zhang
Hello team, may I know how to find the cell index with the information of its global Dofs index? I have the global dofs index ,I would like to find which cell this global dof belongs to. Thanks in advance! Best regards Lance -- The deal.II project is located at http://www.dealii.org/ For

[deal.II] How to find the neighbor of one cell

2023-11-27 Thread Lance Zhang
Hello team, I have one quick question. May I know how to find the neighbor of a cell? Here is one part of my code: -- for (const auto :

Re: [deal.II] How to find the cell index by using global dof index

2023-12-06 Thread Lance Zhang
reate the same grids and how I could create the grids with the NURBS. Thanks in advance! Best regards Lance Daniel Arndt 于 2023年12月4日周一 16:08写道: > Lance, > > Have a look at GridTools::vertex_to_cell_map( > https://www.dealii.org/current/doxygen/deal.II/namespaceGridTools.html#a9b7

Re: [deal.II] How to convert stiffness matrix in global degrees of freedom into stiffness matrix in global cells

2023-11-13 Thread Lance Zhang
Hello Wolfgang, thanks very much for your information. I got the point. Best regards Lance Wolfgang Bangerth 于 2023年11月13日周一 21:01写道: > > On 11/13/23 03:05, Lance Zhang wrote: > > > > I wonder whether the stiffness matrix could be converted to a matrix > >

Re: [deal.II] How to convert stiffness matrix in global degrees of freedom into stiffness matrix in global cells

2023-11-13 Thread Lance Zhang
23年10月31日周二 01:32写道: > > On 10/30/23 15:54, Lance Zhang wrote: > > > > may I know how the stiffness matrix in global degrees of freedom could > > be converted into stiffness matrix in global cells? > > Lance: > How do you define "stiffness matrix in globa