GetFEM  5.4.2
getfem_fourth_order.h
Go to the documentation of this file.
1 /* -*- c++ -*- (enables emacs c++ mode) */
2 /*===========================================================================
3 
4  Copyright (C) 2006-2020 Yves Renard
5 
6  This file is a part of GetFEM
7 
8  GetFEM is free software; you can redistribute it and/or modify it
9  under the terms of the GNU Lesser General Public License as published
10  by the Free Software Foundation; either version 3 of the License, or
11  (at your option) any later version along with the GCC Runtime Library
12  Exception either version 3.1 or (at your option) any later version.
13  This program is distributed in the hope that it will be useful, but
14  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16  License and GCC Runtime Library Exception for more details.
17  You should have received a copy of the GNU Lesser General Public License
18  along with this program; if not, write to the Free Software Foundation,
19  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
20 
21  As a special exception, you may use this file as it is a part of a free
22  software library without restriction. Specifically, if other files
23  instantiate templates or use macros or inline functions from this file,
24  or you compile this file and link it with other files to produce an
25  executable, this file does not by itself cause the resulting executable
26  to be covered by the GNU Lesser General Public License. This exception
27  does not however invalidate any other reasons why the executable file
28  might be covered by the GNU Lesser General Public License.
29 
30 ===========================================================================*/
31 
32 /**@file getfem_fourth_order.h
33  @author Yves Renard <Yves.Renard@insa-lyon.fr>,
34  Julien Pommier <Julien.Pommier@insa-toulouse.fr>
35  @date January 6, 2006.
36  @brief assembly procedures and bricks for fourth order pdes.
37 */
38 #ifndef GETFEM_FOURTH_ORDER_H_
39 #define GETFEM_FOURTH_ORDER_H__
40 
41 #include "getfem_models.h"
42 #include "getfem_assembling.h"
43 
44 namespace getfem {
45 
46  /* ******************************************************************** */
47  /* Bilaplacian assembly routines. */
48  /* ******************************************************************** */
49 
50  /**
51  assembly of @f$\int_\Omega \Delta u \Delta v@f$.
52  @ingroup asm
53  */
54  template<typename MAT, typename VECT>
56  (const MAT &M, const mesh_im &mim, const mesh_fem &mf,
57  const mesh_fem &mf_data, const VECT &A,
58  const mesh_region &rg = mesh_region::all_convexes()) {
59  generic_assembly assem
60  ("a=data$1(#2);"
61  "M(#1,#1)+=sym(comp(Hess(#1).Hess(#1).Base(#2))(:,i,i,:,j,j,k).a(k))");
62  assem.push_mi(mim);
63  assem.push_mf(mf);
64  assem.push_mf(mf_data);
65  assem.push_data(A);
66  assem.push_mat(const_cast<MAT &>(M));
67  assem.assembly(rg);
68  }
69 
70  template<typename MAT, typename VECT>
71  void asm_stiffness_matrix_for_homogeneous_bilaplacian
72  (const MAT &M, const mesh_im &mim, const mesh_fem &mf,
73  const VECT &A, const mesh_region &rg = mesh_region::all_convexes()) {
74  generic_assembly assem
75  ("a=data$1(1);"
76  "M(#1,#1)+=sym(comp(Hess(#1).Hess(#1))(:,i,i,:,j,j).a(1))");
77  assem.push_mi(mim);
78  assem.push_mf(mf);
79  assem.push_data(A);
80  assem.push_mat(const_cast<MAT &>(M));
81  assem.assembly(rg);
82  }
83 
84 
85  template<typename MAT, typename VECT>
86  void asm_stiffness_matrix_for_bilaplacian_KL
87  (const MAT &M, const mesh_im &mim, const mesh_fem &mf,
88  const mesh_fem &mf_data, const VECT &D_, const VECT &nu_,
89  const mesh_region &rg = mesh_region::all_convexes()) {
90  generic_assembly assem
91  ("d=data$1(#2); n=data$2(#2);"
92  "t=comp(Hess(#1).Hess(#1).Base(#2).Base(#2));"
93  "M(#1,#1)+=sym(t(:,i,j,:,i,j,k,l).d(k)-t(:,i,j,:,i,j,k,l).d(k).n(l)"
94  "+t(:,i,i,:,j,j,k,l).d(k).n(l))");
95  assem.push_mi(mim);
96  assem.push_mf(mf);
97  assem.push_mf(mf_data);
98  assem.push_data(D_);
99  assem.push_data(nu_);
100  assem.push_mat(const_cast<MAT &>(M));
101  assem.assembly(rg);
102  }
103 
104  template<typename MAT, typename VECT>
105  void asm_stiffness_matrix_for_homogeneous_bilaplacian_KL
106  (const MAT &M, const mesh_im &mim, const mesh_fem &mf,
107  const VECT &D_, const VECT &nu_,
108  const mesh_region &rg = mesh_region::all_convexes()) {
109  generic_assembly assem
110  ("d=data$1(1); n=data$2(1);"
111  "t=comp(Hess(#1).Hess(#1));"
112  "M(#1,#1)+=sym(t(:,i,j,:,i,j).d(1)-t(:,i,j,:,i,j).d(1).n(1)"
113  "+t(:,i,i,:,j,j).d(1).n(1))");
114  assem.push_mi(mim);
115  assem.push_mf(mf);
116  assem.push_data(D_);
117  assem.push_data(nu_);
118  assem.push_mat(const_cast<MAT &>(M));
119  assem.assembly(rg);
120  }
121 
122  /* ******************************************************************** */
123  /* Bilaplacian bricks. */
124  /* ******************************************************************** */
125 
126 
127  /** Adds a bilaplacian brick on the variable
128  `varname` and on the mesh region `region`.
129  This represent a term :math:`\Delta(D \Delta u)`.
130  where :math:`D(x)` is a coefficient determined by `dataname` which
131  could be constant or described on a f.e.m. The corresponding weak form
132  is :math:`\int D(x)\Delta u(x) \Delta v(x) dx`.
133  */
135  (model &md, const mesh_im &mim, const std::string &varname,
136  const std::string &dataname, size_type region = size_type(-1));
137 
138  /** Adds a bilaplacian brick on the variable
139  `varname` and on the mesh region `region`.
140  This represent a term :math:`\Delta(D \Delta u)` where :math:`D(x)`
141  is a the flexion modulus determined by `dataname1`. The term is
142  integrated by part following a Kirchhoff-Love plate model
143  with `dataname2` the poisson ratio.
144  */
146  (model &md, const mesh_im &mim, const std::string &varname,
147  const std::string &dataname1, const std::string &dataname2,
148  size_type region = size_type(-1));
149 
150 
151  /* ******************************************************************** */
152  /* Normale derivative source term assembly routines. */
153  /* ******************************************************************** */
154 
155  /**
156  assembly of @f$\int_\Gamma{\partial_n u f}@f$.
157  @ingroup asm
158  */
159  template<typename VECT1, typename VECT2>
161  (VECT1 &B, const mesh_im &mim, const mesh_fem &mf, const mesh_fem &mf_data,
162  const VECT2 &F, const mesh_region &rg) {
163  GMM_ASSERT1(mf_data.get_qdim() == 1,
164  "invalid data mesh fem (Qdim=1 required)");
165 
166  size_type Q = gmm::vect_size(F) / mf_data.nb_dof();
167 
168  // const char *s;
169  // if (mf.get_qdim() == 1 && Q == 1)
170  // s = "F=data(#2);"
171  // "V(#1)+=comp(Grad(#1).Normal().Base(#2))(:,i,i,j).F(j);";
172  // else if (mf.get_qdim() == 1 && Q == gmm::sqr(mf.linked_mesh().dim()))
173  // s = "F=data(mdim(#1),mdim(#1),#2);"
174  // "V(#1)+=comp(Grad(#1).Normal().Normal().Normal().Base(#2))"
175  // "(:,i,i,k,l,j).F(k,l,j);";
176  // else if (mf.get_qdim() > size_type(1) && Q == mf.get_qdim())
177  // s = "F=data(qdim(#1),#2);"
178  // "V(#1)+=comp(vGrad(#1).Normal().Base(#2))(:,i,k,k,j).F(i,j);";
179  // else if (mf.get_qdim() > size_type(1) &&
180  // Q == size_type(mf.get_qdim()*gmm::sqr(mf.linked_mesh().dim())))
181  // s = "F=data(qdim(#1),mdim(#1),mdim(#1),#2);"
182  // "V(#1)+=comp(vGrad(#1).Normal().Normal().Normal().Base(#2))"
183  // "(:,i,k,k,l,m,j).F(i,l,m,j);";
184  // else
185  // GMM_ASSERT1(false, "invalid rhs vector");
186  // asm_real_or_complex_1_param(B, mim, mf, mf_data, F, rg, s);
187 
188  const char *s;
189  if (mf.get_qdim() == 1 && Q == 1)
190  s = "Grad_Test_u.(A*Normal)";
191  else if (mf.get_qdim() == 1 && Q == gmm::sqr(mf.linked_mesh().dim()))
192  s = "Grad_Test_u.(((Reshape(A,meshdim,meshdim)*Normal).Normal)*Normal)";
193  else if (mf.get_qdim() > size_type(1) && Q == mf.get_qdim())
194  s = "((Grad_Test_u')*A).Normal";
195  else if (mf.get_qdim() > size_type(1) &&
196  Q == size_type(mf.get_qdim()*gmm::sqr(mf.linked_mesh().dim())))
197  s = "((((Grad_Test_u').Reshape(A,qdim(u),meshdim,meshdim)).Normal).Normal).Normal";
198  else
199  GMM_ASSERT1(false, "invalid rhs vector");
200  asm_real_or_complex_1_param_vec(B, mim, mf, &mf_data, F, rg, s);
201  }
202 
203  template<typename VECT1, typename VECT2>
204  void asm_homogeneous_normal_derivative_source_term
205  (VECT1 &B, const mesh_im &mim, const mesh_fem &mf,
206  const VECT2 &F, const mesh_region &rg) {
207 
208  size_type Q = gmm::vect_size(F);
209 
210  // const char *s;
211  // if (mf.get_qdim() == 1 && Q == 1)
212  // s = "F=data(1);"
213  // "V(#1)+=comp(Grad(#1).Normal())(:,i,i).F(1);";
214  // else if (mf.get_qdim() == 1 && Q == gmm::sqr(mf.linked_mesh().dim()))
215  // s = "F=data(mdim(#1),mdim(#1));"
216  // "V(#1)+=comp(Grad(#1).Normal().Normal().Normal())"
217  // "(:,i,i,l,j).F(l,j);";
218  // else if (mf.get_qdim() > size_type(1) && Q == mf.get_qdim())
219  // s = "F=data(qdim(#1));"
220  // "V(#1)+=comp(vGrad(#1).Normal())(:,i,k,k).F(i);";
221  // else if (mf.get_qdim() > size_type(1) &&
222  // Q == size_type(mf.get_qdim()*gmm::sqr(mf.linked_mesh().dim())))
223  // s = "F=data(qdim(#1),mdim(#1),mdim(#1));"
224  // "V(#1)+=comp(vGrad(#1).Normal().Normal().Normal())"
225  // "(:,i,k,k,l,m).F(i,l,m);";
226  // else
227  // GMM_ASSERT1(false, "invalid rhs vector");
228  // asm_real_or_complex_1_param(B, mim, mf, mf, F, rg, s);
229 
230  const char *s;
231  if (mf.get_qdim() == 1 && Q == 1)
232  s = "Test_Grad_u.(A*Normal)";
233  else if (mf.get_qdim() == 1 && Q == gmm::sqr(mf.linked_mesh().dim()))
234  s = "Test_Grad_u.(((Reshape(A,meshdim,meshdim)*Normal).Normal)*Normal)";
235  else if (mf.get_qdim() > size_type(1) && Q == mf.get_qdim())
236  s = "((Test_Grad_u')*A).Normal";
237  else if (mf.get_qdim() > size_type(1) &&
238  Q == size_type(mf.get_qdim()*gmm::sqr(mf.linked_mesh().dim())))
239  s = "((((Test_Grad_u').Reshape(A,qdim(u),meshdim,meshdim)).Normal).Normal).Normal";
240  else
241  GMM_ASSERT1(false, "invalid rhs vector");
242  asm_real_or_complex_1_param_vec(B, mim, mf, 0, F, rg, s);
243  }
244 
245 
246  /* ******************************************************************** */
247  /* Normale derivative source term brick. */
248  /* ******************************************************************** */
249 
250 
251  /** Adds a normal derivative source term brick
252  :math:`F = \int b.\partial_n v` on the variable `varname` and the
253  mesh region `region`.
254 
255  Update the right hand side of the linear system.
256  `dataname` represents `b` and `varname` represents `v`.
257  */
259  (model &md, const mesh_im &mim, const std::string &varname,
260  const std::string &dataname, size_type region);
261 
262 
263  /* ******************************************************************** */
264  /* Special boundary condition for Kirchhoff-Love model. */
265  /* ******************************************************************** */
266 
267  /*
268  assembly of the special boundary condition for Kirchhoff-Love model.
269  @ingroup asm
270  */
271  template<typename VECT1, typename VECT2>
272  void asm_neumann_KL_term
273  (VECT1 &B, const mesh_im &mim, const mesh_fem &mf, const mesh_fem &mf_data,
274  const VECT2 &M, const VECT2 &divM, const mesh_region &rg) {
275  GMM_ASSERT1(mf_data.get_qdim() == 1,
276  "invalid data mesh fem (Qdim=1 required)");
277 
278  generic_assembly assem
279  ("MM=data$1(mdim(#1),mdim(#1),#2);"
280  "divM=data$2(mdim(#1),#2);"
281  "V(#1)+=comp(Base(#1).Normal().Base(#2))(:,i,j).divM(i,j);"
282  "V(#1)+=comp(Grad(#1).Normal().Base(#2))(:,i,j,k).MM(i,j,k)*(-1);"
283  "V(#1)+=comp(Grad(#1).Normal().Normal().Normal().Base(#2))(:,i,i,j,k,l).MM(j,k,l);");
284 
285  assem.push_mi(mim);
286  assem.push_mf(mf);
287  assem.push_mf(mf_data);
288  assem.push_data(M);
289  assem.push_data(divM);
290  assem.push_vec(B);
291  assem.assembly(rg);
292  }
293 
294  template<typename VECT1, typename VECT2>
295  void asm_neumann_KL_homogeneous_term
296  (VECT1 &B, const mesh_im &mim, const mesh_fem &mf,
297  const VECT2 &M, const VECT2 &divM, const mesh_region &rg) {
298 
299  generic_assembly assem
300  ("MM=data$1(mdim(#1),mdim(#1));"
301  "divM=data$2(mdim(#1));"
302  "V(#1)+=comp(Base(#1).Normal())(:,i).divM(i);"
303  "V(#1)+=comp(Grad(#1).Normal())(:,i,j).MM(i,j)*(-1);"
304  "V(#1)+=comp(Grad(#1).Normal().Normal().Normal())(:,i,i,j,k).MM(j,k);");
305 
306  assem.push_mi(mim);
307  assem.push_mf(mf);
308  assem.push_data(M);
309  assem.push_data(divM);
310  assem.push_vec(B);
311  assem.assembly(rg);
312  }
313 
314  /* ******************************************************************** */
315  /* Kirchhoff Love Neumann term brick. */
316  /* ******************************************************************** */
317 
318 
319  /** Adds a Neumann term brick for Kirchhoff-Love model
320  on the variable `varname` and the mesh region `region`.
321  `dataname1` represents the bending moment tensor and `dataname2`
322  its divergence.
323  */
325  (model &md, const mesh_im &mim, const std::string &varname,
326  const std::string &dataname1, const std::string &dataname2,
327  size_type region);
328 
329 
330  /* ******************************************************************** */
331  /* Normal derivative Dirichlet assembly routines. */
332  /* ******************************************************************** */
333 
334  /**
335  Assembly of normal derivative Dirichlet constraints
336  @f$ \partial_n u(x) = r(x) @f$ in a weak form
337  @f[ \int_{\Gamma} \partial_n u(x)v(x)=\int_{\Gamma} r(x)v(x) \forall v@f],
338  where @f$ v @f$ is in
339  the space of multipliers corresponding to mf_mult.
340 
341  size(r_data) = Q * nb_dof(mf_rh);
342 
343  version = |ASMDIR_BUILDH : build H
344  |ASMDIR_BUILDR : build R
345  |ASMDIR_BUILDALL : do everything.
346 
347  @ingroup asm
348  */
349 
350  template<typename MAT, typename VECT1, typename VECT2>
352  (MAT &H, VECT1 &R, const mesh_im &mim, const mesh_fem &mf_u,
353  const mesh_fem &mf_mult, const mesh_fem &mf_r,
354  const VECT2 &r_data, const mesh_region &rg, bool R_must_be_derivated,
355  int version) {
356  typedef typename gmm::linalg_traits<VECT1>::value_type value_type;
357  typedef typename gmm::number_traits<value_type>::magnitude_type magn_type;
358 
359  rg.from_mesh(mim.linked_mesh()).error_if_not_faces();
360 
361  if (version & ASMDIR_BUILDH) {
362  const char *s;
363  if (mf_u.get_qdim() == 1 && mf_mult.get_qdim() == 1)
364  s = "M(#1,#2)+=comp(Base(#1).Grad(#2).Normal())(:,:,i,i)";
365  else
366  s = "M(#1,#2)+=comp(vBase(#1).vGrad(#2).Normal())(:,i,:,i,j,j);";
367 
368  generic_assembly assem(s);
369  assem.push_mi(mim);
370  assem.push_mf(mf_mult);
371  assem.push_mf(mf_u);
372  assem.push_mat(H);
373  assem.assembly(rg);
374  gmm::clean(H, gmm::default_tol(magn_type())
375  * gmm::mat_maxnorm(H) * magn_type(1000));
376  }
377  if (version & ASMDIR_BUILDR) {
378  GMM_ASSERT1(mf_r.get_qdim() == 1,
379  "invalid data mesh fem (Qdim=1 required)");
380  if (!R_must_be_derivated) {
381  asm_normal_source_term(R, mim, mf_mult, mf_r, r_data, rg);
382  } else {
383  asm_real_or_complex_1_param_vec(R, mim, mf_mult, &mf_r, r_data, rg,
384  "(Grad_A.Normal)*Test_u");
385  // asm_real_or_complex_1_param
386  // (R, mim, mf_mult, mf_r, r_data, rg,
387  // "R=data(#2); V(#1)+=comp(Base(#1).Grad(#2).Normal())(:,i,j,j).R(i)");
388  }
389  }
390  }
391 
392  /* ******************************************************************** */
393  /* Normal derivative Dirichlet condition bricks. */
394  /* ******************************************************************** */
395 
396  /** Adds a Dirichlet condition on the normal derivative of the variable
397  `varname` and on the mesh region `region` (which should be a boundary).
398  The general form is
399  :math:`\int \partial_n u(x)v(x) = \int r(x)v(x) \forall v`
400  where :math:`r(x)` is
401  the right hand side for the Dirichlet condition (0 for
402  homogeneous conditions) and :math:`v` is in a space of multipliers
403  defined by the variable `multname` on the part of boundary determined
404  by `region`. `dataname` is an optional parameter which represents
405  the right hand side of the Dirichlet condition.
406  If `R_must_be_derivated` is set to `true` then the normal
407  derivative of `dataname` is considered.
408  */
410  (model &md, const mesh_im &mim, const std::string &varname,
411  const std::string &multname, size_type region,
412  const std::string &dataname = std::string(),
413  bool R_must_be_derivated = false);
414 
415 
416  /** Adds a Dirichlet condition on the normal derivative of the variable
417  `varname` and on the mesh region `region` (which should be a boundary).
418  The general form is
419  :math:`\int \partial_n u(x)v(x) = \int r(x)v(x) \forall v`
420  where :math:`r(x)` is
421  the right hand side for the Dirichlet condition (0 for
422  homogeneous conditions) and :math:`v` is in a space of multipliers
423  defined by the trace of mf_mult on the part of boundary determined
424  by `region`. `dataname` is an optional parameter which represents
425  the right hand side of the Dirichlet condition.
426  If `R_must_be_derivated` is set to `true` then the normal
427  derivative of `dataname` is considered.
428  */
430  (model &md, const mesh_im &mim, const std::string &varname,
431  const mesh_fem &mf_mult, size_type region,
432  const std::string &dataname = std::string(),
433  bool R_must_be_derivated = false);
434 
435  /** Adds a Dirichlet condition on the normal derivative of the variable
436  `varname` and on the mesh region `region` (which should be a boundary).
437  The general form is
438  :math:`\int \partial_n u(x)v(x) = \int r(x)v(x) \forall v`
439  where :math:`r(x)` is
440  the right hand side for the Dirichlet condition (0 for
441  homogeneous conditions) and :math:`v` is in a space of multipliers
442  defined by the trace of a Lagranfe finite element method of degree
443  `degree` and on the boundary determined
444  by `region`. `dataname` is an optional parameter which represents
445  the right hand side of the Dirichlet condition.
446  If `R_must_be_derivated` is set to `true` then the normal
447  derivative of `dataname` is considered.
448  */
450  (model &md, const mesh_im &mim, const std::string &varname,
451  dim_type degree, size_type region,
452  const std::string &dataname = std::string(),
453  bool R_must_be_derivated = false);
454 
455  /** Adds a Dirichlet condition on the normal derivative of the variable
456  `varname` and on the mesh region `region` (which should be a boundary).
457  The general form is
458  :math:`\int \partial_n u(x)v(x) = \int r(x)v(x) \forall v`
459  where :math:`r(x)` is
460  the right hand side for the Dirichlet condition (0 for
461  homogeneous conditions). For this brick the condition is enforced with
462  a penalisation with a penanalization parameter `penalization_coeff` on
463  the boundary determined by `region`.
464  `dataname` is an optional parameter which represents
465  the right hand side of the Dirichlet condition.
466  If `R_must_be_derivated` is set to `true` then the normal
467  derivative of `dataname` is considered.
468  Note that is is possible to change the penalization coefficient
469  using the function `getfem::change_penalization_coeff` of the standard
470  Dirichlet condition.
471  */
473  (model &md, const mesh_im &mim, const std::string &varname,
474  scalar_type penalisation_coeff, size_type region,
475  const std::string &dataname = std::string(),
476  bool R_must_be_derivated = false);
477 
478 
479 
480 
481 
482 
483 } /* end of namespace getfem. */
484 
485 
486 #endif /* GETFEM_FOURTH_ORDER_H__ */
getfem::asm_normal_derivative_source_term
void asm_normal_derivative_source_term(VECT1 &B, const mesh_im &mim, const mesh_fem &mf, const mesh_fem &mf_data, const VECT2 &F, const mesh_region &rg)
assembly of .
Definition: getfem_fourth_order.h:161
getfem::add_bilaplacian_brick_KL
size_type add_bilaplacian_brick_KL(model &md, const mesh_im &mim, const std::string &varname, const std::string &dataname1, const std::string &dataname2, size_type region=size_type(-1))
Adds a bilaplacian brick on the variable varname and on the mesh region region.
Definition: getfem_fourth_order.cc:132
getfem::mesh_fem::get_qdim
virtual dim_type get_qdim() const
Return the Q dimension.
Definition: getfem_mesh_fem.h:312
getfem::asm_stiffness_matrix_for_bilaplacian
void asm_stiffness_matrix_for_bilaplacian(const MAT &M, const mesh_im &mim, const mesh_fem &mf, const mesh_fem &mf_data, const VECT &A, const mesh_region &rg=mesh_region::all_convexes())
assembly of .
Definition: getfem_fourth_order.h:56
bgeot::size_type
size_t size_type
used as the common size type in the library
Definition: bgeot_poly.h:49
getfem::mesh_im
Describe an integration method linked to a mesh.
Definition: getfem_mesh_im.h:47
getfem::add_normal_derivative_source_term_brick
size_type add_normal_derivative_source_term_brick(model &md, const mesh_im &mim, const std::string &varname, const std::string &dataname, size_type region)
Adds a normal derivative source term brick :math:F = \int b.
Definition: getfem_fourth_order.cc:250
getfem::generic_assembly::push_mf
void push_mf(const mesh_fem &mf_)
Add a new mesh_fem.
Definition: getfem_assembling_tensors.h:650
getfem::generic_assembly::push_mat
void push_mat(const MAT &m)
Add a new output matrix (fake const version..)
Definition: getfem_assembling_tensors.h:671
getfem::mesh_fem
Describe a finite element method linked to a mesh.
Definition: getfem_mesh_fem.h:148
getfem::mesh_region::all_convexes
static mesh_region all_convexes()
provide a default value for the mesh_region parameters of assembly procedures etc.
Definition: getfem_mesh_region.h:142
getfem::generic_assembly::push_data
void push_data(const VEC &d)
Add a new data (dense array)
Definition: getfem_assembling_tensors.h:659
getfem::add_normal_derivative_Dirichlet_condition_with_penalization
size_type add_normal_derivative_Dirichlet_condition_with_penalization(model &md, const mesh_im &mim, const std::string &varname, scalar_type penalisation_coeff, size_type region, const std::string &dataname=std::string(), bool R_must_be_derivated=false)
Adds a Dirichlet condition on the normal derivative of the variable varname and on the mesh region re...
Definition: getfem_fourth_order.cc:656
getfem
GEneric Tool for Finite Element Methods.
Definition: getfem_accumulated_distro.h:46
getfem::generic_assembly::assembly
void assembly(const mesh_region &region=mesh_region::all_convexes())
do the assembly on the specified region (boundary or set of convexes)
Definition: getfem_assembling_tensors.cc:1814
getfem_models.h
Model representation in Getfem.
getfem::add_Kirchhoff_Love_Neumann_term_brick
size_type add_Kirchhoff_Love_Neumann_term_brick(model &md, const mesh_im &mim, const std::string &varname, const std::string &dataname1, const std::string &dataname2, size_type region)
Adds a Neumann term brick for Kirchhoff-Love model on the variable varname and the mesh region region...
Definition: getfem_fourth_order.cc:333
getfem::asm_normal_source_term
void asm_normal_source_term(VECT1 &B, const mesh_im &mim, const mesh_fem &mf, const mesh_fem &mf_data, const VECT2 &F, const mesh_region &rg)
Normal source term (for boundary (Neumann) condition).
Definition: getfem_assembling.h:905
getfem::generic_assembly
Generic assembly of vectors, matrices.
Definition: getfem_assembling_tensors.h:607
getfem::add_normal_derivative_Dirichlet_condition_with_multipliers
size_type add_normal_derivative_Dirichlet_condition_with_multipliers(model &md, const mesh_im &mim, const std::string &varname, const std::string &multname, size_type region, const std::string &dataname=std::string(), bool R_must_be_derivated=false)
Adds a Dirichlet condition on the normal derivative of the variable varname and on the mesh region re...
Definition: getfem_fourth_order.cc:620
getfem::add_bilaplacian_brick
size_type add_bilaplacian_brick(model &md, const mesh_im &mim, const std::string &varname, const std::string &dataname, size_type region=size_type(-1))
Adds a bilaplacian brick on the variable varname and on the mesh region region.
Definition: getfem_fourth_order.cc:120
getfem::mesh_region::from_mesh
const mesh_region & from_mesh(const mesh &m) const
For regions which have been built with just a number 'id', from_mesh(m) sets the current region to 'm...
Definition: getfem_mesh_region.cc:72
getfem::mesh_fem::linked_mesh
const mesh & linked_mesh() const
Return a reference to the underlying mesh.
Definition: getfem_mesh_fem.h:279
getfem::generic_assembly::push_mi
void push_mi(const mesh_im &im_)
Add a new mesh_im.
Definition: getfem_assembling_tensors.h:652
getfem::mesh_im::linked_mesh
const mesh & linked_mesh() const
Give a reference to the linked mesh of type mesh.
Definition: getfem_mesh_im.h:79
getfem::mesh_region
structure used to hold a set of convexes and/or convex faces.
Definition: getfem_mesh_region.h:55
getfem::mesh_fem::nb_dof
virtual size_type nb_dof() const
Return the total number of degrees of freedom.
Definition: getfem_mesh_fem.h:562
getfem_assembling.h
Miscelleanous assembly routines for common terms. Use the low-level generic assembly....
getfem::asm_normal_derivative_dirichlet_constraints
void asm_normal_derivative_dirichlet_constraints(MAT &H, VECT1 &R, const mesh_im &mim, const mesh_fem &mf_u, const mesh_fem &mf_mult, const mesh_fem &mf_r, const VECT2 &r_data, const mesh_region &rg, bool R_must_be_derivated, int version)
Assembly of normal derivative Dirichlet constraints in a weak form.
Definition: getfem_fourth_order.h:352