MFEM  v3.1
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
bilininteg.hpp
Go to the documentation of this file.
1 // Copyright (c) 2010, Lawrence Livermore National Security, LLC. Produced at
2 // the Lawrence Livermore National Laboratory. LLNL-CODE-443211. All Rights
3 // reserved. See file COPYRIGHT for details.
4 //
5 // This file is part of the MFEM library. For more information and source code
6 // availability see http://mfem.org.
7 //
8 // MFEM is free software; you can redistribute it and/or modify it under the
9 // terms of the GNU Lesser General Public License (as published by the Free
10 // Software Foundation) version 2.1 dated February 1999.
11 
12 #ifndef MFEM_BILININTEG
13 #define MFEM_BILININTEG
14 
15 #include "../config/config.hpp"
16 #include "nonlininteg.hpp"
17 
18 namespace mfem
19 {
20 
23 {
24 protected:
26 
28  { IntRule = ir; }
29 
30 public:
32  virtual void AssembleElementMatrix(const FiniteElement &el,
33  ElementTransformation &Trans,
34  DenseMatrix &elmat);
35 
40  virtual void AssembleElementMatrix2(const FiniteElement &trial_fe,
41  const FiniteElement &test_fe,
42  ElementTransformation &Trans,
43  DenseMatrix &elmat);
44 
45  virtual void AssembleFaceMatrix(const FiniteElement &el1,
46  const FiniteElement &el2,
48  DenseMatrix &elmat);
49 
52  virtual void AssembleFaceMatrix(const FiniteElement &trial_face_fe,
53  const FiniteElement &test_fe1,
54  const FiniteElement &test_fe2,
56  DenseMatrix &elmat);
57 
59  virtual void AssembleElementVector(const FiniteElement &el,
61  const Vector &elfun, Vector &elvect);
62 
63  virtual void AssembleElementGrad(const FiniteElement &el,
65  const Vector &elfun, DenseMatrix &elmat)
66  { AssembleElementMatrix(el, Tr, elmat); }
67 
68  virtual void ComputeElementFlux(const FiniteElement &el,
69  ElementTransformation &Trans,
70  Vector &u,
71  const FiniteElement &fluxelem,
72  Vector &flux, int with_coef = 1) { }
73 
74  virtual double ComputeFluxEnergy(const FiniteElement &fluxelem,
75  ElementTransformation &Trans,
76  Vector &flux, Vector *d_energy = NULL)
77  { return 0.0; }
78 
79  void SetIntRule(const IntegrationRule *ir) { IntRule = ir; }
80 
82 };
83 
85 {
86 private:
87  int own_bfi;
89 
90  DenseMatrix bfi_elmat;
91 
92 public:
93  TransposeIntegrator (BilinearFormIntegrator *_bfi, int _own_bfi = 1)
94  { bfi = _bfi; own_bfi = _own_bfi; }
95 
96  virtual void AssembleElementMatrix(const FiniteElement &el,
97  ElementTransformation &Trans,
98  DenseMatrix &elmat);
99 
100  virtual void AssembleElementMatrix2(const FiniteElement &trial_fe,
101  const FiniteElement &test_fe,
102  ElementTransformation &Trans,
103  DenseMatrix &elmat);
104 
106  virtual void AssembleFaceMatrix(const FiniteElement &el1,
107  const FiniteElement &el2,
109  DenseMatrix &elmat);
110 
111  virtual ~TransposeIntegrator() { if (own_bfi) { delete bfi; } }
112 };
113 
115 {
116 private:
117  int own_bfi;
119 
120 public:
121  LumpedIntegrator (BilinearFormIntegrator *_bfi, int _own_bfi = 1)
122  { bfi = _bfi; own_bfi = _own_bfi; }
123 
124  virtual void AssembleElementMatrix(const FiniteElement &el,
125  ElementTransformation &Trans,
126  DenseMatrix &elmat);
127 
128  virtual ~LumpedIntegrator() { if (own_bfi) { delete bfi; } }
129 };
130 
133 {
134 private:
135  int own_integrator;
136  BilinearFormIntegrator *integrator;
137 
138 public:
139  InverseIntegrator(BilinearFormIntegrator *integ, int own_integ = 1)
140  { integrator = integ; own_integrator = own_integ; }
141 
142  virtual void AssembleElementMatrix(const FiniteElement &el,
143  ElementTransformation &Trans,
144  DenseMatrix &elmat);
145 
146  virtual ~InverseIntegrator() { if (own_integrator) { delete integrator; } }
147 };
148 
151 {
152 private:
153  int own_integrators;
154  DenseMatrix elem_mat;
155  Array<BilinearFormIntegrator*> integrators;
156 
157 public:
158  SumIntegrator(int own_integs = 1) { own_integrators = own_integs; }
159 
161  { integrators.Append(integ); }
162 
163  virtual void AssembleElementMatrix(const FiniteElement &el,
164  ElementTransformation &Trans,
165  DenseMatrix &elmat);
166 
167  virtual ~SumIntegrator();
168 };
169 
173 {
174 private:
175  Vector vec, pointflux, shape;
176 #ifndef MFEM_THREAD_SAFE
177  DenseMatrix dshape, dshapedxt, invdfdx, mq;
178  DenseMatrix te_dshape, te_dshapedxt;
179 #endif
180  Coefficient *Q;
181  MatrixCoefficient *MQ;
182 
183 public:
185  DiffusionIntegrator() { Q = NULL; MQ = NULL; }
186 
188  DiffusionIntegrator (Coefficient &q) : Q(&q) { MQ = NULL; }
189 
191  DiffusionIntegrator (MatrixCoefficient &q) : MQ(&q) { Q = NULL; }
192 
195  virtual void AssembleElementMatrix(const FiniteElement &el,
196  ElementTransformation &Trans,
197  DenseMatrix &elmat);
200  virtual void AssembleElementMatrix2(const FiniteElement &trial_fe,
201  const FiniteElement &test_fe,
202  ElementTransformation &Trans,
203  DenseMatrix &elmat);
204 
206  virtual void AssembleElementVector(const FiniteElement &el,
208  const Vector &elfun, Vector &elvect);
209 
210  virtual void ComputeElementFlux(const FiniteElement &el,
211  ElementTransformation &Trans,
212  Vector &u, const FiniteElement &fluxelem,
213  Vector &flux, int with_coef = 1);
214 
215  virtual double ComputeFluxEnergy(const FiniteElement &fluxelem,
216  ElementTransformation &Trans,
217  Vector &flux, Vector *d_energy = NULL);
218 };
219 
222 {
223 private:
224  Vector shape, te_shape;
225  Coefficient *Q;
226 
227 public:
228  MassIntegrator(const IntegrationRule *ir = NULL)
229  : BilinearFormIntegrator(ir) { Q = NULL; }
232  : BilinearFormIntegrator(ir), Q(&q) { }
233 
236  virtual void AssembleElementMatrix(const FiniteElement &el,
237  ElementTransformation &Trans,
238  DenseMatrix &elmat);
239  virtual void AssembleElementMatrix2(const FiniteElement &trial_fe,
240  const FiniteElement &test_fe,
241  ElementTransformation &Trans,
242  DenseMatrix &elmat);
243 };
244 
246 {
247 public:
249 };
250 
253 {
254 private:
255  DenseMatrix dshape, adjJ, Q_ir;
256  Vector shape, vec2, BdFidxT;
258  double alpha;
259 
260 public:
262  : Q(q) { alpha = a; }
263  virtual void AssembleElementMatrix(const FiniteElement &,
265  DenseMatrix &);
266 };
267 
270 {
271 private:
272  DenseMatrix dshape, adjJ, Q_nodal, grad;
273  Vector shape;
275  double alpha;
276 
277 public:
279  : Q(q) { alpha = a; }
280  virtual void AssembleElementMatrix(const FiniteElement &,
282  DenseMatrix &);
283 };
284 
289 {
290 private:
291  Vector shape, te_shape, vec;
292  DenseMatrix partelmat;
293  DenseMatrix mcoeff;
294  Coefficient *Q;
295  VectorCoefficient *VQ;
296  MatrixCoefficient *MQ;
297 
298  int Q_order;
299 
300 public:
303  { Q = NULL; VQ = NULL; MQ = NULL; Q_order = 0; }
309  : Q(&q) { VQ = NULL; MQ = NULL; Q_order = qo; }
311  : BilinearFormIntegrator(ir), Q(&q)
312  { VQ = NULL; MQ = NULL; Q_order = 0; }
315  : VQ(&q) { Q = NULL; MQ = NULL; Q_order = qo; }
318  : MQ(&q) { Q = NULL; VQ = NULL; Q_order = qo; }
319 
320  virtual void AssembleElementMatrix(const FiniteElement &el,
321  ElementTransformation &Trans,
322  DenseMatrix &elmat);
323  virtual void AssembleElementMatrix2(const FiniteElement &trial_fe,
324  const FiniteElement &test_fe,
325  ElementTransformation &Trans,
326  DenseMatrix &elmat);
327 };
328 
329 
338 {
339 private:
340  Coefficient *Q;
341 #ifndef MFEM_THREAD_SAFE
342  Vector divshape, shape;
343 #endif
344 public:
347  virtual void AssembleElementMatrix(const FiniteElement &el,
348  ElementTransformation &Trans,
349  DenseMatrix &elmat) { }
350  virtual void AssembleElementMatrix2(const FiniteElement &trial_fe,
351  const FiniteElement &test_fe,
352  ElementTransformation &Trans,
353  DenseMatrix &elmat);
354 };
355 
356 
359 {
360 private:
361  Coefficient *Q;
362 #ifndef MFEM_THREAD_SAFE
363  DenseMatrix curlshapeTrial;
364  DenseMatrix vshapeTest;
365  DenseMatrix curlshapeTrial_dFT;
366 #endif
367 public:
368  VectorFECurlIntegrator() { Q = NULL; }
370  virtual void AssembleElementMatrix(const FiniteElement &el,
371  ElementTransformation &Trans,
372  DenseMatrix &elmat) { }
373  virtual void AssembleElementMatrix2(const FiniteElement &trial_fe,
374  const FiniteElement &test_fe,
375  ElementTransformation &Trans,
376  DenseMatrix &elmat);
377 };
378 
379 
382 {
383 private:
384  Coefficient & Q;
385  int xi;
386  DenseMatrix dshape, dshapedxt, invdfdx;
387  Vector shape, dshapedxi;
388 public:
389  DerivativeIntegrator(Coefficient &q, int i) : Q(q), xi(i) { }
390  virtual void AssembleElementMatrix(const FiniteElement &el,
391  ElementTransformation &Trans,
392  DenseMatrix &elmat)
393  { AssembleElementMatrix2(el,el,Trans,elmat); }
394  virtual void AssembleElementMatrix2(const FiniteElement &trial_fe,
395  const FiniteElement &test_fe,
396  ElementTransformation &Trans,
397  DenseMatrix &elmat);
398 };
399 
402 {
403 private:
404  Vector vec, pointflux;
405 #ifndef MFEM_THREAD_SAFE
406  DenseMatrix curlshape, curlshape_dFt;
407  DenseMatrix vshape, projcurl;
408 #endif
409  Coefficient *Q;
410 
411 public:
412  CurlCurlIntegrator() { Q = NULL; }
415 
416  /* Given a particular Finite Element, compute the
417  element curl-curl matrix elmat */
418  virtual void AssembleElementMatrix(const FiniteElement &el,
419  ElementTransformation &Trans,
420  DenseMatrix &elmat);
421 
422  virtual void ComputeElementFlux(const FiniteElement &el,
423  ElementTransformation &Trans,
424  Vector &u, const FiniteElement &fluxelem,
425  Vector &flux, int with_coef);
426 
427  virtual double ComputeFluxEnergy(const FiniteElement &fluxelem,
428  ElementTransformation &Trans,
429  Vector &flux, Vector *d_energy = NULL);
430 };
431 
435 {
436 private:
437 #ifndef MFEM_THREAD_SAFE
438  DenseMatrix dshape_hat, dshape, curlshape, Jadj, grad_hat, grad;
439 #endif
440  Coefficient *Q;
441 
442 public:
443  VectorCurlCurlIntegrator() { Q = NULL; }
444 
446 
448  virtual void AssembleElementMatrix(const FiniteElement &el,
449  ElementTransformation &Trans,
450  DenseMatrix &elmat);
452  virtual double GetElementEnergy(const FiniteElement &el,
454  const Vector &elfun);
455 };
456 
459 {
460 private:
461  Coefficient *Q;
462  VectorCoefficient *VQ;
463  MatrixCoefficient *MQ;
464  void Init(Coefficient *q, VectorCoefficient *vq, MatrixCoefficient *mq)
465  { Q = q; VQ = vq; MQ = mq; }
466 
467 #ifndef MFEM_THREAD_SAFE
468  Vector shape;
469  Vector D;
470  DenseMatrix K;
471  DenseMatrix test_vshape;
472  DenseMatrix trial_vshape;
473 #endif
474 
475 public:
476  VectorFEMassIntegrator() { Init(NULL, NULL, NULL); }
477  VectorFEMassIntegrator(Coefficient *_q) { Init(_q, NULL, NULL); }
478  VectorFEMassIntegrator(Coefficient &q) { Init(&q, NULL, NULL); }
479  VectorFEMassIntegrator(VectorCoefficient *_vq) { Init(NULL, _vq, NULL); }
480  VectorFEMassIntegrator(VectorCoefficient &vq) { Init(NULL, &vq, NULL); }
481  VectorFEMassIntegrator(MatrixCoefficient *_mq) { Init(NULL, NULL, _mq); }
482  VectorFEMassIntegrator(MatrixCoefficient &mq) { Init(NULL, NULL, &mq); }
483 
484  virtual void AssembleElementMatrix(const FiniteElement &el,
485  ElementTransformation &Trans,
486  DenseMatrix &elmat);
487  virtual void AssembleElementMatrix2(const FiniteElement &trial_fe,
488  const FiniteElement &test_fe,
489  ElementTransformation &Trans,
490  DenseMatrix &elmat);
491 };
492 
497 {
498 private:
499  Coefficient *Q;
500 
501  Vector shape;
502  Vector divshape;
503  DenseMatrix dshape;
504  DenseMatrix gshape;
505  DenseMatrix Jadj;
506 
507 public:
511 
512  virtual void AssembleElementMatrix2(const FiniteElement &trial_fe,
513  const FiniteElement &test_fe,
514  ElementTransformation &Trans,
515  DenseMatrix &elmat);
516 };
517 
520 {
521 private:
522  Coefficient *Q;
523 
524 #ifndef MFEM_THREAD_SAFE
525  Vector divshape;
526 #endif
527 
528 public:
529  DivDivIntegrator() { Q = NULL; }
531 
532  virtual void AssembleElementMatrix(const FiniteElement &el,
533  ElementTransformation &Trans,
534  DenseMatrix &elmat);
535 };
536 
540 {
541 private:
542  Coefficient *Q;
543 
544  DenseMatrix Jinv;
545  DenseMatrix dshape;
546  DenseMatrix gshape;
547  DenseMatrix pelmat;
548 
549 public:
552 
553  virtual void AssembleElementMatrix(const FiniteElement &el,
554  ElementTransformation &Trans,
555  DenseMatrix &elmat);
556 };
557 
564 {
565 private:
566  double q_lambda, q_mu;
567  Coefficient *lambda, *mu;
568 
569 #ifndef MFEM_THREAD_SAFE
570  DenseMatrix dshape, Jinv, gshape, pelmat;
571  Vector divshape;
572 #endif
573 
574 public:
576  { lambda = &l; mu = &m; }
579  ElasticityIntegrator(Coefficient &m, double q_l, double q_m)
580  { lambda = NULL; mu = &m; q_lambda = q_l; q_mu = q_m; }
581 
582  virtual void AssembleElementMatrix(const FiniteElement &,
584  DenseMatrix &);
585 };
586 
596 {
597 private:
598  Coefficient *rho;
600  double alpha, beta;
601 
602  Vector shape1, shape2;
603 
604 public:
606  DGTraceIntegrator(VectorCoefficient &_u, double a, double b)
607  { rho = NULL; u = &_u; alpha = a; beta = b; }
608 
610  double a, double b)
611  { rho = &_rho; u = &_u; alpha = a; beta = b; }
612 
614  virtual void AssembleFaceMatrix(const FiniteElement &el1,
615  const FiniteElement &el2,
617  DenseMatrix &elmat);
618 };
619 
633 {
634 protected:
637  double sigma, kappa;
638 
639  // these are not thread-safe!
642 
643 public:
644  DGDiffusionIntegrator(const double s, const double k)
645  : Q(NULL), MQ(NULL), sigma(s), kappa(k) { }
646  DGDiffusionIntegrator(Coefficient &q, const double s, const double k)
647  : Q(&q), MQ(NULL), sigma(s), kappa(k) { }
648  DGDiffusionIntegrator(MatrixCoefficient &q, const double s, const double k)
649  : Q(NULL), MQ(&q), sigma(s), kappa(k) { }
651  virtual void AssembleFaceMatrix(const FiniteElement &el1,
652  const FiniteElement &el2,
654  DenseMatrix &elmat);
655 };
656 
661 {
662 private:
663  Vector face_shape, shape1, shape2;
664 
665 public:
668  virtual void AssembleFaceMatrix(const FiniteElement &trial_face_fe,
669  const FiniteElement &test_fe1,
670  const FiniteElement &test_fe2,
672  DenseMatrix &elmat);
673 };
674 
679 {
680 private:
681  Vector face_shape, normal, shape1_n, shape2_n;
682  DenseMatrix shape1, shape2;
683 
684 public:
687  virtual void AssembleFaceMatrix(const FiniteElement &trial_face_fe,
688  const FiniteElement &test_fe1,
689  const FiniteElement &test_fe2,
691  DenseMatrix &elmat);
692 };
693 
697 
698 
703 {
704 public:
705  virtual void AssembleElementMatrix2(const FiniteElement &h1_fe,
706  const FiniteElement &nd_fe,
707  ElementTransformation &Trans,
708  DenseMatrix &elmat)
709  { nd_fe.ProjectGrad(h1_fe, Trans, elmat); }
710 };
711 
712 
717 {
718 public:
719  virtual void AssembleElementMatrix2(const FiniteElement &dom_fe,
720  const FiniteElement &ran_fe,
721  ElementTransformation &Trans,
722  DenseMatrix &elmat)
723  { ran_fe.Project(dom_fe, Trans, elmat); }
724 };
725 
726 
731 {
732 public:
733  virtual void AssembleElementMatrix2(const FiniteElement &dom_fe,
734  const FiniteElement &ran_fe,
735  ElementTransformation &Trans,
736  DenseMatrix &elmat)
737  { ran_fe.ProjectCurl(dom_fe, Trans, elmat); }
738 };
739 
740 
750 {
751 public:
752  virtual void AssembleElementMatrix2(const FiniteElement &dom_fe,
753  const FiniteElement &ran_fe,
754  ElementTransformation &Trans,
755  DenseMatrix &elmat)
756  { ran_fe.ProjectDiv(dom_fe, Trans, elmat); }
757 };
758 
759 
764 {
765 public:
766  virtual void AssembleElementMatrix2(const FiniteElement &dom_fe,
767  const FiniteElement &ran_fe,
768  ElementTransformation &Trans,
769  DenseMatrix &elmat);
770 };
771 
772 }
773 
774 #endif
Abstract class for Finite Elements.
Definition: fe.hpp:44
virtual void AssembleElementMatrix(const FiniteElement &el, ElementTransformation &Trans, DenseMatrix &elmat)
Given a particular Finite Element computes the element matrix elmat.
Definition: bilininteg.hpp:370
VectorFEMassIntegrator(Coefficient &q)
Definition: bilininteg.hpp:478
virtual void AssembleElementMatrix(const FiniteElement &el, ElementTransformation &Trans, DenseMatrix &elmat)
Given a particular Finite Element computes the element matrix elmat.
Definition: bilininteg.cpp:65
virtual void AssembleElementMatrix(const FiniteElement &el, ElementTransformation &Trans, DenseMatrix &elmat)
Given a particular Finite Element computes the element matrix elmat.
Definition: bilininteg.hpp:390
Class for integration rule.
Definition: intrules.hpp:83
DGTraceIntegrator(VectorCoefficient &_u, double a, double b)
Construct integrator with rho = 1.
Definition: bilininteg.hpp:606
DGDiffusionIntegrator(Coefficient &q, const double s, const double k)
Definition: bilininteg.hpp:646
Integrator defining a sum of multiple Integrators.
Definition: bilininteg.hpp:150
SumIntegrator(int own_integs=1)
Definition: bilininteg.hpp:158
virtual void AssembleElementMatrix(const FiniteElement &el, ElementTransformation &Trans, DenseMatrix &elmat)
Given a particular Finite Element computes the element matrix elmat.
DiffusionIntegrator(Coefficient &q)
Construct a diffusion integrator with a scalar coefficient q.
Definition: bilininteg.hpp:188
virtual void ProjectDiv(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &div) const
Definition: fe.cpp:116
virtual void AssembleElementMatrix2(const FiniteElement &trial_fe, const FiniteElement &test_fe, ElementTransformation &Trans, DenseMatrix &elmat)
Definition: bilininteg.cpp:838
virtual void AssembleElementMatrix(const FiniteElement &el, ElementTransformation &Trans, DenseMatrix &elmat)
Given a particular Finite Element computes the element matrix elmat.
virtual void Project(Coefficient &coeff, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:75
virtual double ComputeFluxEnergy(const FiniteElement &fluxelem, ElementTransformation &Trans, Vector &flux, Vector *d_energy=NULL)
ElasticityIntegrator(Coefficient &l, Coefficient &m)
Definition: bilininteg.hpp:575
VectorFEMassIntegrator(VectorCoefficient *_vq)
Definition: bilininteg.hpp:479
VectorDiffusionIntegrator(Coefficient &q)
Definition: bilininteg.hpp:551
Integrator for (curl u, curl v) for Nedelec elements.
Definition: bilininteg.hpp:401
virtual void AssembleElementMatrix2(const FiniteElement &trial_fe, const FiniteElement &test_fe, ElementTransformation &Trans, DenseMatrix &elmat)
VectorCurlCurlIntegrator(Coefficient &q)
Definition: bilininteg.hpp:445
VectorMassIntegrator(Coefficient &q, const IntegrationRule *ir)
Definition: bilininteg.hpp:310
alpha (q . grad u, v) using the &quot;group&quot; FE discretization
Definition: bilininteg.hpp:269
virtual void AssembleElementMatrix(const FiniteElement &el, ElementTransformation &Trans, DenseMatrix &elmat)
Given a particular Finite Element computes the element matrix elmat.
Definition: bilininteg.cpp:670
virtual void AssembleElementMatrix2(const FiniteElement &trial_fe, const FiniteElement &test_fe, ElementTransformation &Trans, DenseMatrix &elmat)
Data type dense matrix using column-major storage.
Definition: densemat.hpp:22
DivDivIntegrator(Coefficient &q)
Definition: bilininteg.hpp:530
virtual void AssembleFaceMatrix(const FiniteElement &el1, const FiniteElement &el2, FaceElementTransformations &Trans, DenseMatrix &elmat)
Definition: bilininteg.cpp:82
virtual void AssembleElementMatrix(const FiniteElement &el, ElementTransformation &Trans, DenseMatrix &elmat)
Given a particular Finite Element computes the element matrix elmat.
Definition: bilininteg.cpp:91
BilinearFormIntegrator(const IntegrationRule *ir=NULL)
Definition: bilininteg.hpp:27
void AddIntegrator(BilinearFormIntegrator *integ)
Definition: bilininteg.hpp:160
virtual double ComputeFluxEnergy(const FiniteElement &fluxelem, ElementTransformation &Trans, Vector &flux, Vector *d_energy=NULL)
Definition: bilininteg.hpp:74
virtual void AssembleElementMatrix(const FiniteElement &el, ElementTransformation &Trans, DenseMatrix &elmat)
Given a particular Finite Element computes the element matrix elmat.
Definition: bilininteg.hpp:347
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.cpp:100
(Q div u, div v) for RT elements
Definition: bilininteg.hpp:519
virtual void ComputeElementFlux(const FiniteElement &el, ElementTransformation &Trans, Vector &u, const FiniteElement &fluxelem, Vector &flux, int with_coef=1)
Definition: bilininteg.cpp:362
MatrixCoefficient * MQ
Definition: bilininteg.hpp:636
VectorFEMassIntegrator(VectorCoefficient &vq)
Definition: bilininteg.hpp:480
VectorMassIntegrator()
Construct an integrator with coefficient 1.0.
Definition: bilininteg.hpp:302
VectorMassIntegrator(VectorCoefficient &q, int qo=0)
Construct an integrator with diagonal coefficient q.
Definition: bilininteg.hpp:314
virtual void AssembleElementMatrix2(const FiniteElement &dom_fe, const FiniteElement &ran_fe, ElementTransformation &Trans, DenseMatrix &elmat)
Definition: bilininteg.hpp:719
virtual void AssembleElementMatrix2(const FiniteElement &trial_fe, const FiniteElement &test_fe, ElementTransformation &Trans, DenseMatrix &elmat)
Definition: bilininteg.cpp:73
Integrator that inverts the matrix assembled by another integrator.
Definition: bilininteg.hpp:132
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition: fe.cpp:108
ElasticityIntegrator(Coefficient &m, double q_l, double q_m)
Definition: bilininteg.hpp:579
virtual void AssembleFaceMatrix(const FiniteElement &trial_face_fe, const FiniteElement &test_fe1, const FiniteElement &test_fe2, FaceElementTransformations &Trans, DenseMatrix &elmat)
virtual void AssembleElementMatrix(const FiniteElement &el, ElementTransformation &Trans, DenseMatrix &elmat)
Given a particular Finite Element computes the element matrix elmat.
Definition: bilininteg.cpp:991
virtual void AssembleElementMatrix(const FiniteElement &el, ElementTransformation &Trans, DenseMatrix &elmat)
Definition: bilininteg.cpp:488
VectorDivergenceIntegrator(Coefficient &q)
Definition: bilininteg.hpp:510
virtual void AssembleElementMatrix(const FiniteElement &el, ElementTransformation &Trans, DenseMatrix &elmat)
Given a particular Finite Element computes the element matrix elmat.
Definition: bilininteg.cpp:98
Integrator for (curl u, v) for Nedelec and RT elements.
Definition: bilininteg.hpp:358
virtual void AssembleElementMatrix(const FiniteElement &el, ElementTransformation &Trans, DenseMatrix &elmat)
Given a particular Finite Element computes the element matrix elmat.
Definition: bilininteg.cpp:105
virtual void AssembleElementGrad(const FiniteElement &el, ElementTransformation &Tr, const Vector &elfun, DenseMatrix &elmat)
Assemble the local gradient matrix.
Definition: bilininteg.hpp:63
VectorFEDivergenceIntegrator(Coefficient &q)
Definition: bilininteg.hpp:346
void SetIntRule(const IntegrationRule *ir)
Definition: bilininteg.hpp:79
VectorFECurlIntegrator(Coefficient &q)
Definition: bilininteg.hpp:369
virtual void AssembleElementMatrix2(const FiniteElement &h1_fe, const FiniteElement &nd_fe, ElementTransformation &Trans, DenseMatrix &elmat)
Definition: bilininteg.hpp:705
virtual void ComputeElementFlux(const FiniteElement &el, ElementTransformation &Trans, Vector &u, const FiniteElement &fluxelem, Vector &flux, int with_coef=1)
Definition: bilininteg.hpp:68
DiffusionIntegrator()
Construct a diffusion integrator with coefficient Q = 1.
Definition: bilininteg.hpp:185
virtual void AssembleElementMatrix(const FiniteElement &el, ElementTransformation &Trans, DenseMatrix &elmat)
Given a particular Finite Element computes the element matrix elmat.
virtual void AssembleElementMatrix2(const FiniteElement &trial_fe, const FiniteElement &test_fe, ElementTransformation &Trans, DenseMatrix &elmat)
Definition: bilininteg.cpp:751
BoundaryMassIntegrator(Coefficient &q)
Definition: bilininteg.hpp:248
virtual void AssembleElementMatrix(const FiniteElement &, ElementTransformation &, DenseMatrix &)
Given a particular Finite Element computes the element matrix elmat.
Definition: bilininteg.cpp:616
virtual void AssembleElementVector(const FiniteElement &el, ElementTransformation &Tr, const Vector &elfun, Vector &elvect)
Perform the local action of the BilinearFormIntegrator.
Definition: bilininteg.cpp:56
virtual void AssembleElementVector(const FiniteElement &el, ElementTransformation &Tr, const Vector &elfun, Vector &elvect)
Perform the local action of the BilinearFormIntegrator.
Definition: bilininteg.cpp:284
Abstract base class BilinearFormIntegrator.
Definition: bilininteg.hpp:22
virtual void AssembleElementMatrix2(const FiniteElement &dom_fe, const FiniteElement &ran_fe, ElementTransformation &Trans, DenseMatrix &elmat)
VectorDivergenceIntegrator(Coefficient *_q)
Definition: bilininteg.hpp:509
DiffusionIntegrator(MatrixCoefficient &q)
Construct a diffusion integrator with a matrix coefficient q.
Definition: bilininteg.hpp:191
virtual void AssembleElementMatrix(const FiniteElement &, ElementTransformation &, DenseMatrix &)
Given a particular Finite Element computes the element matrix elmat.
Definition: bilininteg.cpp:572
VectorFEMassIntegrator(MatrixCoefficient &mq)
Definition: bilininteg.hpp:482
Base class Coefficient that may optionally depend on time.
Definition: coefficient.hpp:31
virtual void AssembleElementMatrix(const FiniteElement &el, ElementTransformation &Trans, DenseMatrix &elmat)
Given a particular Finite Element computes the element matrix elmat.
Definition: bilininteg.cpp:23
virtual void AssembleElementMatrix2(const FiniteElement &trial_fe, const FiniteElement &test_fe, ElementTransformation &Trans, DenseMatrix &elmat)
Definition: bilininteg.cpp:877
virtual void AssembleElementMatrix2(const FiniteElement &trial_fe, const FiniteElement &test_fe, ElementTransformation &Trans, DenseMatrix &elmat)
Definition: bilininteg.cpp:204
DGDiffusionIntegrator(const double s, const double k)
Definition: bilininteg.hpp:644
LumpedIntegrator(BilinearFormIntegrator *_bfi, int _own_bfi=1)
Definition: bilininteg.hpp:121
MassIntegrator(Coefficient &q, const IntegrationRule *ir=NULL)
Construct a mass integrator with coefficient q.
Definition: bilininteg.hpp:231
virtual void AssembleFaceMatrix(const FiniteElement &el1, const FiniteElement &el2, FaceElementTransformations &Trans, DenseMatrix &elmat)
virtual void AssembleElementMatrix2(const FiniteElement &trial_fe, const FiniteElement &test_fe, ElementTransformation &Trans, DenseMatrix &elmat)
Definition: bilininteg.cpp:923
virtual void AssembleElementMatrix(const FiniteElement &el, ElementTransformation &Trans, DenseMatrix &elmat)
Assemble an element matrix.
virtual void AssembleFaceMatrix(const FiniteElement &el1, const FiniteElement &el2, FaceElementTransformations &Trans, DenseMatrix &elmat)
Definition: bilininteg.cpp:39
VectorMassIntegrator(Coefficient &q, int qo=0)
Definition: bilininteg.hpp:308
VectorFEMassIntegrator(Coefficient *_q)
Definition: bilininteg.hpp:477
virtual void AssembleElementMatrix2(const FiniteElement &dom_fe, const FiniteElement &ran_fe, ElementTransformation &Trans, DenseMatrix &elmat)
Definition: bilininteg.hpp:733
VectorFEMassIntegrator(MatrixCoefficient *_mq)
Definition: bilininteg.hpp:481
virtual void AssembleElementMatrix2(const FiniteElement &trial_fe, const FiniteElement &test_fe, ElementTransformation &Trans, DenseMatrix &elmat)
Definition: bilininteg.cpp:531
VectorMassIntegrator(MatrixCoefficient &q, int qo=0)
Construct an integrator with matrix coefficient q.
Definition: bilininteg.hpp:317
virtual void AssembleElementMatrix(const FiniteElement &, ElementTransformation &, DenseMatrix &)
Given a particular Finite Element computes the element matrix elmat.
GroupConvectionIntegrator(VectorCoefficient &q, double a=1.0)
Definition: bilininteg.hpp:278
virtual ~SumIntegrator()
Definition: bilininteg.cpp:118
DGDiffusionIntegrator(MatrixCoefficient &q, const double s, const double k)
Definition: bilininteg.hpp:648
virtual double GetElementEnergy(const FiniteElement &el, ElementTransformation &Tr, const Vector &elfun)
Compute element energy: (1/2) (curl u, curl u)_E.
Vector data type.
Definition: vector.hpp:33
ConvectionIntegrator(VectorCoefficient &q, double a=1.0)
Definition: bilininteg.hpp:261
virtual void AssembleFaceMatrix(const FiniteElement &el1, const FiniteElement &el2, FaceElementTransformations &Trans, DenseMatrix &elmat)
virtual void AssembleElementMatrix2(const FiniteElement &trial_fe, const FiniteElement &test_fe, ElementTransformation &Trans, DenseMatrix &elmat)
Definition: bilininteg.cpp:31
DerivativeIntegrator(Coefficient &q, int i)
Definition: bilininteg.hpp:389
DGTraceIntegrator(Coefficient &_rho, VectorCoefficient &_u, double a, double b)
Definition: bilininteg.hpp:609
CurlCurlIntegrator(Coefficient &q)
Construct a bilinear form integrator for Nedelec elements.
Definition: bilininteg.hpp:414
const IntegrationRule * IntRule
Definition: bilininteg.hpp:25
virtual void AssembleFaceMatrix(const FiniteElement &trial_face_fe, const FiniteElement &test_fe1, const FiniteElement &test_fe2, FaceElementTransformations &Trans, DenseMatrix &elmat)
virtual void AssembleElementMatrix2(const FiniteElement &dom_fe, const FiniteElement &ran_fe, ElementTransformation &Trans, DenseMatrix &elmat)
Definition: bilininteg.hpp:752
virtual void AssembleElementMatrix(const FiniteElement &el, ElementTransformation &Trans, DenseMatrix &elmat)
Definition: bilininteg.cpp:131
MassIntegrator(const IntegrationRule *ir=NULL)
Definition: bilininteg.hpp:228
virtual void ComputeElementFlux(const FiniteElement &el, ElementTransformation &Trans, Vector &u, const FiniteElement &fluxelem, Vector &flux, int with_coef)
virtual double ComputeFluxEnergy(const FiniteElement &fluxelem, ElementTransformation &Trans, Vector &flux, Vector *d_energy=NULL)
Definition: bilininteg.cpp:420
Integrator for (Q u, v) for VectorFiniteElements.
Definition: bilininteg.hpp:458
TransposeIntegrator(BilinearFormIntegrator *_bfi, int _own_bfi=1)
Definition: bilininteg.hpp:93
Class for integrating (Q D_i(u), v); u and v are scalars.
Definition: bilininteg.hpp:381
InverseIntegrator(BilinearFormIntegrator *integ, int own_integ=1)
Definition: bilininteg.hpp:139
alpha (q . grad u, v)
Definition: bilininteg.hpp:252