OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
nltransienttransportproblem.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"
37 #include "element.h"
38 #include "dofmanager.h"
39 #include "dof.h"
40 #include "verbose.h"
41 #include "transportelement.h"
42 #include "classfactory.h"
43 #include "mathfem.h"
44 #include "assemblercallback.h"
45 #include "unknownnumberingscheme.h"
46 
47 namespace oofem {
48 REGISTER_EngngModel(NLTransientTransportProblem);
49 
51 {
52  //constructor
53 }
54 
56 {
57  //destructor
58 }
59 
62 {
63  IRResultType result; // Required by IR_GIVE_FIELD macro
64 
66  if ( result != IRRT_OK ) return result;
67 
68  int val = 30;
70  nsmax = val;
71 
73 
75  MANRMSteps = 0;
77  if ( MANRMSteps > 0 ) {
79  } else {
81  }
82 
83  return IRRT_OK;
84 }
85 
86 TimeStep *
88 {
89  double intrinsicTime;
91  intrinsicTime = previousStep->giveTargetTime() + this->alpha*(currentStep->giveTargetTime()-previousStep->giveTargetTime());
92  currentStep->setIntrinsicTime(intrinsicTime);
93  return currentStep.get();
94 }
95 
96 
98 {
99  // creates system of governing eq's and solves them at given time step
100  // first assemble problem at current time step
101 
102  // Right hand side
103  FloatArray rhs;
104  double solutionErr, incrementErr;
106 
107 #ifdef VERBOSE
108  OOFEM_LOG_RELEVANT( "Solving [step number %8d, time %15e]\n", tStep->giveNumber(), tStep->giveTargetTime() );
109 #endif
110  //Delete lhs matrix and create a new one. This is necessary due to growing/decreasing number of equations.
111  if ( tStep->isTheFirstStep() || this->changingProblemSize ) {
112 
114  if ( !conductivityMatrix ) {
115  OOFEM_ERROR("sparse matrix creation failed");
116  }
117 
118  conductivityMatrix->buildInternalStructure( this, 1, EModelDefaultEquationNumbering() );
119 #ifdef VERBOSE
120  OOFEM_LOG_INFO("Assembling conductivity and capacity matrices\n");
121 #endif
122  }
123 
124  //create previous solution from IC or from previous tStep
125  if ( tStep->isTheFirstStep() ) {
126  if ( !stepWhenIcApply ) {
127  stepWhenIcApply.reset( new TimeStep( *tStep->givePreviousStep() ) );
128  }
129  this->applyIC(stepWhenIcApply.get()); //insert solution to hash=1(previous), if changes in equation numbering
130  }
131 
132  double dTTau = tStep->giveTimeIncrement();
133  double Tau = tStep->giveTargetTime() - ( 1. - alpha ) * tStep->giveTimeIncrement();
134  //Time step in which material laws are taken into account
135  TimeStep TauStep(tStep->giveNumber(), this, tStep->giveMetaStepNumber(), Tau, dTTau, tStep->giveSolutionStateCounter() + 1);
136 
137  //Predictor
138  FloatArray *solutionVector;
139  UnknownsField->advanceSolution(tStep);
140  solutionVector = UnknownsField->giveSolutionVector(tStep);
141 
142  //Initialize and give solutionVector from previous solution
143  if ( changingProblemSize ) {
144  if ( !tStep->isTheFirstStep() ) {
145  //copy recent solution to previous position, copy from hash=0 to hash=1(previous)
146  copyUnknownsInDictionary( VM_Total, tStep, tStep->givePreviousStep() );
147  }
148 
149  UnknownsField->initialize( VM_Total, tStep->givePreviousStep(), *solutionVector, EModelDefaultEquationNumbering() );
150  } else {
151  //copy previous solution vector to actual
152  *solutionVector = *UnknownsField->giveSolutionVector( tStep->givePreviousStep() );
153  }
154 
155  this->updateInternalState(& TauStep); //insert to hash=0(current), if changes in equation numbering
156 
157  FloatArray solutionVectorIncrement(neq);
158  int nite = 0;
159 
160  OOFEM_LOG_INFO("Time Iter ResidNorm IncrNorm\n__________________________________________________________\n");
161 
162 
163  do {
164  nite++;
165 
166  // Corrector
167 #ifdef VERBOSE
168  // printf("\nAssembling conductivity and capacity matrices");
169 #endif
170 
171  if ( ( nite == 1 ) || ( NR_Mode == nrsolverFullNRM ) || ( ( NR_Mode == nrsolverAccelNRM ) && ( nite % MANRMSteps == 0 ) ) ) {
172  conductivityMatrix->zero();
173  //Assembling left hand side - start with conductivity matrix
174  this->assemble( *conductivityMatrix, & TauStep, IntSourceLHSAssembler(),
176  conductivityMatrix->times(alpha);
177  //Add capacity matrix
180  }
181 
182  rhs.resize(neq);
183  rhs.zero();
184  //edge or surface load on element
185  //add internal source vector on elements
186  this->assembleVectorFromElements( rhs, tStep, TransportExternalForceAssembler(), VM_Total,
188  //add nodal load
189  this->assembleVectorFromDofManagers( rhs, tStep, ExternalForceAssembler(), VM_Total,
191 
192  // subtract the rhs part depending on previous solution
194  // set-up numerical model
195  this->giveNumericalMethod( this->giveCurrentMetaStep() );
196 
197  // call numerical model to solve arised problem
198 #ifdef VERBOSE
199  //OOFEM_LOG_INFO("Solving ...\n");
200 #endif
201 
202  // compute norm of residuals from balance equations
203  solutionErr = rhs.computeNorm();
204 
205  linSolver->solve(*conductivityMatrix, rhs, solutionVectorIncrement);
206  solutionVector->add(solutionVectorIncrement);
207  this->updateInternalState(tStep); //insert to hash=0(current), if changes in equation numbering
208  // compute error in the solutionvector increment
209  incrementErr = solutionVectorIncrement.computeNorm();
210 
211  // update solution state counter
212  TauStep.incrementStateCounter();
213  tStep->incrementStateCounter();
214 
215  OOFEM_LOG_INFO("%-15e %-10d %-15e %-15e\n", tStep->giveTargetTime(), nite, solutionErr, incrementErr);
216 
217  currentIterations = nite;
218 
219  if ( nite >= nsmax ) {
220  OOFEM_ERROR("convergence not reached after %d iterations", nsmax);
221  }
222  } while ( ( fabs(solutionErr) > rtol ) || ( fabs(incrementErr) > rtol ) );
223 }
224 
225 
227 // returns unknown quantity like displacement, velocity of equation
228 // This function translates this request to numerical method language
229 {
230  if ( this->requiresUnknownsDictionaryUpdate() ) {
231  if ( mode == VM_Incremental ) { //get difference between current and previous time variable
232  return dof->giveUnknowns()->at(0) - dof->giveUnknowns()->at(1);
233  } else if ( mode == VM_TotalIntrinsic ) { // intrinsic value only for current step
234  return this->alpha * dof->giveUnknowns()->at(0) + (1.-this->alpha) * dof->giveUnknowns()->at(1);
235  }
236  int hash = this->giveUnknownDictHashIndx(mode, tStep);
237  if ( dof->giveUnknowns()->includes(hash) ) {
238  return dof->giveUnknowns()->at(hash);
239  } else {
240  OOFEM_ERROR("Dof unknowns dictionary does not contain unknown of value mode (%s)", __ValueModeTypeToString(mode) );
241  }
242  }
243 
244  double t = tStep->giveTargetTime();
246 
247  if ( dof->__giveEquationNumber() == 0 ) {
248  OOFEM_ERROR("invalid equation number on DoF %d", dof->giveDofID() );
249  }
250 
251  if ( ( t >= previousStep->giveTargetTime() ) && ( t <= currentStep->giveTargetTime() ) ) {
253  //UnknownsField->giveUnknownValue(dof, mode, currentStep);
254  double rtdt = UnknownsField->giveUnknownValue(dof, VM_Total, currentStep);
255  double rt = UnknownsField->giveUnknownValue(dof, VM_Total, previousStep);
256  double psi = ( t - previousStep->giveTargetTime() ) / currentStep->giveTimeIncrement();
257  if ( mode == VM_Velocity ) {
258  return ( rtdt - rt ) / currentStep->giveTimeIncrement();
259  } else if ( mode == VM_TotalIntrinsic ) {
260  // only supported for current step
261  return this->alpha * rtdt + ( 1. - this->alpha ) * rt;
262  } else if ( mode == VM_Total ) {
263  return psi * rtdt + ( 1. - psi ) * rt;
264  } else if ( mode == VM_Incremental ) {
265  if ( previousStep->isIcApply() ) {
266  return 0;
267  } else {
268  return ( rtdt - rt );
269  }
270  } else {
271  OOFEM_ERROR("Unknown mode %s is undefined for this problem", __ValueModeTypeToString(mode) );
272  }
273  } else {
274  OOFEM_ERROR("time value %f not within bounds %f and %f", t, previousStep->giveTargetTime(), currentStep->giveTargetTime() );
275  }
276 
277  return 0.; // to make compiler happy;
278 }
279 
280 
281 void
283 {
284  Domain *domain = this->giveDomain(1);
285 
287 
288  // update element state according to given ic
289  for ( auto &elem : domain->giveElements() ) {
290  TransportElement *element = static_cast< TransportElement * >( elem.get() );
291  element->updateInternalState(stepWhenIcApply);
292  element->updateYourself(stepWhenIcApply);
293  }
294 }
295 
296 void
298 {
299  //Copy the last known temperature to be a previous solution
300  for ( auto &domain: domainList ) {
302  for ( auto &node : domain->giveDofManagers() ) {
303  for ( Dof *dof: *node ) {
304  double val = dof->giveUnknown(VM_Total, tStep); //get number on hash=0(current)
305  dof->updateUnknownsDictionary(tStep->givePreviousStep(), VM_Total, val);
306  }
307  }
308  }
309  }
310 }
311 
312 
313 void
315 {
316  //this->updateInternalState(tStep);
317  //Set intrinsic time for a staggered problem here. This is important for materials such as hydratingconcretemat, who keep history of intrinsic times.
318  double intrinsicTime = tStep->giveIntrinsicTime();
319  double Tau = tStep->giveTargetTime() - ( 1. - alpha ) * tStep->giveTimeIncrement();
320  tStep->setIntrinsicTime(Tau);
322  //return back to original intrinsic time
323  tStep->setIntrinsicTime(intrinsicTime);
324 }
325 
326 int
328 {
329  if ( mode == VM_Total ) { //Nodal temperature
330  if ( tStep->giveNumber() == this->giveCurrentStep()->giveNumber() ) { //current time
331  return 0;
332  } else if ( tStep->giveNumber() == this->giveCurrentStep()->giveNumber() - 1 ) { //previous time
333  return 1;
334  } else {
335  OOFEM_ERROR("No history available at TimeStep %d = %f, called from TimeStep %d = %f", tStep->giveNumber(), tStep->giveTargetTime(), this->giveCurrentStep()->giveNumber(), this->giveCurrentStep()->giveTargetTime() );
336  }
337  } else {
338  OOFEM_ERROR("ValueModeType %s undefined", __ValueModeTypeToString(mode));
339  }
340 
341  return 0;
342 }
343 
344 void
346 {
347  // update DoF unknowns dictionary. Store the last and previous temperature only, see giveUnknownDictHashIndx
348  for ( Dof *dof: *inode ) {
349  int eqNum = dof->__giveEquationNumber();
350  double val;
351  if ( dof->hasBc(tStep) ) { // boundary condition
352  val = dof->giveBcValue(VM_Total, tStep);
353  } else {
354  FloatArray *vect = this->UnknownsField->giveSolutionVector(tStep);
355  val = vect->at(eqNum);
356  }
357 
358  //update temperature, which is present in every node
359  dof->updateUnknownsDictionary(tStep, VM_Total, val);
360  }
361 }
362 
363 
364 void
366 {
367  for ( auto &domain: domainList ) {
369  for ( auto &dman : domain->giveDofManagers() ) {
370  //update dictionary entry or add a new pair if the position is missing
371  this->updateDofUnknownsDictionary(dman.get(), tStep);
372  }
373  }
374 
375  for ( auto &elem : domain->giveElements() ) {
376  elem->updateInternalState(tStep);
377  }
378  }
379 }
380 
381 void
383  const UnknownNumberingScheme &ns, TimeStep *tStep)
384 {
385  //
386  // Computes right hand side on all nodes
387  //
388  double t = tStep->giveTargetTime();
389  IntArray loc;
390  FloatMatrix charMtrxCond, charMtrxCap;
391  FloatArray r, drdt, contrib, help;
392  Element *element;
393  TimeStep *previousStep = this->givePreviousStep(); //r_t
394  TimeStep *currentStep = this->giveCurrentStep(); //r_{t+\Delta t}. Note that *tStep is a Tau step between r_t and r_{t+\Delta t}
395 
396  Domain *domain = this->giveDomain(1);
397  int nelem = domain->giveNumberOfElements();
398 
399  for ( int i = 1; i <= nelem; i++ ) {
400  element = domain->giveElement(i);
401  // skip remote elements (these are used as mirrors of remote elements on other domains
402  // when nonlocal constitutive models are used. They introduction is necessary to
403  // allow local averaging on domains without fine grain communication between domains).
404  if ( element->giveParallelMode() == Element_remote ) {
405  continue;
406  }
407 
408  if ( !element->isActivated(tStep) ) {
409  continue;
410  }
411 
412  element->giveLocationArray(loc, ns);
413 
414  element->giveCharacteristicMatrix(charMtrxCond, TangentStiffnessMatrix, tStep);
415  element->giveCharacteristicMatrix(charMtrxCap, CapacityMatrix, tStep);
416 
417 
418  /*
419  * element -> computeVectorOf (VM_Total, tStep, r);
420  * element -> computeVectorOf (VM_Velocity, tStep, drdt);
421  */
422 
423  if ( ( t >= previousStep->giveTargetTime() ) && ( t <= currentStep->giveTargetTime() ) ) {
424  FloatArray rp, rc;
425  element->computeVectorOf(VM_Total, currentStep, rc);
426  element->computeVectorOf(VM_Total, previousStep, rp);
427 
428  //approximate derivative with a difference
429  drdt.beDifferenceOf(rc, rp);
430  drdt.times( 1. / currentStep->giveTimeIncrement() );
431  //approximate current solution from linear interpolation
432  rp.times(1 - alpha);
433  rc.times(alpha);
434  r = rc;
435  r.add(rp);
436  } else {
437  OOFEM_ERROR("unsupported time value");
438  }
439  // bp: r can be computed simply as element->computeVectorOf(VM_TotalIntrinsic, currentStep, r);
440 
441  if ( lumpedCapacityStab ) {
442  int size = charMtrxCap.giveNumberOfRows();
443  double s;
444  for ( int j = 1; j <= size; j++ ) {
445  s = 0.0;
446  for ( int k = 1; k <= size; k++ ) {
447  s += charMtrxCap.at(j, k);
448  charMtrxCap.at(j, k) = 0.0;
449  }
450 
451  charMtrxCap.at(j, j) = s;
452  }
453  }
454 
455  help.beProductOf(charMtrxCap, drdt);
456 
457  contrib.beProductOf(charMtrxCond, r);
458  contrib.add(help);
459  contrib.negated();
460 
461  answer.assemble(contrib, loc);
462  }
463 }
464 } // end namespace oofem
virtual bool isActivated(TimeStep *tStep)
Definition: element.C:793
The representation of EngngModel default unknown numbering.
void createPreviousSolutionInDofUnknownsDictionary(TimeStep *tStep)
std::unique_ptr< SparseLinearSystemNM > linSolver
std::unique_ptr< TimeStep > currentStep
Current time step.
Definition: engngm.h:231
Class and object Domain.
Definition: domain.h:115
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
Returns local vector of unknowns.
Definition: element.C:86
void assembleVectorFromDofManagers(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 into given vector.
Definition: engngm.C:1016
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
void setIntrinsicTime(double newt)
Sets only intrinsic time.
Definition: timestep.h:161
SparseMtrx * createSparseMtrx(SparseMtrxType type)
Creates new instance of sparse matrix corresponding to given keyword.
Definition: classfactory.C:105
std::vector< std::unique_ptr< Domain > > domainList
List of problem domains.
Definition: engngm.h:207
#define _IFT_NLTransientTransportProblem_manrmsteps
std::unique_ptr< TimeStep > previousStep
Previous time step.
Definition: engngm.h:233
void assembleAlgorithmicPartOfRhs(FloatArray &rhs, const UnknownNumberingScheme &s, TimeStep *tStep)
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
virtual void copyUnknownsInDictionary(ValueModeType mode, TimeStep *fromTime, TimeStep *toTime)
Copy unknowns in DOF&#39;s from previous to current position.
std::unique_ptr< TimeStep > stepWhenIcApply
Solution step when IC (initial conditions) apply.
Definition: engngm.h:229
virtual void updateYourself(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
Definition: element.C:779
double giveTargetTime()
Returns target time.
Definition: timestep.h:146
virtual double giveUnknownComponent(ValueModeType mode, TimeStep *tStep, Domain *d, Dof *dof)
Returns requested unknown.
void incrementStateCounter()
Updates solution state counter.
Definition: timestep.h:190
Callback class for assembling element external forces:
Abstract base class for all finite elements.
Definition: element.h:145
Base class for dof managers.
Definition: dofmanager.h:113
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
virtual int __giveEquationNumber() const =0
Returns equation number of receiver, usually assigned by emodel.
int giveNumberOfElements() const
Returns number of elements in domain.
Definition: domain.h:434
virtual void giveCharacteristicMatrix(FloatMatrix &answer, CharType type, TimeStep *tStep)
Computes characteristic matrix of receiver of requested type in given time step.
Definition: element.C:569
REGISTER_EngngModel(ProblemSequence)
Class implementing an array of integers.
Definition: intarray.h:61
virtual void applyIC(TimeStep *tStep)
This function is normally called at the first time to project initial conditions to previous (0^th) s...
Callback class for assembling CBS pressure matrices.
virtual void giveUnknowns(FloatArray &masterUnknowns, ValueModeType mode, TimeStep *tStep)
The key method of class Dof.
Definition: dof.C:162
#define OOFEM_LOG_RELEVANT(...)
Definition: logger.h:126
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
Sets receiver to be a - b.
Definition: floatarray.C:341
double giveTimeIncrement()
Returns solution step associated time increment.
Definition: timestep.h:150
bool isTheFirstStep()
Check if receiver is first step.
Definition: timestep.C:134
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
virtual void updateYourself(TimeStep *tStep)
Updates internal state after finishing time step.
MetaStep * giveCurrentMetaStep()
Returns current meta step.
Definition: engngm.C:1684
bool changingProblemSize
Determines if there are change in the problem size (no application/removal of Dirichlet boundary cond...
#define OOFEM_LOG_INFO(...)
Definition: logger.h:127
int giveNumber()
Returns receiver&#39;s number.
Definition: timestep.h:129
std::unique_ptr< SparseMtrx > conductivityMatrix
Element * giveElement(int n)
Service for accessing particular domain fe element.
Definition: domain.C:160
StateCounterType giveSolutionStateCounter()
Returns current solution state counter.
Definition: timestep.h:188
#define OOFEM_ERROR(...)
Definition: error.h:61
virtual TimeStep * giveNextStep()
Returns next time step (next to current step) of receiver.
Implementation for assembling external forces vectors in standard monolithic FE-problems.
void giveLocationArray(IntArray &locationArray, const UnknownNumberingScheme &s, IntArray *dofIds=NULL) const
Returns the location array (array of code numbers) of receiver for given numbering scheme...
Definition: element.C:390
This abstract class represent a general base element class for transport problems.
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
This class represents linear nonstationary transport problem.
virtual int giveUnknownDictHashIndx(ValueModeType mode, TimeStep *tStep)
This method is responsible for computing unique dictionary id (ie hash value) from given valueModeTyp...
DofIDItem giveDofID() const
Returns DofID value of receiver, which determines type of of unknown connected to receiver (e...
Definition: dof.h:276
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
Definition: floatarray.C:676
int lumpedCapacityStab
If set then stabilization using lumped capacity will be used.
TimeStep * givePreviousStep()
Returns pointer to previous solution step.
Definition: timestep.C:114
double at(int i, int j) const
Coefficient access function.
Definition: floatmatrix.h:176
double giveIntrinsicTime()
Returns intrinsic time, e.g. time in which constitutive model is evaluated.
Definition: timestep.h:148
Callback class for assembling mid point effective tangents.
NLTransientTransportProblem(int i, EngngModel *_master)
Constructor.
std::unique_ptr< PrimaryField > UnknownsField
This field stores solution vector. For fixed size of problem, the PrimaryField is used...
Initializes the variable VERBOSE, in order to get a few intermediate messages on screen: beginning an...
Class representing vector of real numbers.
Definition: floatarray.h:82
elementParallelMode giveParallelMode() const
Return elementParallelMode of receiver.
Definition: element.h:1069
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
virtual void updateDofUnknownsDictionary(DofManager *dman, TimeStep *tStep)
Updates necessary values in Dofs unknown dictionaries.
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
void assemble(const FloatArray &fe, const IntArray &loc)
Assembles the array fe (typically, the load vector of a finite element) into the receiver, using loc as location array.
Definition: floatarray.C:551
int giveMetaStepNumber()
Returns receiver&#39;s meta step number.
Definition: timestep.h:135
double computeNorm() const
Computes the norm (or length) of the vector.
Definition: floatarray.C:840
Class representing the general Input Record.
Definition: inputrecord.h:101
#define _IFT_NLTransientTransportProblem_nsmax
virtual int requiresUnknownsDictionaryUpdate()
Allows to change number of equations during solution.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
virtual void updateYourself(TimeStep *tStep)
Updates internal state after finishing time step.
void zero()
Zeroes all coefficients of receiver.
Definition: floatarray.C:658
void times(double s)
Multiplies receiver with scalar.
Definition: floatarray.C:818
ClassFactory & classFactory
Definition: classfactory.C:59
Element in active domain is only mirror of some remote element.
Definition: element.h:102
virtual TimeStep * givePreviousStep(bool force=false)
Returns previous time step.
Definition: engngm.h:693
std::vector< std::unique_ptr< Element > > & giveElements()
Definition: domain.h:279
void assembleVectorFromElements(FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
Assembles characteristic vector of required type from elements into given vector. ...
Definition: engngm.C:1198
Abstract base class representing the "problem" under consideration.
Definition: engngm.h:181
#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
bool isIcApply()
Check if receiver is solution step when initial conditions should apply.
Definition: timestep.C:144
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual NumericalMethod * giveNumericalMethod(MetaStep *mStep)
Returns reference to receiver&#39;s numerical method.
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
Abstract class Dof represents Degree Of Freedom in finite element mesh.
Definition: dof.h:93
void negated()
Switches the sign of every coefficient of receiver.
Definition: floatarray.C:739
virtual void updateInternalState(TimeStep *tStep)
Updates IP values on elements.
virtual TimeStep * giveNextStep()
Returns next time step (next to current step) of receiver.
int giveNumberOfRows() const
Returns number of rows of receiver.
Definition: floatmatrix.h:156
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
virtual void updateInternalState(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
#define _IFT_NLTransientTransportProblem_rtol
Class representing solution step.
Definition: timestep.h:80
void add(const FloatArray &src)
Adds array src to receiver.
Definition: floatarray.C:156
const char * __ValueModeTypeToString(ValueModeType _value)
Definition: cltypes.C:322
virtual void applyIC(TimeStep *tStep)
This function is normally called at the first time to project initial conditions to previous (0^th) s...
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:30 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011