Geophysical Inversion and Modelling Library v1.5.4
Loading...
Searching...
No Matches
elementmatrix.h
1/******************************************************************************
2 * Copyright (C) 2006-2024 by the GIMLi development team *
3 * Carsten Rücker carsten@resistivity.net *
4 * *
5 * Licensed under the Apache License, Version 2.0 (the "License"); *
6 * you may not use this file except in compliance with the License. *
7 * You may obtain a copy of the License at *
8 * *
9 * http://www.apache.org/licenses/LICENSE-2.0 *
10 * *
11 * Unless required by applicable law or agreed to in writing, software *
12 * distributed under the License is distributed on an "AS IS" BASIS, *
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
14 * See the License for the specific language governing permissions and *
15 * limitations under the License. *
16 * *
17 ******************************************************************************/
18
19#ifndef _GIMLI_ELEMENTMATRIX__H
20#define _GIMLI_ELEMENTMATRIX__H
21
22#include "gimli.h"
23#include "vector.h"
24#include "matrix.h"
25
26namespace GIMLI{
27
28class FEAFunction;
29
30template < class ValueType > class DLLEXPORT ElementMatrix {
31public:
34 ElementMatrix(Index dof=0){
35 this->_nDof = dof;
36 this->_newStyle = false;
37 this->_nCoeff = 0;
38 this->_dofPerCoeff = 0;
39 this->_dofOffset = 0;
40 }
41
43
44 inline const Vector< ValueType > & operator[](Index row) const {
45 return mat_[row]; }
46
47 void resize(Index rows, Index cols=0) {
48 if (cols == 0) cols = rows;
49 _idsR.resize(rows);
50 _idsC.resize(cols);
51 _ids.resize(rows);
52 mat_.resize(rows, cols);
53 }
54
55 ElementMatrix < ValueType > & operator += (const ElementMatrix < ValueType > & E){
56 for (uint i = 0; i < size(); i ++){ mat_[i] += E.row(i); }
57 return *this;
58 }
59
60 #define DEFINE_ELEMENTMATRIX_UNARY_MOD_OPERATOR__(OP) \
61 ElementMatrix < ValueType > & operator OP##= (ValueType val) { \
62 if (this->_newStyle){ \
63 if (this->_integrated){ \
64 for (Index i = 0; i < size(); i ++) mat_[i] OP##= val; \
65 } \
66 for (auto & m: _matX){ \
67 m OP##= val; \
68 } \
69 return *this;\
70 } \
71 for (Index i = 0; i < size(); i ++) mat_[i] OP##= val; \
72 return *this;\
73 } \
74
75 DEFINE_ELEMENTMATRIX_UNARY_MOD_OPERATOR__(+)
76 DEFINE_ELEMENTMATRIX_UNARY_MOD_OPERATOR__(-)
77 DEFINE_ELEMENTMATRIX_UNARY_MOD_OPERATOR__(/)
78 DEFINE_ELEMENTMATRIX_UNARY_MOD_OPERATOR__(*)
79
80 #undef DEFINE_ELEMENTMATRIX_UNARY_MOD_OPERATOR__
81
82 inline Index size() const { return mat_.rows(); }
83 inline Index rows() const { return mat_.rows(); }
84 inline Index cols() const { return mat_.cols(); }
85
86 inline const ValueType & getVal(Index i, Index j) const {
87 return mat_[i][j]; }
88 inline void setVal(Index i, Index j, const ValueType & v) {
89 mat_[i][j] = v; }
90 inline void addVal(Index i, Index j, const ValueType & v) {
91 mat_[i][j] += v; }
92
94 inline void setMat(const Matrix < ValueType > & m) { mat_ = m; }
96 inline Matrix < ValueType > * pMat() { return & mat_; }
98 inline const Matrix < ValueType > & mat() const { return mat_; }
100 inline const Vector < ValueType > & row(Index i) const { return mat_[i]; }
102 inline Vector < ValueType > col(Index i) const {
103 Vector < ValueType > ret(this->rows());
104 for (Index j = 0; j < ret.size(); j ++){ ret[j] = mat_[j][i];}
105 return ret;
106 }
107
112 void fillIds(const MeshEntity & ent, Index nC=1);
113
115 inline void setIds(const IndexArray & idsR, const IndexArray & idsC) {
116 _idsR = idsR; _idsC = idsC; _ids = idsR;
117 }
118
120 inline void setIds(const IndexArray & ids) {
121 _idsR = ids; _idsC = ids; _ids = ids;
122 }
123
124 inline const IndexArray & ids() const { return _ids; }
126 inline const IndexArray & rowIDs() const { return _idsR; }
128 inline const IndexArray & colIDs() const { return _idsC; }
130 inline const Index idx(Index i) const {
131 return _ids[i]; }
132
134 ElementMatrix < ValueType > & u(const MeshEntity & ent
135 // const Matrix< ValueType > & C
136 );
137
139 ElementMatrix < ValueType > & u2(const MeshEntity & ent
140 // const Matrix< ValueType > & C
141 );
142
145 const RVector * &w, const PosVector * &x, int order);
146
147
149 Vector < ValueType > stress(const MeshEntity & ent,
150 const Matrix< ValueType > & C,
151 const RVector & u, bool voigtNotation=false);
152
154 const Matrix < ValueType > & gradientBase() const { return this->_grad;}
155
157 void fillGradientBase(const MeshEntity & ent,
158 const RVector & w,
159 const PosVector & x,
160 Index nC,
161 bool voigtNotation);
162
164 ElementMatrix < ValueType > & gradU(const Cell & cell,
165 Index nC,
166 bool voigtNotation=false);
167
169 ElementMatrix < ValueType > & gradU(const MeshEntity & ent,
170 const RVector & w,
171 const PosVector & x,
172 Index nC,
173 bool voigtNotation=false);
174
175
184 ElementMatrix < ValueType > & gradU2(const Cell & cell,
185 const Matrix< ValueType > & C,
186 bool voigtNotation=false);
187
189 ElementMatrix < ValueType > & gradU2(const Cell & cell, ValueType c){
190 Matrix < ValueType > C(1, 1);
191 C[0][0] = c;
192 return this->gradU2(cell, C, false);
193 }
194
196 ElementMatrix < ValueType > & gradU2(const MeshEntity & ent,
197 const Matrix< ValueType > & C,
198 const RVector & w,
199 const PosVector & x,
200 bool voigtNotation=false);
201
202 ElementMatrix < ValueType > & ux2uy2uz2(const Cell & cell,
203 bool useCache=false);
204
205 ElementMatrix < ValueType > & u(const MeshEntity & ent,
206 const RVector & w,
207 const PosVector & x,
208 bool verbose=false);
209 ElementMatrix < ValueType > & u2(const MeshEntity & ent,
210 const RVector & w,
211 const PosVector & x,
212 bool verbose=false);
213 ElementMatrix < ValueType > & ux2(const MeshEntity & ent,
214 const RVector & w,
215 const PosVector & x,
216 bool verbose=false);
217 ElementMatrix < ValueType > & ux2uy2(const MeshEntity & ent,
218 const RVector & w,
219 const PosVector & x,
220 bool verbose=false);
221 ElementMatrix < ValueType > & ux2uy2uz2(const MeshEntity & ent,
222 const RVector & w,
223 const PosVector & x,
224 bool verbose=false);
225
226 ElementMatrix < double > & dudi(const MeshEntity & ent,
227 const RVector & w,
228 const PosVector & x,
229 Index i, bool verbose=false);
230
231 ElementMatrix < double > & ux(const MeshEntity & ent,
232 const RVector & w,
233 const PosVector & x,
234 bool verbose=false){
235 return dudi(ent, w, x, 0, verbose);
236 }
237 ElementMatrix < double > & uy(const MeshEntity & ent,
238 const RVector & w,
239 const PosVector & x,
240 bool verbose=false){
241 return dudi(ent, w, x, 1, verbose);
242 }
243 ElementMatrix < double > & uz(const MeshEntity & ent,
244 const RVector & w,
245 const PosVector & x,
246 bool verbose=false){
247 return dudi(ent, w, x, 2, verbose);
248 }
249
250 Vector < ValueType > mult(const Vector < ValueType > & v){
251 Vector < ValueType > ret(this->size());
252 this->mult(v, ret);
253 return ret;
254 }
255
257 void mult(const Vector < ValueType > & a, Vector < ValueType > & ret){
258 ASSERT_EQUAL(size(), ret.size())
259 for (Index i = 0; i < size(); i ++) {
260 for (Index j = 0; j < size(); j ++) {
261 ret[i] += mat_[i][j] * a[_ids[j]];
262 }
263 }
264 }
265
266 ValueType mult(const Vector < ValueType > & a,
267 const Vector < ValueType > & b){
268 ValueType ret = 0;
269 for (Index i = 0; i < size(); i ++) {
270 ValueType t = 0;
271 for (Index j = 0; j < size(); j ++) {
272 t += mat_[i][j] * a[_ids[j]];
273 }
274 ret += t * b[_ids[i]];
275 }
276 return ret;
277 }
278
280 template < class Val > Val mult_(const Vector < Val > & a,
281 const Vector < Val > & b,
282 const Vector < Val > & m,
283 const Vector < Val > & n){
284 Val ret = 0;
285 for (Index i = 0; i < size(); i ++) {
286 Val t = 0;
287 for (Index j = 0; j < size(); j ++) {
288 t += mat_[i][j] * (a[_ids[j]]-b[_ids[j]]);
289 }
290 ret += t * (m[_ids[i]]-n[_ids[i]]);
291 }
292 return ret;
293 }
294
295 double mult(const RVector & a, const RVector & b,
296 const RVector & m, const RVector & n){
297 return mult_(a, b, m, n);
298 }
299 Complex mult(const CVector & a, const CVector & b,
300 const CVector & m, const CVector & n){
301 return mult_(a, b, m, n);
302 }
303
304 //** new interface starts here **//
305 ElementMatrix(Index nCoeff, Index dofPerCoeff, Index dofOffset);
306
307 ElementMatrix(const ElementMatrix < ValueType > & E);
308
309 void copyFrom(const ElementMatrix < ValueType > & E, bool withMat=true);
310
311 void init(Index nCoeff, Index dofPerCoeff, Index dofOffset);
312
314 ElementMatrix < ValueType > & pot(const MeshEntity & ent, Index order,
315 bool sum,
316 Index nCoeff, Index dof, Index dofOffset);
317
319 ElementMatrix < ValueType > & pot(const MeshEntity & ent, Index order,
320 bool sum=false);
321
323 ElementMatrix < ValueType > & grad(const MeshEntity & ent, Index order,
324 bool elastic, bool sum, bool div,
325 Index nCoeff, Index dof, Index dofOffset, bool kelvin=false
326 );
327
329 ElementMatrix < ValueType > & grad(const MeshEntity & ent, Index order,
330 bool elastic=false, bool sum=false,
331 bool div=false, bool kelvin=false);
332
334 void integrate() const;
335
337 const std::vector < Matrix < ValueType > > & matX() const { return _matX; }
338
339 std::vector < Matrix < ValueType > > * pMatX() { return &_matX; }
340
342 const MeshEntity & entity() const { ASSERT_PTR(_ent); return *_ent; }
343
345 const PosVector & x() const { ASSERT_PTR(_x); return *_x; }
346
348 const RVector & w() const { ASSERT_PTR(_w); return *_w; }
349
350 Index order() const { return _order; }
351 Index nCoeff() const { return _nCoeff; }
352 Index dofPerCoeff() const { return _dofPerCoeff; }
353 Index dofOffset() const { return _dofOffset; }
354
355 void setDiv(bool div){ _div = true;}
356 bool isDiv() const { return _div;}
357
358 bool isIntegrated() const { return _integrated; }
359 void integrated(bool i) { _integrated = i; }
360
361 bool valid() const { return _valid; }
362 void setValid(bool v) { _valid = v; }
363
364 bool elastic() const { return _elastic;}
365
366 bool oldStyle() const { return !this->_newStyle; }
367protected:
368 mutable Matrix < ValueType > mat_;
369 IndexArray _ids;
370 IndexArray _idsC;
371 IndexArray _idsR;
372
373 std::map< uint, RVector > uCache_;
374 std::map< uint, Matrix < ValueType > > u2Cache_;
375
376 std::vector< Matrix < ValueType > > _B;
377 Matrix < ValueType > _grad;
378
379 // number of single dof
380 Index _nDof;
381 // number of coefficients: 1, 2, 3 for scalar(dim), 1, 3, 6 for vector(dim)
382 // Index _nC;
383
384 RMatrix dNdr_;
385 RMatrix dNds_;
386 RMatrix dNdt_;
387
388 RMatrix dNdx_; // (nRules, nVerts)
389 RMatrix dNdy_; // (nRules, nVerts)
390 RMatrix dNdz_; // (nRules, nVerts)
391
392 RMatrix _abaTmp; // temp workspace
393
394 //** new interface starts here **//
395 // const Mesh * _mesh;
396 Index _order;
397 Index _nCoeff;
398 Index _dofPerCoeff;
399 Index _dofOffset;
400
401 const MeshEntity * _ent;
402 const RVector * _w;
403 const PosVector * _x;
404 // matrices per quadrature point
405 std::vector < Matrix < ValueType > > _matX;
406
407 bool _newStyle;
408 bool _div;
409 bool _valid;
410 bool _elastic;
411 mutable bool _integrated;
412
413private:
415
417 ElementMatrix < ValueType > & operator = (const ElementMatrix < ValueType > & E) {
418 std::cout << "ElementMatrix::operator = (" << std::endl;
419 THROW_TO_IMPL
420 if (this != & E){
421// this->resize(E.size());
422// for (uint i = 0; i < E.size(); i ++) mat_[i] = E.row(i);
423// _ids = E.idx();
424 } return *this;
425 }
426};
427
428template < > DLLEXPORT
429void ElementMatrix < double >::copyFrom(const ElementMatrix < double > & E,
430 bool withMat);
431
432template < > DLLEXPORT
433void ElementMatrix < double >::init(Index nCoeff, Index dofPerCoeff,
434 Index dofOffset);
435
436DLLEXPORT void dot(const ElementMatrix < double > & A,
437 const ElementMatrix < double > & B,
438 double c, ElementMatrix < double > & ret);
439
440DLLEXPORT void dot(const ElementMatrix < double > & A,
441 const ElementMatrix < double > & B,
442 const Pos & c, ElementMatrix < double > & ret);
443
444DLLEXPORT void dot(const ElementMatrix < double > & A,
445 const ElementMatrix < double > & B,
446 const RMatrix & c, ElementMatrix < double > & ret);
447
448DLLEXPORT void dot(const ElementMatrix < double > & A,
449 const ElementMatrix < double > & B,
450 const FEAFunction & c, ElementMatrix < double > & ret);
451
452// DLLEXPORT void dot(const ElementMatrix < double > & A,
453// const ElementMatrix < double > & B,
454// A_TYPE c, ElementMatrix < double > & C);
455
456#define DEFINE_DOT_MULT(A_TYPE) \
457DLLEXPORT const ElementMatrix < double > dot( \
458 const ElementMatrix < double > & A, \
459 const ElementMatrix < double > & B, \
460 A_TYPE c); \
461DLLEXPORT void mult(const ElementMatrix < double > & A, A_TYPE b, \
462 ElementMatrix < double > & C); \
463DLLEXPORT const ElementMatrix < double > mult( \
464 const ElementMatrix < double > & A, A_TYPE b); \
465
466DEFINE_DOT_MULT(double)
467DEFINE_DOT_MULT(const Pos &)
468DEFINE_DOT_MULT(const RMatrix &)
469DEFINE_DOT_MULT(const FEAFunction &)
470
471#undef DEFINE_DOT_MULT
472
473DLLEXPORT const ElementMatrix < double > dot(
474 const ElementMatrix < double > & A,
475 const ElementMatrix < double > & B);
476// return dot(A, B, 1.0);}
477
478DLLEXPORT void dot(const ElementMatrix < double > & A,
479 const ElementMatrix < double > & B,
480 ElementMatrix < double > & ret);
481// return dot(A, B, 1.0, ret);
482// }
483
484
486DLLEXPORT void mult(const ElementMatrix < double > & A, const RVector & b,
487 ElementMatrix < double > & C);
489DLLEXPORT void mult(const ElementMatrix < double > & A, const PosVector & b,
490 ElementMatrix < double > & C);
492DLLEXPORT void mult(const ElementMatrix < double > & A,
493 const std::vector < RMatrix > & b,
494 ElementMatrix < double > & C);
495
497DLLEXPORT void evaluateQuadraturePoints(const MeshEntity & ent,
498 const PosVector & x,
499 const FEAFunction & f, RVector & ret);
501DLLEXPORT void evaluateQuadraturePoints(const MeshEntity & ent,
502 const PosVector & x,
503 const FEAFunction & f, PosVector & ret);
505DLLEXPORT void evaluateQuadraturePoints(const MeshEntity & ent,
506 const PosVector & x,
507 const FEAFunction & f,
508 std::vector < RMatrix > & ret);
510DLLEXPORT void evaluateQuadraturePoints(const Mesh & mesh, Index order,
511 const FEAFunction & f,
512 std::vector< RVector > & ret);
514DLLEXPORT void evaluateQuadraturePoints(const Mesh & mesh, Index order,
515 const FEAFunction & f,
516 std::vector< PosVector > & ret);
518DLLEXPORT void evaluateQuadraturePoints(const Mesh & mesh, Index order,
519 const FEAFunction & f,
520 std::vector< std::vector< RMatrix > > & ret);
521
522
523#define DEFINE_CREATE_FORCE_VECTOR(A_TYPE) \
524DLLEXPORT void createForceVector(const Mesh & mesh, Index order, \
525 RVector & ret, A_TYPE a, \
526 Index nCoeff, Index dofOffset); \
527DLLEXPORT void createMassMatrix(const Mesh & mesh, Index order, \
528 RSparseMapMatrix & ret, A_TYPE a, \
529 Index nCoeff, Index dofOffset); \
530DLLEXPORT void createStiffnessMatrix(const Mesh & mesh, Index order, \
531 RSparseMapMatrix & ret, A_TYPE a, \
532 Index nCoeff, Index dofOffset, \
533 bool elastic=false, bool kelvin=false); \
534
535DEFINE_CREATE_FORCE_VECTOR(double) // const scalar for all cells
536DEFINE_CREATE_FORCE_VECTOR(const Pos &) // const vector for all cells
537DEFINE_CREATE_FORCE_VECTOR(const RVector &) // scalar for each cell
538DEFINE_CREATE_FORCE_VECTOR(const PosVector &) // vector for each cell
539DEFINE_CREATE_FORCE_VECTOR(const RMatrix &) // const matrix for all cells
540// matrix for each cell
541DEFINE_CREATE_FORCE_VECTOR(const std::vector< RVector > &)
542// vector at each quadrature point for each cell
543DEFINE_CREATE_FORCE_VECTOR(const std::vector< PosVector > &)
544// matrix at each quadrature point for each cell
545DEFINE_CREATE_FORCE_VECTOR(const std::vector < RMatrix > &)
546// scalar at each quadrature point for each cell
547DEFINE_CREATE_FORCE_VECTOR(const std::vector< std::vector < RMatrix > > &)
548// generic function for each point
549DEFINE_CREATE_FORCE_VECTOR(const FEAFunction &)
550
551#undef DEFINE_CREATE_FORCE_VECTOR
552
555class DLLEXPORT FEAFunction {
556public:
557 FEAFunction(Index valueSize): _valueSize(valueSize){ }
558
559 virtual ~FEAFunction() { }
560
561 virtual double evalR1(const Pos & arg, const MeshEntity * ent=0) const{
562 log(Warning, "FEAFunction.eval should be overloaded.");
563 return 0.0;
564 }
565 virtual Pos evalR3(const Pos & arg, const MeshEntity * ent=0) const{
566 log(Warning, "FEAFunction.eval should be overloaded.");
567 return Pos(0.0, 0.0, 0.0);
568 }
569 virtual RMatrix evalRM(const Pos & arg, const MeshEntity * ent=0) const{
570 log(Warning, "FEAFunction.eval should be overloaded.");
571 return RMatrix(0, 0);
572 }
573
574 Index valueSize() const { return _valueSize; }
575
576protected:
577 Index _valueSize;
578};
579
580class DLLEXPORT ElementMatrixMap {
581public:
582
583 void add(Index row, const ElementMatrix < double > & Ai);
584
585 //TODO .. check if its the same like mult(a-b, m-n))
586 RVector mult(const RVector & a, const RVector & b,
587 const RVector & m, const RVector & n) const;
588
590 RVector mult(const RVector & a, const RVector & b) const;
591
592 Index rows() const { return rows_; }
593
594 Index cols() const { return cols_; }
595
596
597protected:
598 std::vector< RMatrix > mat_;
599 std::vector< IndexArray > _ids;
600 std::vector< Index > row_;
601
602 Index rows_;
603 Index cols_;
604};
605
606template < class ValueType > std::ostream & operator << (std::ostream & str,
608
609template < > DLLEXPORT std::ostream & operator << (std::ostream & str,
610 const ElementMatrix< double > & e);
611
612
613
614} // namespace GIMLI{
615
616#endif // _GIMLI_ELEMENTMATRIX__H
A abstract cell.
Definition meshentities.h:261
Definition elementmatrix.h:580
Definition elementmatrix.h:30
void fillIds(const MeshEntity &ent, Index nC=1)
Definition elementmatrix.cpp:1125
Vector< ValueType > col(Index i) const
Definition elementmatrix.h:102
ElementMatrix< ValueType > & gradU(const MeshEntity &ent, const RVector &w, const PosVector &x, Index nC, bool voigtNotation=false)
void setMat(const Matrix< ValueType > &m)
Definition elementmatrix.h:94
const Vector< ValueType > & row(Index i) const
Definition elementmatrix.h:100
const IndexArray & rowIDs() const
Definition elementmatrix.h:126
void setIds(const IndexArray &idsR, const IndexArray &idsC)
Definition elementmatrix.h:115
Matrix< ValueType > * pMat()
Definition elementmatrix.h:96
ElementMatrix< ValueType > & gradU2(const Cell &cell, ValueType c)
Definition elementmatrix.h:189
void getWeightsAndPoints(const MeshEntity &ent, const RVector *&w, const PosVector *&x, int order)
Definition elementmatrix.cpp:357
ElementMatrix< ValueType > & gradU2(const MeshEntity &ent, const Matrix< ValueType > &C, const RVector &w, const PosVector &x, bool voigtNotation=false)
const Index idx(Index i) const
Definition elementmatrix.h:130
const std::vector< Matrix< ValueType > > & matX() const
Definition elementmatrix.h:337
void fillGradientBase(const MeshEntity &ent, const RVector &w, const PosVector &x, Index nC, bool voigtNotation)
void setIds(const IndexArray &ids)
Definition elementmatrix.h:120
ElementMatrix< ValueType > & u2(const MeshEntity &ent)
ElementMatrix< ValueType > & u(const MeshEntity &ent)
const IndexArray & colIDs() const
Definition elementmatrix.h:128
const IndexArray & ids() const
Definition elementmatrix.h:124
ElementMatrix< ValueType > & grad(const MeshEntity &ent, Index order, bool elastic, bool sum, bool div, Index nCoeff, Index dof, Index dofOffset, bool kelvin=false)
ElementMatrix(Index dof=0)
Definition elementmatrix.h:34
const PosVector & x() const
Definition elementmatrix.h:345
ElementMatrix< ValueType > & grad(const MeshEntity &ent, Index order, bool elastic=false, bool sum=false, bool div=false, bool kelvin=false)
ValueType mult(const Vector< ValueType > &a, const Vector< ValueType > &b)
Definition elementmatrix.h:266
void integrate() const
const Matrix< ValueType > & gradientBase() const
Definition elementmatrix.h:154
void mult(const Vector< ValueType > &a, Vector< ValueType > &ret)
Definition elementmatrix.h:257
const MeshEntity & entity() const
Definition elementmatrix.h:342
ElementMatrix< ValueType > & gradU2(const Cell &cell, const Matrix< ValueType > &C, bool voigtNotation=false)
const Matrix< ValueType > & mat() const
Definition elementmatrix.h:98
const RVector & w() const
Definition elementmatrix.h:348
ElementMatrix< ValueType > & pot(const MeshEntity &ent, Index order, bool sum, Index nCoeff, Index dof, Index dofOffset)
Vector< ValueType > stress(const MeshEntity &ent, const Matrix< ValueType > &C, const RVector &u, bool voigtNotation=false)
ElementMatrix< ValueType > & gradU(const Cell &cell, Index nC, bool voigtNotation=false)
Val mult_(const Vector< Val > &a, const Vector< Val > &b, const Vector< Val > &m, const Vector< Val > &n)
Definition elementmatrix.h:280
ElementMatrix< ValueType > & pot(const MeshEntity &ent, Index order, bool sum=false)
Definition elementmatrix.h:555
Simple row-based dense matrix based on Vector.
Definition matrix.h:324
Definition meshentities.h:103
Definition mesh.h:128
3 dimensional vector
Definition pos.h:73
GIMLi main namespace for the Geophyiscal Inversion and Modelling Library.
Definition baseentity.h:24
RVector x(const R3Vector &rv)
Definition pos.cpp:107