OOFEM 3.0
Loading...
Searching...
No Matches
sadg.C
Go to the documentation of this file.
1/*
2 *
3 * ##### ##### ###### ###### ### ###
4 * ## ## ## ## ## ## ## ### ##
5 * ## ## ## ## #### #### ## # ##
6 * ## ## ## ## ## ## ## ##
7 * ## ## ## ## ## ## ## ##
8 * ##### ##### ## ###### ## ##
9 *
10 *
11 * OOFEM : Object Oriented Finite Element Code
12 *
13 * Copyright (C) 1993 - 2025 Borek Patzak
14 *
15 *
16 *
17 * Czech Technical University, Faculty of Civil Engineering,
18 * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19 *
20 * This library is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU Lesser General Public
22 * License as published by the Free Software Foundation; either
23 * version 2.1 of the License, or (at your option) any later version.
24 *
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28 * Lesser General Public License for more details.
29 *
30 * You should have received a copy of the GNU Lesser General Public
31 * License along with this library; if not, write to the Free Software
32 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33 */
34
35
36#include "mpm.h"
37#include "termlibrary4.h"
38#include "element.h"
39#include "gausspoint.h"
40#include "feinterpol.h"
41#include "intarray.h"
42#include "connectivitytable.h"
43#include "classfactory.h"
46#include "masterdof.h"
47#include "engngm.h"
48
49#include "fei2dlinelin.h"
50#include "fei2dtrlin.h"
51#include "fei3dhexalin.h"
52#include "fei3dquadlin.h"
53
54#include "mathfem.h"
55
56#include "material.h"
57#include "matstatus.h"
58
59#include "boundaryload.h"
60#include "bodyload.h"
62
63#include <vector>
64
65namespace oofem {
66
67
72class SADGElement : public MPElement {
73
74 protected:
75 virtual int giveNumberOfSDofs() const = 0;
76 virtual const Variable* getScalarVariable() const = 0;
77
78 protected:
79 std :: vector<ElementDofManager*> internalDofManagers;
80
81 public:
82 SADGElement(int n, Domain* d): MPElement(n,d) { }
83
84 void getDofManLocalCodeNumbers (IntArray& answer, const Variable::VariableQuantity q, int num ) const override {
85 answer={num};
86 }
87
88 void getInternalDofManLocalCodeNumbers (IntArray& answer, const Variable::VariableQuantity q, int num ) const override {
89 answer={};
90 }
91 // Note: performance can be probably improved once it will be possible
92 // to directly assemble multiple term contributions to the system matrix.
93 // template metaprogramming?
94 void giveCharacteristicMatrix(FloatMatrix &answer, CharType type, TimeStep *tStep) override {
96
97 if (type == MassMatrix) { // Mass matrix
98 int sdofs = this->giveNumberOfSDofs();
99 answer.resize(sdofs,sdofs);
100 answer.zero();
101 this->integrateTerm_dw (answer, NTN (getScalarVariable(),getScalarVariable()), ir, tStep) ;
102 } else if (type == StiffnessMatrix) {
103 int sdofs = this->giveNumberOfSDofs();
104 answer.resize(sdofs,sdofs);
105 answer.zero();
106 this->integrateTerm_dw (answer, dnTaN (getScalarVariable(),getScalarVariable(), this->giveDomain()->giveEngngModel()->giveField(FieldType::FT_Velocity, tStep)), ir, tStep) ;
107 answer.times(-1.0);
108 } else if (type == InternalFluxVector) {
109 answer.clear();
110 } else {
111 OOFEM_ERROR("Unknown characteristic matrix type");
112 }
113 }
114
115 void giveCharacteristicVector(FloatArray &answer, CharType type, ValueModeType mode, TimeStep *tStep) override {
116 OOFEM_ERROR("Unknown characteristic vector type");
117 }
118
119 void giveCharacteristicMatrixFromBC(FloatMatrix &answer, CharType type, TimeStep *tStep, GeneralBoundaryCondition *bc, int boundaryID) override {
120 answer.clear();
121 }
122
123
124 virtual void giveCharacteristicVectorFromBC(FloatArray &answer, CharType type, ValueModeType mode, TimeStep *tStep, GeneralBoundaryCondition *bc, int boundaryID) override {
125 answer.clear();
126 }
127
128 void computeBoundarySurfaceLoadVector(FloatArray &answer, BoundaryLoad *load, int boundary, CharType type, ValueModeType mode, TimeStep *tStep, bool global = true) override {
129 OOFEM_ERROR("Unsupported boundary condition type");
130 }
131
132 void computeBoundaryEdgeLoadVector(FloatArray &answer, BoundaryLoad *load, int boundary, CharType type, ValueModeType mode, TimeStep *tStep, bool global=true) override {
133 OOFEM_ERROR("Unsupported boundary condition type");
134 }
135
136 void computeLoadVector(FloatArray &answer, BodyLoad *load, CharType type, ValueModeType mode, TimeStep *tStep) override {
137 OOFEM_ERROR("Unsupported load type");
138 }
139
140
141 int computeFluxLBToLRotationMatrix(FloatMatrix &answer, int iSurf, const FloatArray& lc, const Variable::VariableQuantity q, char btype) override {
142 answer.clear();
143 return 0;
144 }
145};
146
148 protected:
165 public:
166 SADGBoundaryElement(int n, Domain* d): SADGElement(n,d) {}
167 /*
168 this->neighbors = neighbors;
169 this->boundaryIDs = boundaryIDs;
170
171 // attempt to determine matching internal node numbers
172 // assuming that i-th internal DofNMan is matching the i-th node
173 for (int i=1; i<=neighbors.giveSize(); i++) {
174 Element* neighbor = d->giveElement(neighbors.at(i));
175 IntArray bnodes;
176 if (i==1) {
177 bnodes = neighbor->giveInterpolation()->boundaryGiveNodes(boundaryIDs.at(i), neighbor->giveGeometryType()); // local numbers
178 internalNodeNumbers.push_back(bnodes);
179 } else { // need to find matching node numbers on opposite edge/surface
180 IntArray neighborNodes = neighbor->giveDofManArray();
181 // loop over nodes of first element and find matching node
182 for (int j=1; j<=internalNodeNumbers[0].giveSize(); j++) {
183 int node = d->giveElement(neighbors.at(1))->giveDofManagerNumber(internalNodeNumbers[0].at(j));
184 int indx;
185 if ((indx = neighborNodes.findFirstIndexOf(node))) {
186 bnodes.followedBy(indx);
187 continue;
188 }
189 OOFEM_ERROR("Matching node not found");
190 }
191 internalNodeNumbers.push_back(bnodes);
192 }
193 }
194 }
195 */
196 virtual int giveNumberOfSharedElements() const =0;
197
198 void giveCharacteristicMatrix(FloatMatrix &answer, CharType type, TimeStep *tStep) override {
199 if (type == InternalFluxVector) {
200
201 answer.resize(this->giveNumberOfDofManagers(), this->giveNumberOfDofManagers()); // scalar advection
202 answer.zero();
203
204 // code numbers
205 IntArray rows, cols;
206 // set up integration rule
208 for (int j=0;j<ir->giveNumberOfIntegrationPoints();j++) {
212 FloatArray normal, v, N;
215 // get velocity vector first
216 // @BP: todo -> connect external field
217 //this->domain->giveEngngModel()->giveField(FT_Velocity, tStep)->evaluateAt(v, gc, ValueModeType::VM_Total, tStep);
218 int nsd = this->giveInterpolation()->giveNsd(this->giveGeometryType());
219 v.resize(nsd);
220 //v.at(2) = 1.0;
221 this->giveDomain()->giveEngngModel()->giveField(FT_Velocity, tStep)->evaluateAt(v, gc, ValueModeType::VM_Total, tStep);
222 // v.at(1) = sqrt(0.5); v.at(2) = sqrt(0.5); // dummy velocity
223 // evaluate N^T (a\cdot n) N
224 FloatMatrix contrib;
225 contrib.beDyadicProductOf(N,N);
226 contrib.times(normal.dotProduct(v));
227 contrib.times(ir->getIntegrationPoint(j)->giveWeight()*this->giveInterpolation()->giveTransformationJacobian(lc, FEIElementGeometryWrapper(this)));
228 int nnodes = N.giveSize(); // number of nodes on boundary
229 rows.resize(nnodes);
230 cols.resize(nnodes);
231 // determine upwind boundary
232 if (normal.dotProduct(v) > 0) {
233 // upwind element is the first neighbor element
234 // set up code numbers for e1 boundary
235 for (int k=1;k<=nnodes;k++) {
236 rows.at(k)=k;
237 cols.at(k)=k;
238 }
239 answer.assemble(contrib, rows, cols);
240 // set up code numbers for e2 boundary, if exists
241 if (this->giveNumberOfSharedElements() > 1) {
242 for (int k=1;k<=nnodes;k++) {
243 rows.at(k)=k+nnodes;
244 cols.at(k)=k;
245 }
246 contrib.times(-1.0); // e2 normal = -e1 normal
247 answer.assemble(contrib, rows, cols);
248 }
249 } else {
250 // upwind element is the second neighbor element (if exist)
251 if (this->giveNumberOfSharedElements() > 1) {
252 // e1 contribution
253 for (int k=1;k<=nnodes;k++) {
254 rows.at(k)=k;
255 cols.at(k)=k+nnodes;
256 }
257 answer.assemble(contrib, rows, cols);
258 // e2 contribution
259 for (int k=1;k<=nnodes;k++) {
260 rows.at(k)=k+nnodes;
261 cols.at(k)=k+nnodes;
262 }
263 contrib.times(-1.0); // e2 normal = -e1 normal
264 answer.assemble(contrib, rows, cols);
265 }
266 }
267 }
268 } else if ((type == MassMatrix) || (type == StiffnessMatrix)) {
269 answer.clear(); //resize(this->giveNumberOfDofManagers(), this->giveNumberOfDofManagers()); // scalar advection
270 } else {
271 OOFEM_ERROR("Unknown characteristic matrix type");
272 }
273 }
274
275 void giveCharacteristicVector(FloatArray &answer, CharType type, ValueModeType mode, TimeStep *tStep) override {
276 OOFEM_ERROR("Unknown characteristic vector type");
277 }
278
279 void giveCharacteristicMatrixFromBC(FloatMatrix &answer, CharType type, TimeStep *tStep, GeneralBoundaryCondition *bc, int boundaryID) override {
280 answer.clear();
281 }
282};
283
289 protected:
290 //FEI3dTetLin pInterpol;
291 //FEI3dTetQuad uInterpol;
292 const static FEI2dLineLin interpol;
294
295
296 public:
297 SADGBLine1(int n, Domain* d):
298 SADGBoundaryElement(n,d) {
299 this->numberOfGaussPoints = 2;
300 }
301
302 void initializeFrom(InputRecord &ir, int priority) override {
304 this->numberOfDofMans = this->dofManArray.giveSize();
305 if (!((numberOfDofMans == 2) || (numberOfDofMans == 4))) {
306 OOFEM_ERROR("Invalid number of dofs");
307 }
308
309 this->computeGaussPoints();
310 }
311
312
313 void giveDofManDofIDMask(int inode, IntArray &answer) const override {
314 int dofid = this->scalarVariable.getDofManDofIDs().at(1);
315 answer = {dofid};
316 }
317 int giveNumberOfDofs() override { return numberOfDofMans; }
318 const char *giveInputRecordName() const override {return "sadgbline1";}
319 const char *giveClassName() const override { return "SADGBLine1"; }
320
321
322 const FEInterpolation* getGeometryInterpolation() const override {return &this->interpol;}
323
325 return EGT_line_1;
326 }
327 int getNumberOfSurfaceDOFs() const override {return 0;}
328 int getNumberOfEdgeDOFs() const override {return 0;}
329 void getSurfaceLocalCodeNumbers(IntArray& answer, const Variable::VariableQuantity q) const override {
330 answer={};
331 }
332 void getEdgeLocalCodeNumbers(IntArray& answer, const Variable::VariableQuantity q) const override {}
334 return NULL;
335 }
336 int giveNumberOfSDofs() const override {return 4;}
337 int giveNumberOfSharedElements() const override {return this->numberOfDofMans/2;}
338
339
340
341private:
342 virtual const Variable* getScalarVariable() const override {return &scalarVariable;}
343 void computeGaussPoints() override {
344 if ( integrationRulesArray.size() == 0 ) {
345 integrationRulesArray.resize( 1 );
346 integrationRulesArray [ 0 ] = std::make_unique<GaussIntegrationRule>(1, this);
347 integrationRulesArray [ 0 ]->SetUpPointsOnLine(numberOfGaussPoints, _Unknown);
348 }
349 }
350};
351
352const FEI2dLineLin SADGBLine1::interpol = FEI2dLineLin(1,2);
353const Variable SADGBLine1::scalarVariable(&SADGBLine1::interpol, Variable::VariableQuantity::VolumeFraction, Variable::VariableType::scalar, 1, NULL, {DofIDItem::C_1});
354
355#define _IFT_SADGBLine1_Name "sadgbline1"
357
358
359
363class SADGTriangle1 : public SADGElement {
364 protected:
365 //FEI3dTetLin pInterpol;
366 //FEI3dTetQuad uInterpol;
367 const static FEI2dTrLin scalarInterpol;
368 const static Variable scalarVariable;
369
370 public:
371 SADGTriangle1(int n, Domain* d):
372 SADGElement(n,d)
373 {
374 numberOfDofMans = 3;
375 numberOfGaussPoints = 4;
376 this->computeGaussPoints();
377 /*
378 // set up internal dof managers
379 // regular nodes just define element geometry
380 // internal dof managers are used to store dofs (Discontinuous Galerkin)
381 for (int i=0; i<3; i++) {
382 ElementDofManager* edm = new ElementDofManager(i, d, this);
383 edm->appendDof(new MasterDof(edm, (DofIDItem)scalarVariable.getDofManDofIDs().at(0)));
384 internalDofManagers.push_back(edm);
385 }
386 */
387 }
388
389 //int giveNumberOfInternalDofManagers() const override {return 3;}
390
391
392 void giveDofManDofIDMask(int inode, IntArray &answer) const override {
393 int dofid = this->scalarVariable.getDofManDofIDs().at(1);
394 answer = {dofid};
395 }
396 int giveNumberOfDofs() override { return 3; }
397 const char *giveInputRecordName() const override {return "sadgtriangle1";}
398 const char *giveClassName() const override { return "SADGTriangle1"; }
399
400
401 const FEInterpolation* getGeometryInterpolation() const override {return &this->scalarInterpol;}
402
403 Element_Geometry_Type giveGeometryType() const override {
404 return EGT_triangle_1;
405 }
406 int getNumberOfSurfaceDOFs() const override {return 0;}
407 int getNumberOfEdgeDOFs() const override {return 2;}
408 void getSurfaceLocalCodeNumbers(IntArray& answer, const Variable::VariableQuantity q) const override {
409 answer={};
410 }
411 void getEdgeLocalCodeNumbers(IntArray& answer, const Variable::VariableQuantity q) const override {}
412 Interface *giveInterface(InterfaceType it) override {
413 return NULL;
414 }
415
416private:
417 virtual int giveNumberOfSDofs() const override {return 3;}
418 virtual const Variable* getScalarVariable() const override {return &scalarVariable;}
419 void computeGaussPoints() override {
420 if ( integrationRulesArray.size() == 0 ) {
421 integrationRulesArray.resize( 1 );
422 integrationRulesArray [ 0 ] = std::make_unique<GaussIntegrationRule>(1, this);
423 integrationRulesArray [ 0 ]->SetUpPointsOnTriangle(numberOfGaussPoints, _Unknown);
424 }
425 }
426};
427
428const FEI2dTrLin SADGTriangle1::scalarInterpol = FEI2dTrLin(1,2);
429const Variable SADGTriangle1::scalarVariable(&SADGTriangle1::scalarInterpol, Variable::VariableQuantity::VolumeFraction, Variable::VariableType::scalar, 1, NULL, {DofIDItem::C_1});
430
431#define _IFT_SADGTriangle1_Name "sadgtria1"
432REGISTER_Element(SADGTriangle1)
433
434
438class SADGBrick1 : public SADGElement {
439 protected:
440 //FEI3dTetLin pInterpol;
441 //FEI3dTetQuad uInterpol;
442 const static FEI3dHexaLin scalarInterpol;
443 const static Variable scalarVariable;
444
445 public:
446 SADGBrick1(int n, Domain* d):
447 SADGElement(n,d)
448 {
449 numberOfDofMans = 8;
450 numberOfGaussPoints = 8;
451 this->computeGaussPoints();
452 /*
453 // set up internal dof managers
454 // regular nodes just define element geometry
455 // internal dof managers are used to store dofs (Discontinuous Galerkin)
456 for (int i=0; i<3; i++) {
457 ElementDofManager* edm = new ElementDofManager(i, d, this);
458 edm->appendDof(new MasterDof(edm, (DofIDItem)scalarVariable.getDofManDofIDs().at(0)));
459 internalDofManagers.push_back(edm);
460 }
461 */
462 }
463
464 //int giveNumberOfInternalDofManagers() const override {return 3;}
465
466 void giveDofManDofIDMask(int inode, IntArray &answer) const override {
467 int dofid = this->scalarVariable.getDofManDofIDs().at(1);
468 answer = {dofid};
469 }
470 int giveNumberOfDofs() override { return 8; }
471 const char *giveInputRecordName() const override {return "sadgbrick1";}
472 const char *giveClassName() const override { return "SADGBrick1"; }
473
474
475 const FEInterpolation* getGeometryInterpolation() const override {return &this->scalarInterpol;}
476
477 Element_Geometry_Type giveGeometryType() const override {
478 return EGT_hexa_1;
479 }
480 int getNumberOfSurfaceDOFs() const override {return 4;}
481 int getNumberOfEdgeDOFs() const override {return 2;}
482 void getSurfaceLocalCodeNumbers(IntArray& answer, const Variable::VariableQuantity q) const override {
483 answer={};
484 }
485 void getEdgeLocalCodeNumbers(IntArray& answer, const Variable::VariableQuantity q) const override {}
486 Interface *giveInterface(InterfaceType it) override {
487 return NULL;
488 }
489
490private:
491 virtual int giveNumberOfSDofs() const override {return 8;}
492 virtual const Variable* getScalarVariable() const override {return &scalarVariable;}
493 void computeGaussPoints() override {
494 if ( integrationRulesArray.size() == 0 ) {
495 integrationRulesArray.resize( 1 );
496 integrationRulesArray [ 0 ] = std::make_unique<GaussIntegrationRule>(1, this);
497 integrationRulesArray [ 0 ]->SetUpPointsOnCube(numberOfGaussPoints, _Unknown);
498 }
499 }
500};
501
502const FEI3dHexaLin SADGBrick1::scalarInterpol = FEI3dHexaLin();
503const Variable SADGBrick1::scalarVariable(&SADGBrick1::scalarInterpol, Variable::VariableQuantity::VolumeFraction, Variable::VariableType::scalar, 1, NULL, {DofIDItem::C_1});
504
505#define _IFT_SADGBrick1_Name "sadgbrick1"
507
508class SADGBQuad1 : public SADGBoundaryElement {
509 protected:
510 //FEI3dTetLin pInterpol;
511 //FEI3dTetQuad uInterpol;
512 const static FEI3dQuadLin interpol;
513 const static Variable scalarVariable;
514
515
516 public:
517 SADGBQuad1(int n, Domain* d):
519 this->numberOfGaussPoints = 8;
520 }
521
522 void initializeFrom(InputRecord &ir, int priority) override {
524 this->numberOfDofMans = this->dofManArray.giveSize();
525 if (!((numberOfDofMans == 4) || (numberOfDofMans == 8))) {
526 OOFEM_ERROR("Invalid number of dofs");
527 }
528 this->computeGaussPoints();
529 }
530
531
532 void giveDofManDofIDMask(int inode, IntArray &answer) const override {
533 int dofid = this->scalarVariable.getDofManDofIDs().at(1);
534 answer = {dofid};
535 }
536 int giveNumberOfDofs() override { return numberOfDofMans; }
537 const char *giveInputRecordName() const override {return "sadgbquad1";}
538 const char *giveClassName() const override { return "SADGBQuad1"; }
539
540
541 const FEInterpolation* getGeometryInterpolation() const override {return &this->interpol;}
542
543 Element_Geometry_Type giveGeometryType() const override {
544 return EGT_quad_1;
545 }
546 int getNumberOfSurfaceDOFs() const override {return 0;}
547 int getNumberOfEdgeDOFs() const override {return 0;}
548 void getSurfaceLocalCodeNumbers(IntArray& answer, const Variable::VariableQuantity q) const override {
549 answer={};
550 }
551 void getEdgeLocalCodeNumbers(IntArray& answer, const Variable::VariableQuantity q) const override {}
552 Interface *giveInterface(InterfaceType it) override {
553 return NULL;
554 }
555 int giveNumberOfSDofs() const override {return 8;}
556 int giveNumberOfSharedElements() const override {return this->numberOfDofMans/4;}
557
558
559
560private:
561 virtual const Variable* getScalarVariable() const override {return &scalarVariable;}
562 void computeGaussPoints() override {
563 if ( integrationRulesArray.size() == 0 ) {
564 integrationRulesArray.resize( 1 );
565 integrationRulesArray [ 0 ] = std::make_unique<GaussIntegrationRule>(1, this);
566 integrationRulesArray [ 0 ]->SetUpPointsOnSquare(numberOfGaussPoints, _Unknown);
567 }
568 }
569};
570
571const FEI3dQuadLin SADGBQuad1::interpol = FEI3dQuadLin();
572const Variable SADGBQuad1::scalarVariable(&SADGBQuad1::interpol, Variable::VariableQuantity::VolumeFraction, Variable::VariableType::scalar, 1, NULL, {DofIDItem::C_1});
573
574#define _IFT_SADGBQuad1_Name "sadgbquad1"
575REGISTER_Element(SADGBQuad1)
576
577
578
579} // end namespace oofem
#define N(a, b)
#define REGISTER_Element(class)
EngngModel * giveEngngModel()
Definition domain.C:419
IntArray dofManArray
Array containing dofmanager numbers.
Definition element.h:138
void initializeFrom(InputRecord &ir, int priority) override
Definition element.C:687
int numberOfDofMans
Number of dofmanagers.
Definition element.h:136
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
Definition element.h:157
int numberOfGaussPoints
Definition element.h:175
virtual int giveNumberOfDofManagers() const
Definition element.h:695
virtual IntegrationRule * giveDefaultIntegrationRulePtr()
Definition element.h:886
virtual Element_Geometry_Type giveGeometryType() const =0
virtual FieldPtr giveField(FieldType key, TimeStep *)
Definition engngm.h:545
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
virtual double boundaryEvalNormal(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
virtual int giveNsd(const Element_Geometry_Type) const =0
virtual void local2global(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
Domain * giveDomain() const
Definition femcmpnn.h:97
void resize(Index s)
Definition floatarray.C:94
double dotProduct(const FloatArray &x) const
Definition floatarray.C:524
void times(double f)
void resize(Index rows, Index cols)
Definition floatmatrix.C:79
*Sets size of receiver to be an empty matrix It will have zero rows and zero columns size void clear()
void zero()
Zeroes all coefficient of receiver.
void beDyadicProductOf(const FloatArray &vec1, const FloatArray &vec2)
void assemble(const FloatMatrix &src, const IntArray &loc)
const FloatArray & giveNaturalCoordinates() const
Returns coordinate array of receiver.
Definition gausspoint.h:138
double giveWeight()
Returns integration weight of receiver.
Definition gausspoint.h:180
void resize(int n)
Definition intarray.C:73
int & at(std::size_t i)
Definition intarray.h:104
int giveNumberOfIntegrationPoints() const
GaussPoint * getIntegrationPoint(int n)
FEInterpolation * giveInterpolation() const override
Definition mpm.h:500
MPElement(int n, Domain *aDomain)
Definition mpm.h:285
void integrateTerm_dw(FloatMatrix &answer, const Term &term, IntegrationRule *iRule, TimeStep *tstep)
Definition mpm.h:293
Advection problem mass matrix $S=(N)^T N$.
1D Line linear Element for Discontinuous Galerkin scalar advection
Definition sadg.C:288
const char * giveInputRecordName() const override
Definition sadg.C:318
void initializeFrom(InputRecord &ir, int priority) override
Definition sadg.C:302
void getEdgeLocalCodeNumbers(IntArray &answer, const Variable::VariableQuantity q) const override
Definition sadg.C:332
int getNumberOfEdgeDOFs() const override
Definition sadg.C:328
void giveDofManDofIDMask(int inode, IntArray &answer) const override
Definition sadg.C:313
static const Variable scalarVariable
Definition sadg.C:293
virtual const Variable * getScalarVariable() const override
Definition sadg.C:342
SADGBLine1(int n, Domain *d)
Definition sadg.C:297
int giveNumberOfDofs() override
Definition sadg.C:317
static const FEI2dLineLin interpol
Definition sadg.C:292
int getNumberOfSurfaceDOFs() const override
Definition sadg.C:327
int giveNumberOfSharedElements() const override
Definition sadg.C:337
Element_Geometry_Type giveGeometryType() const override
Definition sadg.C:324
void getSurfaceLocalCodeNumbers(IntArray &answer, const Variable::VariableQuantity q) const override
Definition sadg.C:329
const char * giveClassName() const override
Definition sadg.C:319
void computeGaussPoints() override
Definition sadg.C:343
Interface * giveInterface(InterfaceType it) override
Definition sadg.C:333
int giveNumberOfSDofs() const override
Definition sadg.C:336
const FEInterpolation * getGeometryInterpolation() const override
Definition sadg.C:322
void giveCharacteristicMatrixFromBC(FloatMatrix &answer, CharType type, TimeStep *tStep, GeneralBoundaryCondition *bc, int boundaryID) override
Definition sadg.C:279
virtual int giveNumberOfSharedElements() const =0
void giveCharacteristicVector(FloatArray &answer, CharType type, ValueModeType mode, TimeStep *tStep) override
Definition sadg.C:275
void giveCharacteristicMatrix(FloatMatrix &answer, CharType type, TimeStep *tStep) override
Definition sadg.C:198
Base class for Discontinuous Galerkin scalar advection elements.
Definition sadg.C:72
virtual int giveNumberOfSDofs() const =0
SADGElement(int n, Domain *d)
Definition sadg.C:82
void computeBoundaryEdgeLoadVector(FloatArray &answer, BoundaryLoad *load, int boundary, CharType type, ValueModeType mode, TimeStep *tStep, bool global=true) override
Definition sadg.C:132
void giveCharacteristicVector(FloatArray &answer, CharType type, ValueModeType mode, TimeStep *tStep) override
Definition sadg.C:115
virtual const Variable * getScalarVariable() const =0
int computeFluxLBToLRotationMatrix(FloatMatrix &answer, int iSurf, const FloatArray &lc, const Variable::VariableQuantity q, char btype) override
Definition sadg.C:141
std ::vector< ElementDofManager * > internalDofManagers
Definition sadg.C:79
void getDofManLocalCodeNumbers(IntArray &answer, const Variable::VariableQuantity q, int num) const override
Definition sadg.C:84
void giveCharacteristicMatrixFromBC(FloatMatrix &answer, CharType type, TimeStep *tStep, GeneralBoundaryCondition *bc, int boundaryID) override
Definition sadg.C:119
virtual void giveCharacteristicVectorFromBC(FloatArray &answer, CharType type, ValueModeType mode, TimeStep *tStep, GeneralBoundaryCondition *bc, int boundaryID) override
Definition sadg.C:124
void getInternalDofManLocalCodeNumbers(IntArray &answer, const Variable::VariableQuantity q, int num) const override
Definition sadg.C:88
void computeLoadVector(FloatArray &answer, BodyLoad *load, CharType type, ValueModeType mode, TimeStep *tStep) override
Definition sadg.C:136
void computeBoundarySurfaceLoadVector(FloatArray &answer, BoundaryLoad *load, int boundary, CharType type, ValueModeType mode, TimeStep *tStep, bool global=true) override
Definition sadg.C:128
void giveCharacteristicMatrix(FloatMatrix &answer, CharType type, TimeStep *tStep) override
Definition sadg.C:94
oofem::VariableQuantity VariableQuantity
Definition mpm.h:92
const IntArray & getDofManDofIDs() const
Returns DodIF mask in node; need generalization (which dofMan).
Definition mpm.h:121
A advection equation term $T=(\grad N)^T N$.
#define OOFEM_ERROR(...)
Definition error.h:79
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011