OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
transienttransportproblem.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 - 2013 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 
36 #include "timestep.h"
38 #include "maskedprimaryfield.h"
39 #include "transportelement.h"
40 #include "classfactory.h"
41 #include "datastream.h"
42 #include "contextioerr.h"
43 #include "nrsolver.h"
44 #include "unknownnumberingscheme.h"
45 #include "function.h"
46 #include "dofmanager.h"
47 #include "assemblercallback.h"
48 // Temporary:
50 #include "boundarycondition.h"
51 #include "activebc.h"
52 
53 namespace oofem {
54 REGISTER_EngngModel(TransientTransportProblem);
55 
57  alpha(0.5),
58  dtFunction(0),
59  prescribedTimes(),
60  deltaT(1.),
61  keepTangent(false),
62  lumped(false)
63 {
64  ndomains = 1;
65 }
66 
68 
69 
71 {
72  if ( !nMethod ) {
73  nMethod.reset( new NRSolver(this->giveDomain(1), this) );
74  }
75  return nMethod.get();
76 }
77 
78 
81 {
82  IRResultType result; // Required by IR_GIVE_FIELD macro
83 
84  int val = SMT_Skyline;
86  this->sparseMtrxType = ( SparseMtrxType ) val;
87 
89 
91  dtFunction = 0;
96  } else {
98  }
99 
101 
103 
104  field.reset( new DofDistributedPrimaryField(this, 1, FT_TransportProblemUnknowns, 0) );
105 
106  // read field export flag
109  if ( exportFields.giveSize() ) {
110  FieldManager *fm = this->giveContext()->giveFieldManager();
111  for ( int i = 1; i <= exportFields.giveSize(); i++ ) {
112  if ( exportFields.at(i) == FT_Temperature ) {
113  FieldPtr _temperatureField( new MaskedPrimaryField ( ( FieldType ) exportFields.at(i), this->field.get(), {T_f} ) );
114  fm->registerField( _temperatureField, ( FieldType ) exportFields.at(i) );
115  } else if ( exportFields.at(i) == FT_HumidityConcentration ) {
116  FieldPtr _concentrationField( new MaskedPrimaryField ( ( FieldType ) exportFields.at(i), this->field.get(), {C_1} ) );
117  fm->registerField( _concentrationField, ( FieldType ) exportFields.at(i) );
118  }
119  }
120  }
121 
122  return EngngModel :: initializeFrom(ir);
123 }
124 
125 
127 {
128  //return this->field->giveUnknownValue(dof, mode, tStep);
129  double val1 = field->giveUnknownValue(dof, VM_Total, tStep);
130  double val0 = field->giveUnknownValue(dof, VM_Total, tStep->givePreviousStep());
131  if ( mode == VM_Total ) {
132  //return this->alpha * val1 + (1.-this->alpha) * val0;
133  return val1;//The output should be given always at the end of the time step, regardless of alpha
134  } else if ( mode == VM_TotalIntrinsic) {
135  return this->alpha * val1 + (1.-this->alpha) * val0;
136  //return val1;
137  } else if ( mode == VM_Velocity ) {
138  return (val1 - val0) / tStep->giveTimeIncrement();
139  } else if ( mode == VM_Incremental ) {
140  return val1 - val0;
141  } else {
142  OOFEM_ERROR("Unknown value mode requested");
143  return 0;
144  }
145 }
146 
147 
148 double
150 {
151  if ( this->dtFunction ) {
152  return this->giveDomain(1)->giveFunction(this->dtFunction)->evaluateAtTime(n);
153  } else if ( this->prescribedTimes.giveSize() > 0 ) {
154  return this->giveDiscreteTime(n) - this->giveDiscreteTime(n - 1);
155  } else {
156  return this->deltaT;
157  }
158 }
159 
160 double
162 {
163  if ( iStep > 0 && iStep <= this->prescribedTimes.giveSize() ) {
164  return ( this->prescribedTimes.at(iStep) );
165  } else if ( iStep == 0 ) {
166  return 0.0;
167  }
168 
169  OOFEM_ERROR("invalid iStep");
170  return 0.0;
171 }
172 
173 
175 {
176  if ( !currentStep ) {
177  // first step -> generate initial step
179  }
180 
181  double dt = this->giveDeltaT(currentStep->giveNumber()+1);
182  previousStep = std :: move(currentStep);
183  currentStep.reset( new TimeStep(*previousStep, dt) );
184  currentStep->setIntrinsicTime(previousStep->giveTargetTime() + alpha * dt);
185  return currentStep.get();
186 }
187 
188 
190 {
191  if ( master && (!force)) {
193  } else {
194  if ( !stepWhenIcApply ) {
195  double dt = this->giveDeltaT(1);
196  stepWhenIcApply.reset( new TimeStep(giveNumberOfTimeStepWhenIcApply(), this, 0, 0., dt, 0) );
197  // The initial step goes from [-dt, 0], so the intrinsic time is at: -deltaT + alpha*dt
198  stepWhenIcApply->setIntrinsicTime(-dt + alpha * dt);
199  }
200 
201  return stepWhenIcApply.get();
202  }
203 }
204 
205 
207 {
208  OOFEM_LOG_INFO( "Solving [step number %5d, time %e]\n", tStep->giveNumber(), tStep->giveTargetTime() );
209 
210  Domain *d = this->giveDomain(1);
212 
213  if ( tStep->isTheFirstStep() ) {
214  this->applyIC();
215  }
216 
217  field->advanceSolution(tStep);
218 
219 #if 1
220  // This is what advanceSolution should be doing, but it can't be there yet
221  // (backwards compatibility issues due to inconsistencies in other solvers).
222  TimeStep *prev = tStep->givePreviousStep();
223  for ( auto &dman : d->giveDofManagers() ) {
224  static_cast< DofDistributedPrimaryField* >(field.get())->setInitialGuess(*dman, tStep, prev);//copy total values into new tStep
225  }
226 
227  for ( auto &elem : d->giveElements() ) {
228  int ndman = elem->giveNumberOfInternalDofManagers();
229  for ( int i = 1; i <= ndman; i++ ) {
230  static_cast< DofDistributedPrimaryField* >(field.get())->setInitialGuess(*elem->giveInternalDofManager(i), tStep, prev);
231  }
232  }
233 
234  for ( auto &bc : d->giveBcs() ) {
235  int ndman = bc->giveNumberOfInternalDofManagers();
236  for ( int i = 1; i <= ndman; i++ ) {
237  static_cast< DofDistributedPrimaryField* >(field.get())->setInitialGuess(*bc->giveInternalDofManager(i), tStep, prev);
238  }
239  }
240 #endif
241 
242  field->applyBoundaryCondition(tStep);
243  field->initialize(VM_Total, tStep, solution, EModelDefaultEquationNumbering());
244 
245 
246  if ( !effectiveMatrix ) {
248  effectiveMatrix->buildInternalStructure( this, 1, EModelDefaultEquationNumbering() );
249  }
250 
251 
252  OOFEM_LOG_INFO("Assembling external forces\n");
253  FloatArray externalForces(neq);
254  externalForces.zero();
255  this->assembleVector( externalForces, tStep, ExternalForceAssembler(), VM_Total, EModelDefaultEquationNumbering(), d );
257 
258  // set-up numerical method
259  this->giveNumericalMethod( this->giveCurrentMetaStep() );
260  OOFEM_LOG_INFO("Solving for %d unknowns...\n", neq);
261 
262  internalForces.resize(neq);
263 
264  FloatArray incrementOfSolution;
265  double loadLevel;
266  int currentIterations;
267  this->updateComponent(tStep, InternalRhs, d); // @todo Hack to ensure that internal RHS is evaluated before the tangent. This is not ideal, causing this to be evaluated twice for a linearproblem. We have to find a better way to handle this.
268  this->nMethod->solve(*this->effectiveMatrix,
269  externalForces,
270  NULL, // ignore
271  this->solution,
272  incrementOfSolution,
273  this->internalForces,
274  this->eNorm,
275  loadLevel, // ignore
277  currentIterations, // ignore
278  tStep);
279 }
280 
281 
282 void
284 {
285  // F(T) + C*dT/dt = Q, F(T)=(K_c+K_h)*T-R_q-R_h
286  // Linearized:
287  // F(T^(k)) + K*a*dT_1 = Q - C * dT/dt^(k) - C/dt * dT_1
288  // Rearranged
289  // (a*K + C/dt) * dT_1 = Q - (F(T^(k)) + C * dT/dt^(k))
290  // K_eff * dT_1 = Q - F_eff
291  // Update:
292  // T_1 += dT_1
293 
295  this->field->update(VM_Total, tStep, solution, EModelDefaultEquationNumbering());
298  this->field->applyBoundaryCondition(tStep);
299 
300  if ( cmpn == InternalRhs ) {
301  // F_eff = F(T^(k)) + C * dT/dt^(k)
302  this->internalForces.zero();
303  this->assembleVector(this->internalForces, tStep, InternalForceAssembler(), VM_Total,
304  EModelDefaultEquationNumbering(), d, & this->eNorm);
306  if ( lumped ) {
307  // Note, inertia contribution cannot be computed on element level when lumped mass matrices are used.
308  FloatArray oldSolution, vel;
309  this->field->initialize(VM_Total, tStep->givePreviousStep(), oldSolution, EModelDefaultEquationNumbering());
310  vel.beDifferenceOf(solution, oldSolution);
311  vel.times( 1./tStep->giveTimeIncrement() );
312  FloatArray capacityDiag(vel.giveSize());
313  this->assembleVector( capacityDiag, tStep, LumpedMassVectorAssembler(), VM_Total, EModelDefaultEquationNumbering(), d );
314  for ( int i = 0; i < vel.giveSize(); ++i ) {
315  this->internalForces[i] += capacityDiag[i] * vel[i];
316  }
317  } else {
318  FloatArray tmp;
319  this->assembleVector(this->internalForces, tStep, InertiaForceAssembler(), VM_Total,
320  EModelDefaultEquationNumbering(), d, & tmp);
321  this->eNorm.add(tmp);
322  }
323 
324  } else if ( cmpn == NonLinearLhs ) {
325  // K_eff = (a*K + C/dt)
326  if ( !this->keepTangent || !this->hasTangent ) {
327  this->effectiveMatrix->zero();
328  this->assemble( *effectiveMatrix, tStep, EffectiveTangentAssembler(TangentStiffness, lumped, this->alpha, 1./tStep->giveTimeIncrement()),
330  this->hasTangent = true;
331  }
332  } else {
333  OOFEM_ERROR("Unknown component");
334  }
335 }
336 
337 
338 void
340 {
341  Domain *domain = this->giveDomain(1);
342  OOFEM_LOG_INFO("Applying initial conditions\n");
343 
344  this->field->applyDefaultInitialCondition();
345 
347  // update element state according to given ic
349  for ( auto &elem : domain->giveElements() ) {
350  TransportElement *element = static_cast< TransportElement * >( elem.get() );
351  element->updateInternalState(s);
352  element->updateYourself(s);
353  }
354 }
355 
356 
357 bool
359 {
361  if ( tStep->isTheFirstStep() ) {
362  return true;
363  }
364  // Check if Dirichlet b.c.s has changed.
365  Domain *d = this->giveDomain(1);
366  for ( auto &gbc : d->giveBcs() ) {
367  ActiveBoundaryCondition *active_bc = dynamic_cast< ActiveBoundaryCondition * >(gbc.get());
368  BoundaryCondition *bc = dynamic_cast< BoundaryCondition * >(gbc.get());
369  // We only need to consider Dirichlet b.c.s
370  if ( bc || ( active_bc && ( active_bc->requiresActiveDofs() || active_bc->giveNumberOfInternalDofManagers() ) ) ) {
371  // Check of the dirichlet b.c. has changed in the last step (if so we need to renumber)
372  if ( gbc->isImposed(tStep) != gbc->isImposed(tStep->givePreviousStep()) ) {
373  return true;
374  }
375  }
376  }
377  return false;
378 }
379 
380 int
382 {
383  this->effectiveMatrix.reset(NULL);
385 }
386 
387 void
389 {
391 }
392 
395 {
396  contextIOResultType iores;
397 
398  if ( ( iores = EngngModel :: saveContext(stream, mode) ) != CIO_OK ) {
399  THROW_CIOERR(iores);
400  }
401 
402  if ( ( iores = field->saveContext(stream, mode) ) != CIO_OK ) {
403  THROW_CIOERR(iores);
404  }
405 
406  return CIO_OK;
407 }
408 
409 
412 {
413  contextIOResultType iores;
414 
415  if ( ( iores = EngngModel :: restoreContext(stream, mode) ) != CIO_OK ) {
416  THROW_CIOERR(iores);
417  }
418 
419  if ( ( iores = field->restoreContext(stream, mode) ) != CIO_OK ) {
420  THROW_CIOERR(iores);
421  }
422 
423  return CIO_OK;
424 }
425 
426 
427 int
429 {
430  return tStep->giveNumber() % 2;
431 }
432 
433 
434 int
436 {
437  return true;
438 }
439 
440 int
442 {
443  // check for proper element type
444  for ( auto &elem : this->giveDomain(1)->giveElements() ) {
445  if ( !dynamic_cast< TransportElement * >( elem.get() ) ) {
446  OOFEM_WARNING("Element %d has no TransportElement base", elem->giveLabel());
447  return 0;
448  }
449  }
450 
452 }
453 
454 
455 void
457 {
459  this->giveNumericalMethod( this->giveCurrentMetaStep() )->setDomain( this->giveDomain(1) );
460 }
461 
463 {
464  /* Note: the current implementation uses MaskedPrimaryField, that is automatically updated with the model progress,
465  so the returned field always refers to active solution step.
466  */
467 
468  if ( tStep != this->giveCurrentStep()) {
469  OOFEM_ERROR("Unable to return field representation for non-current time step");
470  }
471  if ( key == FT_Temperature ) {
472  FieldPtr _ptr ( new MaskedPrimaryField ( key, this->field.get(), {T_f} ) );
473  return _ptr;
474  } else if ( key == FT_HumidityConcentration ) {
475  FieldPtr _ptr ( new MaskedPrimaryField ( key, this->field.get(), {C_1} ) );
476  return _ptr;
477  } else {
478  return FieldPtr();
479  }
480 }
481 
482 
483 } // end namespace oofem
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the state of model to output stream.
The representation of EngngModel default unknown numbering.
#define _IFT_TransientTransportProblem_dtFunction
Function that determines size of time step.
std::unique_ptr< TimeStep > currentStep
Current time step.
Definition: engngm.h:231
virtual double giveUnknownComponent(ValueModeType mode, TimeStep *tStep, Domain *d, Dof *dof)
Returns requested unknown.
std::shared_ptr< Field > FieldPtr
Definition: field.h:72
Class and object Domain.
Definition: domain.h:115
Implementation for assembling internal forces vectors in standard monolithic, nonlinear FE-problems...
virtual int giveNumberOfDomainEquations(int di, const UnknownNumberingScheme &num)
Returns number of equations for given domain in active (current time step) time step.
Definition: engngm.C:391
Abstract class representing subset of DOFs (identified by DofId mask) of primary field.
virtual bool requiresActiveDofs()
Checks to see if active boundary condition requires special DOFs.
Definition: activebc.h:152
FieldType
Physical type of field.
Definition: field.h:60
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
Definition: engngm.C:262
Class representing meta step.
Definition: metastep.h:62
This class implements Newton-Raphson Method, derived from abstract NumericalMethod class for solving ...
Definition: nrsolver.h:95
SparseMtrx * createSparseMtrx(SparseMtrxType type)
Creates new instance of sparse matrix corresponding to given keyword.
Definition: classfactory.C:105
#define _IFT_TransientTransportProblem_deltaT
Fixed timestep.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
std::unique_ptr< TimeStep > previousStep
Previous time step.
Definition: engngm.h:233
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
void clear()
Clears receiver (zero size).
Definition: floatarray.h:206
This base class is an abstraction for numerical algorithm.
Definition: nummet.h:80
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
virtual NumericalMethod * giveNumericalMethod(MetaStep *mStep)
Returns reference to receiver&#39;s numerical method.
std::unique_ptr< TimeStep > stepWhenIcApply
Solution step when IC (initial conditions) apply.
Definition: engngm.h:229
virtual void updateComponent(TimeStep *tStep, NumericalCmpn cmpn, Domain *d)
Updates components mapped to numerical method if necessary during solution process.
std::unique_ptr< PrimaryField > field
virtual void updateYourself(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
Definition: element.C:779
virtual bool hasField(InputFieldType id)=0
Returns true if record contains field identified by idString keyword.
double giveTargetTime()
Returns target time.
Definition: timestep.h:146
virtual int checkConsistency()
Allows programmer to test some receiver&#39;s internal data, before computation begins.
FieldManager * giveFieldManager()
Definition: engngm.h:131
REGISTER_EngngModel(ProblemSequence)
virtual bool requiresEquationRenumbering(TimeStep *tStep)
Returns true if equation renumbering is required for given solution step.
virtual ~TransientTransportProblem()
Destructor.
int & at(int i)
Coefficient access function.
Definition: intarray.h:103
TransientTransportProblem(int i, EngngModel *_master)
Constructor.
#define THROW_CIOERR(e)
Definition: contextioerr.h:61
virtual int giveNumberOfInternalDofManagers()
Gives the number of internal dof managers.
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
Sets receiver to be a - b.
Definition: floatarray.C:341
virtual void updateDomainLinks()
Updates domain links after the domains of receiver have changed.
double giveTimeIncrement()
Returns solution step associated time increment.
Definition: timestep.h:150
bool isTheFirstStep()
Check if receiver is first step.
Definition: timestep.C:134
#define _IFT_TransientTransportProblem_alpha
Defines the time discretization of the value: .
Class representing field of primary variables, which are typically allocated on nodes.
virtual void assemble(SparseMtrx &answer, TimeStep *tStep, const MatrixAssembler &ma, const UnknownNumberingScheme &s, Domain *domain)
Assembles characteristic matrix of required type into given sparse matrix.
Definition: engngm.C:803
MetaStep * giveCurrentMetaStep()
Returns current meta step.
Definition: engngm.C:1684
std::vector< std::unique_ptr< GeneralBoundaryCondition > > & giveBcs()
Definition: domain.h:322
Class implementing Dirichlet boundary condition on DOF (primary boundary condition).
int giveNumber()
Returns receiver&#39;s number.
Definition: timestep.h:129
#define OOFEM_LOG_INFO(...)
Definition: logger.h:127
NumericalCmpn
Type representing numerical component.
Definition: numericalcmpn.h:46
#define _IFT_EngngModel_smtype
Definition: engngm.h:82
#define OOFEM_ERROR(...)
Definition: error.h:61
EngngModelContext * giveContext()
Context requesting service.
Definition: engngm.h:1078
void clear()
Clears the array (zero size).
Definition: intarray.h:177
int ndomains
Number of receiver domains.
Definition: engngm.h:205
int updateSharedDofManagers(FloatArray &answer, const UnknownNumberingScheme &s, int ExchangeTag)
Exchanges necessary remote DofManagers data.
Definition: engngm.C:1957
SparseMtrxType
Enumerative type used to identify the sparse matrix type.
The reference incremental load vector is defined as totalLoadVector assembled at given time...
Implementation for assembling external forces vectors in standard monolithic FE-problems.
virtual int giveUnknownDictHashIndx(ValueModeType mode, TimeStep *tStep)
This method is responsible for computing unique dictionary id (ie hash value) from given valueModeTyp...
This abstract class represent a general base element class for transport problems.
virtual void updateYourself(TimeStep *tStep)
Updates internal state after finishing time step.
Definition: engngm.C:612
virtual FieldPtr giveField(FieldType key, TimeStep *)
Returns the smart pointer to requested field, Null otherwise.
EngngModel * master
Master e-model; if defined receiver is in maintained (slave) mode.
Definition: engngm.h:262
std::unique_ptr< SparseMtrx > effectiveMatrix
Abstract base class for all active boundary conditions.
Definition: activebc.h:63
TimeStep * givePreviousStep()
Returns pointer to previous solution step.
Definition: timestep.C:114
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
#define _IFT_TransientTransportProblem_exportFields
Fields to export for staggered problems.
Function * giveFunction(int n)
Service for accessing particular domain load time function.
Definition: domain.C:268
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the state of model to output stream.
Definition: engngm.C:1527
virtual int forceEquationNumbering()
Forces equation renumbering on all domains associated to engng model.
Definition: engngm.C:473
void registerField(FieldPtr eField, FieldType key)
Registers the given field (the receiver is not assumed to own given field).
Definition: fieldmanager.C:42
Class representing vector of real numbers.
Definition: floatarray.h:82
virtual int forceEquationNumbering()
Forces equation renumbering on all domains associated to engng model.
virtual int checkConsistency()
Allows programmer to test some receiver&#39;s internal data, before computation begins.
Definition: engngm.h:995
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
Implementation for assembling lumped mass matrix (diagonal components) in vector form.
int giveNumberOfTimeStepWhenIcApply()
Returns the time step number, when initial conditions should apply.
Definition: engngm.h:754
Class representing the general Input Record.
Definition: inputrecord.h:101
void zero()
Zeroes all coefficients of receiver.
Definition: floatarray.C:658
Implementation for assembling the intertia forces vector (i.e.
void times(double s)
Multiplies receiver with scalar.
Definition: floatarray.C:818
ClassFactory & classFactory
Definition: classfactory.C:59
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
virtual TimeStep * giveSolutionStepWhenIcApply(bool force=false)
Returns the solution step when Initial Conditions (IC) apply.
virtual void updateYourself(TimeStep *tStep)
Updates internal state after finishing time step.
virtual TimeStep * giveSolutionStepWhenIcApply(bool force=false)
Returns the solution step when Initial Conditions (IC) apply.
Definition: engngm.h:720
std::vector< std::unique_ptr< Element > > & giveElements()
Definition: domain.h:279
Abstract base class representing the "problem" under consideration.
Definition: engngm.h:181
virtual void setDomain(Domain *d)
Definition: nummet.h:114
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:78
virtual TimeStep * giveCurrentStep(bool force=false)
Returns current time step.
Definition: engngm.h:683
std::unique_ptr< SparseNonLinearSystemNM > nMethod
Numerical method used to solve the problem.
int giveSize() const
Definition: intarray.h:203
int giveSize() const
Returns the size of receiver.
Definition: floatarray.h:218
virtual void updateDomainLinks()
Updates domain links after the domains of receiver have changed.
Definition: engngm.C:1521
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode)
Restores the state of model from output stream.
Definition: engngm.C:1592
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual int requiresUnknownsDictionaryUpdate()
Indicates if EngngModel requires Dofs dictionaries to be updated.
Domain * giveDomain(int n)
Service for accessing particular problem domain.
Definition: engngm.C:1720
#define IR_GIVE_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:69
#define _IFT_TransientTransportProblem_prescribedTimes
Discrete times for each time step.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
Definition: dof.h:93
Symmetric skyline.
virtual TimeStep * giveNextStep()
Returns next time step (next to current step) of receiver.
Callback class for assembling effective tangents composed of stiffness and mass matrix.
virtual void updateInternalState(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
virtual double evaluateAtTime(double t)
Returns the value of the function at given time.
Definition: function.C:76
#define OOFEM_WARNING(...)
Definition: error.h:62
void assembleVector(FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
Assembles characteristic vector of required type from dofManagers, element, and active boundary condi...
Definition: engngm.C:986
Class representing solution step.
Definition: timestep.h:80
#define _IFT_TransientTransportProblem_lumped
Use of lumped "mass" matrix.
void add(const FloatArray &src)
Adds array src to receiver.
Definition: floatarray.C:156
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode)
Restores the state of model from output stream.
#define _IFT_TransientTransportProblem_keepTangent
Fixes the tangent to be reused on each step.
void resize(int s)
Resizes receiver towards requested size.
Definition: floatarray.C:631

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:32 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011