OOFEM 3.0
Loading...
Searching...
No Matches
mpm.h
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#ifndef mpm_h
35#define mpm_h
36
40 * - ElementBase(Element) defining geometry
41 * - Variable class representing unknown field (or test feld) in a weak psolution. The variable has its interpolation, type (scalar, vector), size.
42 When test field, it keeps reference to its primary (unknown) variable. The history parameter dermines how many time steps to remember.
43 * - Term class represnting a term to evaluate on element. Paramaters element(geometry), variables
44 * - Element - responsible for defining and performing integration (of terms), assembly of term contributions.
45 */
46
47#include "element.h"
48#include "dofmanager.h"
49#include "gausspoint.h"
50#include "feinterpol.h"
51#include "intarray.h"
52#include "masterdof.h"
53#include "integrationrule.h"
55#include "classfactory.h"
56#include "enum.h"
57
58
59namespace oofem {
60
61class MPElement;
62class EngngModel;
63
64/*
65 * Note: someone should be able to return for given cell and variable vector of unknowns.
66 * this depends on interpolation (constant, linear, etc), cell type and variable (defined the physical meaning of unknown(s))
67 * Interpolation should identify (or even introduce) cell nodes needed (quadratic element, linear interpolation), variable should assign to these nodes DOFs.
68 * interpolation.getCellNodes(cell)
69 */
70
77
78#define ENUM_TYPE VariableType
79#define ENUM_DEF ENUM_ITEM(scalar) ENUM_ITEM(vector)
80#define ENUM_CLASS
81#include "enum-impl.h"
82
83#define ENUM_TYPE VariableQuantity
84#define ENUM_DEF ENUM_ITEM(Displacement) ENUM_ITEM(Velocity) ENUM_ITEM(Temperature) ENUM_ITEM(Pressure) ENUM_ITEM(VolumeFraction)
85#define ENUM_CLASS
86#include "enum-impl.h"
87
88
89class Variable {
90 public:
91 typedef oofem::VariableType VariableType;
92 typedef oofem::VariableQuantity VariableQuantity;
93
95 Variable* dualVar; //? or just bool?
98 int size;
100
101 Variable () : interpolation(nullptr), dualVar(NULL), type(VariableType::scalar), q(VariableQuantity::Displacement), size(0) {}
102 Variable (const FEInterpolation* i, Variable::VariableQuantity q, Variable::VariableType t, int size, Variable* dual = NULL, std :: initializer_list< int > dofIDs={}) :
103 interpolation(i),
104 dualVar(dual),
105 q(q),
106 dofIDs(dofIDs) {
107 this->type = t;
108 this->size = size;
109 }
111 interpolation(i),
112 dualVar(dual),
113 q(q),
114 dofIDs(dofIDs) {
115 this->type = t;
116 this->size = size;
117 }
118
119
121 const IntArray& getDofManDofIDs () const {return this->dofIDs;}
122
123 void initializeFrom(InputRecord &ir); // enable instantiation from input record
124};
125
126
134class Term {
135 public:
138 MaterialMode mode;
139
140 public:
141 Term () : field(nullptr), testField(nullptr), mode(MaterialMode::_Unknown) {}
142 Term (const Variable* testField, const Variable* unknownField, MaterialMode m=MaterialMode::_Unknown) : field(unknownField), testField(testField) {mode=m;}
143
144 // evaluate linearized term contribution to weak form on given cell at given point
145 virtual void evaluate_lin (FloatMatrix& , MPElement& cell, GaussPoint* gp, TimeStep* tStep) const =0;
146 // evaluate contribution (all vars known) on given cell
147 virtual void evaluate (FloatArray&, MPElement& cell, GaussPoint* gp, TimeStep* tStep) const =0;
148 virtual void getDimensions(Element& cell) const =0;
149 virtual void initializeCell(Element& cell) const =0;
150 virtual IntegrationRule* giveElementIntegrationRule(Element* e) const {return NULL;};
151
152 virtual void initializeFrom(InputRecord &ir, EngngModel* problem); // enable instantiation from input record
153
154};
155
156
162 class MPMSymbolicTerm : public Term {
163 protected:
164 int nip=0; // assumed order of interpolation for the term
165 public:
167 MPMSymbolicTerm (const Variable *testField, const Variable* unknownField, MaterialMode m) : Term(testField, unknownField, m) {};
168 void initializeFrom(InputRecord &ir, EngngModel* problem) override {
169 Term::initializeFrom(ir, problem);
170 IR_GIVE_OPTIONAL_FIELD(ir, nip, "nip");
171 }
172 void initializeCell(Element& cell) const override {
173 // initialize cell for interpolation use
174 // @TODO: prevent multiple initialization for same interpolation
175 this->field->interpolation->initializeCell(&cell);
176 this->testField->interpolation->initializeCell(&cell);
177
178 // allocate necessary DOFs
179 IntArray enodes, einteranlnodes, dofIDs;
180 // process term field
181 dofIDs = this->field->getDofManDofIDs();
182 this->field->interpolation->giveCellDofMans(enodes, einteranlnodes, &cell);
183 for (auto i: enodes) {
184 DofManager* dman = cell.giveDofManager(i);
185 for (auto d: dofIDs) {
186 if (!dman->hasDofID((DofIDItem) d)) {
187 // create a DOF
188 MasterDof* dof = new MasterDof(dman, (DofIDItem)d);
189 dman->appendDof(dof);
190 }
191 }
192 }
193 for (auto i: einteranlnodes) {
194 DofManager* dman = cell.giveInternalDofManager(i);
195 for (auto d: dofIDs) {
196 if (!dman->hasDofID((DofIDItem) d)) {
197 // create a DOF
198 MasterDof* dof = new MasterDof(dman, (DofIDItem)d);
199 dman->appendDof(dof);
200 }
201 }
202 }
203 // process testField
204 dofIDs = this->testField->getDofManDofIDs();
205 this->testField->interpolation->giveCellDofMans(enodes, einteranlnodes, &cell);
206 for (auto i: enodes) {
207 DofManager* dman = cell.giveDofManager(i);
208 for (auto d: dofIDs) {
209 if (!dman->hasDofID((DofIDItem)d)) {
210 // create a DOF
211 MasterDof* dof = new MasterDof(dman, (DofIDItem)d);
212 dman->appendDof(dof);
213 }
214 }
215 }
216 for (auto i: einteranlnodes) {
217 DofManager* dman = cell.giveInternalDofManager(i);
218 for (auto d: dofIDs) {
219 if (!dman->hasDofID((DofIDItem)d)) {
220 // create a DOF
221 MasterDof* dof = new MasterDof(dman, (DofIDItem)d);
222 dman->appendDof(dof);
223 }
224 }
225 }
226 // set up the integration rule on cell
227 // get required number of IPs
228 int myorder = this->field->interpolation->giveInterpolationOrder() * this->testField->interpolation->giveInterpolationOrder();
229 GaussIntegrationRule ir(0, &cell);
231 if (this->nip>0) {
232 nip = this->nip;
233 }
234 // create nd insert it toelement if not exist yet.
235 std::vector< std :: unique_ptr< IntegrationRule > > &irvec = cell.giveIntegrationRulesArray();
236 bool found = false;
237 int size = irvec.size();
238 for (int i = 0; i< size; i++) {
239 if (irvec[i].get()->giveNumberOfIntegrationPoints() == nip) {
240 found = true;
241 break;
242 }
243 }
244 if (!found) {
245 // need to insert right one
246 irvec.resize( size +1);
247 irvec [ size] = std::make_unique<GaussIntegrationRule>(size, &cell);
248 //irvec [ size ]->SetUpPointsOnSquare(nip, this->mode);
249 irvec[size]->setUpIntegrationPoints(cell.giveIntegrationDomain(), nip, this->mode);
250 OOFEM_LOG_INFO("Integration rule with %d nip created for cell %d\n",nip,cell.giveNumber());
251 }
252 }
254 int myorder = this->field->interpolation->giveInterpolationOrder() * this->testField->interpolation->giveInterpolationOrder();
255 GaussIntegrationRule ir(0, e);
257 if (this->nip>0) {
258 nip = this->nip;
259 }
260 std::vector< std :: unique_ptr< IntegrationRule > > &irvec = e->giveIntegrationRulesArray();
261 int size = irvec.size();
262 for (int i = 0; i< size; i++) {
263 if (irvec[i].get()->giveNumberOfIntegrationPoints() == nip) {
264 return irvec[i].get();
265 }
266 }
267 return NULL;
268 }
269 };
270
277
282class MPElement : public Element {
283 public:
284
285 MPElement (int n, Domain * aDomain) :
286 Element(n, aDomain)
287 {}
288
289 void initialize () {
290 // loop over variables and allocate nodal dofs (for unknownFields)
291 }
292
293 void integrateTerm_dw (FloatMatrix& answer, const Term& term, IntegrationRule* iRule, TimeStep* tstep) {
294 // need for integration domain and rule.
295 // who should determine integration domain? Element or term? Term is just integrand, not integral
296 // so integral type (surface, volume, etc) defined by element ---
297 FloatMatrix dw;
298 for ( GaussPoint *igp : * iRule ) {
299 term.evaluate_lin(dw, *this, igp, tstep);
300 dw.times(this->computeVolumeAround(igp));
301 answer.add(dw);
302 }
303 }
304
305 void integrateTerm_c (FloatArray& answer, const Term& term, IntegrationRule* iRule, TimeStep* tstep) {
306 // need for integration domain and rule.
307 // who should determine integration domain? Element or term? Term is just integrand, not integral
308 // so integral type (surface, volume, etc) defined by element ---
309 FloatArray dw;
310 for ( GaussPoint *igp : * iRule ) {
311 term.evaluate(dw, *this, igp, tstep);
312 dw.times(this->computeVolumeAround(igp));
313 answer.add(dw);
314 }
315 }
316
317 void integrateSurfaceTerm_dw (FloatMatrix& answer, const Term& term, IntegrationRule* iRule, int isurf, TimeStep* tstep) {
318 // need for integration domain and rule.
319 // who should determine integration domain? Element or term? Term is just integrand, not integral
320 // so integral type (surface, volume, etc) defined by element ---
321 FloatMatrix dw;
322 for ( GaussPoint *igp : * iRule ) {
323 term.evaluate_lin(dw, *this, igp, tstep);
324 dw.times(this->computeSurfaceVolumeAround(igp, isurf));
325 answer.add(dw);
326 }
327 }
328
329 void integrateSurfaceTerm_c (FloatArray& answer, const Term& term, IntegrationRule* iRule, int isurf, TimeStep* tstep) {
330 // need for integration domain and rule.
331 // who should determine integration domain? Element or term? Term is just integrand, not integral
332 // so integral type (surface, volume, etc) defined by element ---
333 FloatArray dw;
334 for ( GaussPoint *igp : * iRule ) {
335 term.evaluate(dw, *this, igp, tstep);
336 dw.times(this->computeSurfaceVolumeAround(igp,isurf));
337 answer.add(dw);
338 }
339 }
340
341 void integrateEdgeTerm_dw (FloatMatrix& answer, const Term& term, IntegrationRule* iRule, int iedge, TimeStep* tstep) {
342 // need for integration domain and rule.
343 // who should determine integration domain? Element or term? Term is just integrand, not integral
344 // so integral type (surface, volume, etc) defined by element ---
345 FloatMatrix dw;
346 for ( GaussPoint *igp : * iRule ) {
347 term.evaluate_lin(dw, *this, igp, tstep);
348 dw.times(this->computeEdgeVolumeAround(igp, iedge));
349 answer.add(dw);
350 }
351 }
352
353 void integrateEdgeTerm_c (FloatArray& answer, const Term& term, IntegrationRule* iRule, int iedge, TimeStep* tstep) {
354 // need for integration domain and rule.
355 // who should determine integration domain? Element or term? Term is just integrand, not integral
356 // so integral type (surface, volume, etc) defined by element ---
357 FloatArray dw;
358 for ( GaussPoint *igp : * iRule ) {
359 term.evaluate(dw, *this, igp, tstep);
360 dw.times(this->computeEdgeVolumeAround(igp, iedge));
361 answer.add(dw);
362 }
363 }
364
373 virtual void getDofManLocalCodeNumbers(IntArray& answer, const Variable::VariableQuantity q, int n) const = 0;
374 virtual void getInternalDofManLocalCodeNumbers(IntArray& answer, const Variable::VariableQuantity q, int n) const = 0;
375 virtual void getLocalCodeNumbers (IntArray& answer, const Variable::VariableQuantity q ) const {
376 IntArray dl;
377 answer.resize(0);
378
379 for (int i=1; i<= this->giveNumberOfDofManagers(); i++) {
380 this->getDofManLocalCodeNumbers(dl, q, i);
381 answer.followedBy(dl);
382 }
383 for (int i=1; i<= this->giveNumberOfInternalDofManagers(); i++) {
384 this->getInternalDofManLocalCodeNumbers(dl, q, i);
385 answer.followedBy(dl);
386 }
387
388 }
389 virtual int getNumberOfSurfaceDOFs() const =0;
390 virtual int getNumberOfEdgeDOFs() const =0;
391
392
396 virtual void getSurfaceLocalCodeNumbers (IntArray& answer, const Variable::VariableQuantity q) const =0;
397 virtual void getEdgeLocalCodeNumbers (IntArray& answer, const Variable::VariableQuantity q) const =0;
403 virtual void getSurfaceElementCodeNumbers (IntArray& answer, const Variable::VariableQuantity q, int isurf ) const {
405 answer.resize(0);
406 for (int i : sn) {
407 this->getDofManLocalCodeNumbers(dl, q, i);
408 answer.followedBy(dl);
409 }
410 }
411 virtual void getEdgeElementCodeNumbers (IntArray& answer, const Variable::VariableQuantity q, int isurf ) const {
413 answer.resize(0);
414 for (int i : sn) {
415 this->getDofManLocalCodeNumbers(dl, q, i);
416 answer.followedBy(dl);
417 }
418 }
419
425 virtual void getBoundaryUnknownVector(FloatArray& answer, const Variable* field, ValueModeType mode, int ibc, char bt, TimeStep* tStep) {
426 FloatArray uloc;
427 IntArray bNodes, dofs=field->getDofManDofIDs();
428 answer.clear();
429 if (bt == 's') {
430 bNodes = this->giveBoundarySurfaceNodes(ibc);
431 } else {
432 bNodes = this->giveBoundaryEdgeNodes(ibc);
433 }
434 std::list<double> ans;
435 for (int i : bNodes) {
436 this->giveDofManager(i)->giveUnknownVector(uloc, dofs, mode, tStep);
437 for(const double& u: uloc){ ans.push_back(u); }
438 }
439 answer=FloatArray::fromList(ans);
440 }
441
446 void assembleTermContribution (FloatMatrix& answer, FloatMatrix& contrib, const Term& t) {
447 IntArray uloc, tloc;
448 this->getLocalCodeNumbers(uloc, t.field->q);
449 this->getLocalCodeNumbers(tloc, t.testField->q);
450 answer.assemble(contrib, tloc, uloc);
451 }
452
453 void assembleTermContributionT (FloatMatrix& answer, FloatMatrix& contrib, const Term& t) {
454 IntArray uloc, tloc;
455 this->getLocalCodeNumbers(uloc, t.field->q);
456 this->getLocalCodeNumbers(tloc, t.testField->q);
457 answer.assembleT(contrib, tloc, uloc);
458 }
459
460 void assembleTermContribution (FloatArray& answer, FloatArray& contrib, const Term& t) {
461 IntArray loc;
462 this->getLocalCodeNumbers(loc, t.testField->q);
463 answer.assemble(contrib, loc);
464 }
465
473 virtual const void getUnknownVector(FloatArray& answer, const Variable* field, ValueModeType mode, TimeStep* tstep) {
474 IntArray nodes, internalNodes, dofs;
475 field->interpolation->giveCellDofMans(nodes, internalNodes, this);
476 std::vector<double> ans;
477 for (int i : nodes) {
478 dofs=field->getDofManDofIDs();
479 FloatArray uloc;
480 this->giveDofManager(i)->giveUnknownVector(uloc, dofs, mode, tstep);
481 ans.insert(ans.end(),uloc.begin(),uloc.end());
482 }
483 for (int i : internalNodes) {
484 dofs=field->getDofManDofIDs();
485 FloatArray uloc;
486 this->giveInternalDofManager(i)->giveUnknownVector(uloc, dofs, mode, tstep);
487 ans.insert(ans.end(),uloc.begin(),uloc.end());
488 }
489 answer = FloatArray::fromVector(ans);
490 }
491
498
499 //const FEInterpolation& getGeometryInterpolation () const override = 0;
500 FEInterpolation *giveInterpolation() const override { return const_cast<FEInterpolation*>( this->getGeometryInterpolation()); }
501
514 virtual int computeFluxLBToLRotationMatrix(FloatMatrix &answer, int iSurf, const FloatArray& lc, const Variable::VariableQuantity q, char btype) {
515 answer.clear();
516 return 0;
517 }
518 IntArray giveBoundarySurfaceNodes(int boundary, bool includeHierarchical=false) const override {
519 return this->getGeometryInterpolation()->boundarySurfaceGiveNodes(boundary, this->giveGeometryType(), includeHierarchical);
520 }
521 IntArray giveBoundaryEdgeNodes(int boundary, bool includeHierarchical=false) const override {
522 return this->getGeometryInterpolation()->boundaryEdgeGiveNodes(boundary, this->giveGeometryType(), includeHierarchical);
523 }
524 virtual void giveCharacteristicMatrixFromBC(FloatMatrix &answer, CharType type, TimeStep *tStep, GeneralBoundaryCondition *bc, int boundaryID) {
525 answer.clear();
526 }
527 virtual void giveCharacteristicVectorFromBC(FloatArray &answer, CharType type, ValueModeType mode, TimeStep *tStep, GeneralBoundaryCondition *bc, int boundaryID) {
528 answer.clear();
529 }
530
531};
532
533
534
535
536} // end namespace oofem
537#endif // mpm_h
bool hasDofID(DofIDItem id) const
Definition dofmanager.C:174
void appendDof(Dof *dof)
Definition dofmanager.C:142
void giveUnknownVector(FloatArray &answer, const IntArray &dofMask, ValueModeType mode, TimeStep *tStep, bool padding=false)
Definition dofmanager.C:657
virtual int giveNumberOfInternalDofManagers() const
Definition element.h:243
std::vector< std ::unique_ptr< IntegrationRule > > & giveIntegrationRulesArray()
Definition element.h:901
virtual const FEInterpolation * getGeometryInterpolation() const
Definition element.h:660
virtual integrationDomain giveIntegrationDomain() const
Definition element.C:1693
virtual DofManager * giveInternalDofManager(int i) const
Definition element.h:249
virtual int giveNumberOfDofManagers() const
Definition element.h:695
DofManager * giveDofManager(int i) const
Definition element.C:553
Element(int n, Domain *aDomain)
Definition element.C:86
virtual Element_Geometry_Type giveGeometryType() const =0
virtual IntArray boundaryEdgeGiveNodes(int boundary, const Element_Geometry_Type, bool includeHierarchical=false) const =0
virtual double boundarySurfaceGiveTransformationJacobian(int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
virtual double boundaryEdgeGiveTransformationJacobian(int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo) const
Definition feinterpol.C:81
virtual IntArray boundarySurfaceGiveNodes(int boundary, const Element_Geometry_Type, bool includeHierarchical=false) const =0
virtual void giveCellDofMans(IntArray &nodes, IntArray &internalDofMans, Element *elem) const
Returns list of element nodes (and list of internal dof managers) (including on edges and surfaces) d...
Definition feinterpol.h:208
int giveNumber() const
Definition femcmpnn.h:104
void assemble(const FloatArray &fe, const IntArray &loc)
Definition floatarray.C:616
std::vector< double >::iterator begin()
Definition floatarray.h:107
static FloatArray fromVector(const std::vector< double > &v)
Definition floatarray.C:131
static FloatArray fromList(const std::list< double > &l)
Definition floatarray.C:122
void add(const FloatArray &src)
Definition floatarray.C:218
std::vector< double >::iterator end()
Definition floatarray.h:108
void times(double s)
Definition floatarray.C:834
void times(double f)
void add(const FloatMatrix &a)
*Sets size of receiver to be an empty matrix It will have zero rows and zero columns size void clear()
void assembleT(const FloatMatrix &src, const IntArray &rowind, const IntArray &colind)
void assemble(const FloatMatrix &src, const IntArray &loc)
int getRequiredNumberOfIntegrationPoints(integrationDomain dType, int approxOrder) override
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 followedBy(const IntArray &b, int allocChunk=0)
Definition intarray.C:94
void resize(int n)
Definition intarray.C:73
Base class for elements based on mp (multi-physics) concept.
Definition mpm.h:282
virtual void getSurfaceElementCodeNumbers(IntArray &answer, const Variable::VariableQuantity q, int isurf) const
Returns element code numbers of the unknowns associated with given boundary entity.
Definition mpm.h:403
virtual void getEdgeElementCodeNumbers(IntArray &answer, const Variable::VariableQuantity q, int isurf) const
Definition mpm.h:411
void assembleTermContribution(FloatMatrix &answer, FloatMatrix &contrib, const Term &t)
Assembles the partial element contribution into local element matrix.
Definition mpm.h:446
virtual int getNumberOfSurfaceDOFs() const =0
virtual void getEdgeLocalCodeNumbers(IntArray &answer, const Variable::VariableQuantity q) const =0
virtual void getLocalCodeNumbers(IntArray &answer, const Variable::VariableQuantity q) const
Definition mpm.h:375
virtual void getInternalDofManLocalCodeNumbers(IntArray &answer, const Variable::VariableQuantity q, int n) const =0
void integrateEdgeTerm_dw(FloatMatrix &answer, const Term &term, IntegrationRule *iRule, int iedge, TimeStep *tstep)
Definition mpm.h:341
void assembleTermContributionT(FloatMatrix &answer, FloatMatrix &contrib, const Term &t)
Definition mpm.h:453
FEInterpolation * giveInterpolation() const override
Definition mpm.h:500
virtual int getNumberOfEdgeDOFs() const =0
void initialize()
Definition mpm.h:289
void integrateSurfaceTerm_c(FloatArray &answer, const Term &term, IntegrationRule *iRule, int isurf, TimeStep *tstep)
Definition mpm.h:329
virtual void giveCharacteristicMatrixFromBC(FloatMatrix &answer, CharType type, TimeStep *tStep, GeneralBoundaryCondition *bc, int boundaryID)
Definition mpm.h:524
IntArray giveBoundaryEdgeNodes(int boundary, bool includeHierarchical=false) const override
Definition mpm.h:521
virtual void getSurfaceLocalCodeNumbers(IntArray &answer, const Variable::VariableQuantity q) const =0
virtual int computeFluxLBToLRotationMatrix(FloatMatrix &answer, int iSurf, const FloatArray &lc, const Variable::VariableQuantity q, char btype)
Definition mpm.h:514
IntArray giveBoundarySurfaceNodes(int boundary, bool includeHierarchical=false) const override
Definition mpm.h:518
MPElement(int n, Domain *aDomain)
Definition mpm.h:285
virtual void getBoundaryUnknownVector(FloatArray &answer, const Variable *field, ValueModeType mode, int ibc, char bt, TimeStep *tStep)
Definition mpm.h:425
virtual void giveCharacteristicVectorFromBC(FloatArray &answer, CharType type, ValueModeType mode, TimeStep *tStep, GeneralBoundaryCondition *bc, int boundaryID)
Definition mpm.h:527
void assembleTermContribution(FloatArray &answer, FloatArray &contrib, const Term &t)
Definition mpm.h:460
void integrateEdgeTerm_c(FloatArray &answer, const Term &term, IntegrationRule *iRule, int iedge, TimeStep *tstep)
Definition mpm.h:353
virtual double computeSurfaceVolumeAround(GaussPoint *igp, int iSurf)
Definition mpm.h:492
virtual double computeEdgeVolumeAround(GaussPoint *igp, int iEdge)
Definition mpm.h:494
void integrateTerm_c(FloatArray &answer, const Term &term, IntegrationRule *iRule, TimeStep *tstep)
Definition mpm.h:305
void integrateSurfaceTerm_dw(FloatMatrix &answer, const Term &term, IntegrationRule *iRule, int isurf, TimeStep *tstep)
Definition mpm.h:317
virtual void getDofManLocalCodeNumbers(IntArray &answer, const Variable::VariableQuantity q, int n) const =0
virtual double computeVolumeAround(GaussPoint *igp) override
Definition mpm.h:496
void integrateTerm_dw(FloatMatrix &answer, const Term &term, IntegrationRule *iRule, TimeStep *tstep)
Definition mpm.h:293
virtual const void getUnknownVector(FloatArray &answer, const Variable *field, ValueModeType mode, TimeStep *tstep)
Returns vector of nodal unknowns for given Variable.
Definition mpm.h:473
MPMSymbolicTerm(const Variable *testField, const Variable *unknownField, MaterialMode m)
Definition mpm.h:167
void initializeFrom(InputRecord &ir, EngngModel *problem) override
Definition mpm.h:168
void initializeCell(Element &cell) const override
Definition mpm.h:172
IntegrationRule * giveElementIntegrationRule(Element *e) const override
Definition mpm.h:253
Class representing a weak form expression to be evaluated (integrated). It defines two key methods:
Definition mpm.h:134
MaterialMode mode
Definition mpm.h:138
virtual void evaluate(FloatArray &, MPElement &cell, GaussPoint *gp, TimeStep *tStep) const =0
virtual IntegrationRule * giveElementIntegrationRule(Element *e) const
Definition mpm.h:150
virtual void initializeFrom(InputRecord &ir, EngngModel *problem)
Definition mpm.C:61
virtual void evaluate_lin(FloatMatrix &, MPElement &cell, GaussPoint *gp, TimeStep *tStep) const =0
const Variable * field
Definition mpm.h:136
const Variable * testField
Definition mpm.h:137
virtual void getDimensions(Element &cell) const =0
Term(const Variable *testField, const Variable *unknownField, MaterialMode m=MaterialMode::_Unknown)
Definition mpm.h:142
virtual void initializeCell(Element &cell) const =0
oofem::VariableQuantity VariableQuantity
Definition mpm.h:92
oofem::VariableType VariableType
Definition mpm.h:91
const IntArray & getDofManDofIDs() const
Returns DodIF mask in node; need generalization (which dofMan).
Definition mpm.h:121
Variable(const FEInterpolation *i, Variable::VariableQuantity q, Variable::VariableType t, int size, IntArray &dofIDs, Variable *dual=NULL)
Definition mpm.h:110
const FEInterpolation * interpolation
Definition mpm.h:94
IntArray dofIDs
Definition mpm.h:99
VariableType type
Definition mpm.h:96
Variable(const FEInterpolation *i, Variable::VariableQuantity q, Variable::VariableType t, int size, Variable *dual=NULL, std ::initializer_list< int > dofIDs={})
Definition mpm.h:102
VariableQuantity q
Definition mpm.h:97
void initializeFrom(InputRecord &ir)
Definition mpm.C:42
Variable * dualVar
Definition mpm.h:95
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Definition inputrecord.h:75
#define OOFEM_LOG_INFO(...)
Definition logger.h:143

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