Re: [deal.II] 3D soild structure eigen problem

2022-03-29 Thread Wolfgang Bangerth

On 3/28/22 21:09, Léonhard YU wrote:

I am constructing a code to solve the eigen problem of a solid structure,.
I use the step-36 as a sample, but I don't know how to write a new one for 3D 
solid structure with tensil modulus E = 2.0e11, poisson ratio = 0.3 and 
density = 7.85e3.

If you have any other samples or ideas, please help me.


Leonhard:
what have you tried already? Have you looked at the elasticity tutorial 
programs and how they construct (i) finite element spaces and (ii) the 
stiffness matrix? If you understand that, you will also understand how to 
solve the eigenproblem.


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/c494c23a-e73b-0960-69a5-81d04b1018fa%40colostate.edu.


Re: 与“[deal.II] Installation : MPI + Windows10 + MSVC 2019 building error”相关的私人帖子

2022-03-29 Thread Wolfgang Bangerth

On 3/2/22 19:52, Daniel Sun wrote:
                   I have tried both (removing the "template" keywords 
and changing the definition to "const int dim"). Same errors occur.
                   When i go to the definition of /cell->id()/, 2 
matches found: class std::locale::id and class std::thread::id. Is that 
possible cause of not finding the right function. Could please give me 
further suggestions on this since i have not much experience on this and 
C++ coding.


                   As far as i know,  the answer is no for MS-MPI. As 
for intel MPI library, it supports MPI-3.0 standard but i have not used it.


Daniel,
your email ended up in my spam folder. I'm sorry for the late reply.

Can you try whether the following works for you instead of the original 
code?


OLD:
  process_cells([&](const auto &cell, const auto key) {
if (cell_filter(cell))
  neighbor_cell_list[key].emplace_back(
cell->id().template to_binary());
  });

NEW:
  process_cells([&](const auto &cell, const auto key) {
if (cell_filter(cell))
{
  const auto id = cell->id();
  neighbor_cell_list[key].emplace_back(
id.to_binary());
  });


I don't know what to suggest about the MPI issue. MPI 3.0 was release in 
September 2012, nearly ten years ago. We decided that that is long 
enough ago that we can expect every reasonable platform to have an 
implementation that supports it.


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/c13d583c-865f-116a-d00a-ccc4fe36b8c4%40colostate.edu.


Re: [deal.II] 3D soild structure eigen problem

2022-03-29 Thread Léonhard YU
Thanks for your reply, professor.
I have constructed the stiffness matrix as step-18 does, but the difficulty 
is the mass matrix. I use these to construct mass matrix:

1) cell_mass_matrix(i, j) += rho *  fe_values.shape_value(i, q_point) *
  fe_values.shape_value(j, q_point) * fe_values.JxW(q_point);

2) cell_mass_matrix(i, j) +=
(mass_phi_i *  mass_phi_j) *
 fe_values.JxW(q_point) * rho;

where  mass_phi_i:
const Tensor<2, dim>
 mass_phi_i  =get_mass_matrix(fe_values, i, q_point);

(using this function)
  template  
  inline Tensor<2, dim>  get_mass_matrix(const FEValues &fe_values,
  const unsigned int shape_func_i,
  const unsigned int shape_func_j,
  const unsigned int q_point)
{
  Tensor<2, dim> tmp;
  for (unsigned int t = 0; t < dim; ++t)
  for (unsigned int k = 0; k < dim; ++k)
  {
  tmp[t][k] = fe_values.shape_value_component(shape_func_i, 
q_point, t)*
  fe_values.shape_value_component(shape_func_j, q_point, k);
  }
  return tmp;
}

2) cell_mass_matrix(i, j) +=
(mass_phi_i *  mass_phi_j) *
 fe_values.JxW(q_point) * rho;

where  mass_phi_i:
const  SymmetricTensor  <2, dim>
 mass_phi_i  =get_mass_matrix(fe_values, i, q_point);

(using this function)
  template 
  inline SymmetricTensor<2, dim>
   get_mass_matrix  (const FEValues &fe_values,
 const unsigned int   shape_func,
 const unsigned int   q_point)
  {
SymmetricTensor<2, dim> tmp;
for (unsigned int i = 0; i < dim; ++i)
  tmp[i][i] = fe_values.shape_value_component(shape_func, q_point, i) *
fe_values.shape_value_component(shape_func, 
q_point, i);

for (unsigned int i = 0; i < dim; ++i)
  for (unsigned int j = i + 1; j < dim; ++j)
tmp[i][j] =
  fe_values.shape_value_component(shape_func, q_point, i) *
   fe_values.shape_value_component(shape_func, q_point, j);
return tmp;
  }

Either of them is not right.
Le mardi 29 mars 2022 à 22:20:30 UTC+8, Wolfgang Bangerth a écrit :

> On 3/28/22 21:09, Léonhard YU wrote:
> > I am constructing a code to solve the eigen problem of a solid 
> structure,.
> > I use the step-36 as a sample, but I don't know how to write a new one 
> for 3D 
> > solid structure with tensil modulus E = 2.0e11, poisson ratio = 0.3 and 
> > density = 7.85e3.
> > If you have any other samples or ideas, please help me.
>
> Leonhard:
> what have you tried already? Have you looked at the elasticity tutorial 
> programs and how they construct (i) finite element spaces and (ii) the 
> stiffness matrix? If you understand that, you will also understand how to 
> solve the eigenproblem.
>
> Best
> W.
>
> -- 
> 
> Wolfgang Bangerth email: bang...@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/84535b74-6a3a-4b85-be17-fce5476fab1en%40googlegroups.com.