OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
zzerrorestimator.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 
35 #include "../sm/ErrorEstimators/zzerrorestimator.h"
36 #include "../sm/Elements/structuralelement.h"
37 #include "../sm/Materials/structuralmaterial.h"
38 #include "domain.h"
39 #include "dofmanager.h"
40 #include "element.h"
41 #include "gausspoint.h"
42 #include "floatarray.h"
43 #include "floatmatrix.h"
44 #include "mathfem.h"
45 #include "zznodalrecoverymodel.h"
46 #include "sprnodalrecoverymodel.h"
47 #include "timestep.h"
48 #include "integrationrule.h"
49 #include "feinterpol.h"
50 #include "connectivitytable.h"
51 #include "errorestimatortype.h"
52 #include "classfactory.h"
53 #include "engngm.h"
54 #include "parallelcontext.h"
55 
56 #include <vector>
57 
58 namespace oofem {
59 REGISTER_ErrorEstimator(ZZErrorEstimator, EET_ZZEE);
60 
61 #ifdef EXPERIMENT
62 FloatArray sNorms;
63 #endif
64 
65 
66 int
68 {
69  int nelems = this->domain->giveNumberOfElements();
70  ZZErrorEstimatorInterface *interface;
71  double sNorm;
73 
74  if ( mode == temporaryEM ) {
75  type = IST_StressTensorTemp; // OOFEM_ERROR("temporaryEM mode not supported");
76  }
77 
78  if ( this->stateCounter == tStep->giveSolutionStateCounter() ) {
79  return 1;
80  }
81 
82  NodalRecoveryModel *oldSmoother, *rm = NULL;
83  if ( this->nodalRecoveryType == ZZRecovery ) {
84  rm = new ZZNodalRecoveryModel(this->domain);
85  } else if ( this->nodalRecoveryType == SPRRecovery ) {
86  rm = new SPRNodalRecoveryModel(this->domain);
87  } else {
88  OOFEM_ERROR("unknown nodal recovery type");
89  }
90 
91  // first set the domain Smoother to suitable one, keep old one to be recovered
92  oldSmoother = this->domain->giveSmoother();
93  this->domain->setSmoother(rm, 0); // do not delete old one
94 
95  // create a new set containing all elements
96  Set elemSet(0, this->domain);
97  elemSet.addAllElements();
98  // recover nodal values on entire elemSet (domain)
99  rm->recoverValues(elemSet, type, tStep);
100 
101 #ifdef ZZErrorEstimator_ElementResultCashed
102  this->eNorms.resize(nelems);
103  #ifdef EXPERIMENT
104  sNorms.resize(nelems);
105  #endif
106 #else
107  double eNorm;
108 #endif
109 
110  this->globalENorm = this->globalSNorm = 0.0;
111  // loop over domain's elements
112  for ( int ielem = 1; ielem <= nelems; ielem++ ) {
113  if ( this->skipRegion( this->domain->giveElement(ielem)->giveRegionNumber() ) ) {
114  continue;
115  }
116 
117  interface = static_cast< ZZErrorEstimatorInterface * >( this->domain->giveElement(ielem)->giveInterface(ZZErrorEstimatorInterfaceType) );
118  if ( interface == NULL ) {
119  OOFEM_ERROR("Element has no ZZ error estimator interface defined");
120  }
121 
122 #ifdef ZZErrorEstimator_ElementResultCashed
123  interface->ZZErrorEstimatorI_computeElementContributions(eNorms.at(ielem), sNorm, this->normType, type, tStep);
124  this->globalENorm += eNorms.at(ielem) * eNorms.at(ielem);
125  #ifdef EXPERIMENT
126  sNorms.at(ielem) = sNorm;
127  #endif
128 #else
129  interface->ZZErrorEstimatorI_computeElementContributions(eNorm, sNorm, this->normType, type, tStep);
130  this->globalENorm += eNorm * eNorm;
131 #endif
132  this->globalSNorm += sNorm * sNorm;
133  }
134 
135  FloatArray gnorms;
136  ParallelContext *parallel_context = this->domain->giveEngngModel()->giveParallelContext(this->domain->giveNumber());
137  parallel_context->accumulate({this->globalENorm, this->globalSNorm}, gnorms);
138  this->globalENorm = gnorms [ 0 ];
139  this->globalSNorm = gnorms [ 1 ];
140 
141 
142  // recover the stored smoother
143  this->domain->setSmoother(oldSmoother); //delete old one (the rm)
144 
145  // report the error estimate
146  double pe = sqrt( this->globalENorm / ( this->globalENorm + this->globalSNorm ) );
147  OOFEM_LOG_RELEVANT("Relative stress error estimate: %5.2f%%\n", pe * 100.0);
148 
149  this->globalENorm = sqrt(this->globalENorm);
150  this->globalSNorm = sqrt(this->globalSNorm);
151  this->globalErrorEstimate = pe;
152 
153 
154  this->stateCounter = tStep->giveSolutionStateCounter();
155  return 1;
156 }
157 
158 double
160 {
161  if ( this->skipRegion( elem->giveRegionNumber() ) ) {
162  return 0.0;
163  }
164 
165  this->estimateError(equilibratedEM, tStep);
166 
167 #ifdef ZZErrorEstimator_ElementResultCashed
168  if ( type == internalStressET ) {
169  return this->eNorms.at( elem->giveNumber() );
170  }
171 
172 #else
173  ZZErrorEstimatorInterface *interface;
174  if ( type == internalStressET ) {
175  double e, s;
176  interface = static_cast< ZZErrorEstimatorInterface * >( elem->giveInterface(ZZErrorEstimatorInterfaceType) );
177  if ( interface ) {
178  interface->ZZErrorEstimatorI_computeElementContributions(e, s, this->normType, tStep);
179  return e;
180  } else {
181  return 0.0;
182  }
183  }
184 
185 #endif
186  return 0.0;
187 }
188 
189 double
191 {
192  this->estimateError(equilibratedEM, tStep);
193  if ( type == globalErrorEEV ) {
194  return this->globalENorm;
195  } else if ( type == globalNormEEV ) {
196  return this->globalSNorm;
197  } else if ( type == relativeErrorEstimateEEV ) {
198  return this->globalErrorEstimate;
199  } else {
200  return 0.0;
201  }
202 }
203 
206 {
207  if ( !this->rc ) {
208  this->rc.reset( new ZZRemeshingCriteria(1, this) );
209  }
210 
211  return this->rc.get();
212 }
213 
214 
217 {
218  IRResultType result; // Required by IR_GIVE_FIELD macro
219  int n;
220 
222  n = 0;
224  if ( n == 1 ) {
225  this->normType = EnergyNorm;
226  } else {
227  this->normType = L2Norm; // default
228  }
229 
230  n = 0;
232  if ( n == 1 ) {
234  } else {
235  this->nodalRecoveryType = ZZRecovery; // default
236  }
237 
238  return this->giveRemeshingCrit()->initializeFrom(ir);
239 }
240 
241 void
244  InternalStateType type,
245  TimeStep *tStep)
246 {
247  int nDofMans;
248  FEInterpolation *interpol = element->giveInterpolation();
249  const FloatArray *recoveredStress;
250  FloatArray sig, lsig, diff, ldiff, n;
251  FloatMatrix nodalRecoveredStreses;
252 
253  nDofMans = element->giveNumberOfDofManagers();
254  // assemble nodal recovered stresses
255  for ( int i = 1; i <= element->giveNumberOfNodes(); i++ ) {
256  element->giveDomain()->giveSmoother()->giveNodalVector( recoveredStress,
257  element->giveDofManager(i)->giveNumber() );
258  if ( i == 1 ) {
259  nodalRecoveredStreses.resize( nDofMans, recoveredStress->giveSize() );
260  }
261  for ( int j = 1; j <= recoveredStress->giveSize(); j++ ) {
262  nodalRecoveredStreses.at(i, j) = recoveredStress->at(j);
263  }
264  }
265  /* Note: The recovered stresses should be in global coordinate system. This is important for shells, for example, to make
266  * sure that forces and moments in the same directions are averaged. For elements where local and global coordina systems
267  * are the same this does not matter.
268  */
269 
270  eNorm = sNorm = 0.0;
271 
272  // compute the e-norm and s-norm
273  if ( norm == ZZErrorEstimator :: L2Norm ) {
274  for ( GaussPoint *gp: *this->ZZErrorEstimatorI_giveIntegrationRule() ) {
275  double dV = element->computeVolumeAround(gp);
276  interpol->evalN( n, gp->giveNaturalCoordinates(), FEIElementGeometryWrapper(element) );
277 
278  diff.beTProductOf(nodalRecoveredStreses, n);
279 
280  element->giveIPValue(sig, gp, type, tStep);
281  /* the internal stress difference is in global coordinate system */
282  diff.subtract(sig);
283 
284  eNorm += diff.computeSquaredNorm() * dV;
285  sNorm += sig.computeSquaredNorm() * dV;
286  }
287  } else if ( norm == ZZErrorEstimator :: EnergyNorm ) {
288  FloatArray help, ldiff_reduced, lsig_reduced;
289  FloatMatrix D, DInv;
290  StructuralElement *selem = static_cast< StructuralElement * >(element);
291 
292  for ( GaussPoint *gp: *this->ZZErrorEstimatorI_giveIntegrationRule() ) {
293  double dV = element->computeVolumeAround(gp);
294  interpol->evalN( n, gp->giveNaturalCoordinates(), FEIElementGeometryWrapper(element) );
295  selem->computeConstitutiveMatrixAt(D, TangentStiffness, gp, tStep);
296  DInv.beInverseOf(D);
297 
298  diff.beTProductOf(nodalRecoveredStreses, n);
299 
300  element->giveIPValue(sig, gp, type, tStep); // returns full value now
301  diff.subtract(sig);
302  /* the internal stress difference is in global coordinate system */
303  /* needs to be transformed into local system to compute associated energy */
304  this->ZZErrorEstimatorI_computeLocalStress(ldiff, diff);
305  StructuralMaterial :: giveReducedSymVectorForm( ldiff_reduced, ldiff, gp->giveMaterialMode() );
306 
307  help.beProductOf(DInv, ldiff_reduced);
308  eNorm += ldiff_reduced.dotProduct(help) * dV;
309  this->ZZErrorEstimatorI_computeLocalStress(lsig, sig);
310  StructuralMaterial :: giveReducedSymVectorForm( lsig_reduced, lsig, gp->giveMaterialMode() );
311  help.beProductOf(DInv, lsig_reduced);
312  sNorm += lsig_reduced.dotProduct(help) * dV;
313  }
314  } else {
315  OOFEM_ERROR("unsupported norm type");
316  }
317 
318  eNorm = sqrt(eNorm);
319  sNorm = sqrt(sNorm);
320 }
321 
322 
324 {
325  this->mode = stressBased;
326  this->stateCounter = 0;
327 }
328 
329 double
331 {
332  double size;
333 
334  this->estimateMeshDensities(tStep);
335  size = this->nodalDensities.at(num);
336  if ( size >= 0 ) {
337  size = max(minElemSize, size);
338  if ( relative ) {
339  return size / this->giveDofManDensity(num);
340  } else {
341  return size;
342  }
343  } else {
344  // size negative -> marks undetermined size
345  return size;
346  }
347 }
348 
349 
352 {
353  this->estimateMeshDensities(tStep);
354  return this->remeshingStrategy;
355 }
356 
357 int
359 {
360  int nelem, nnode, elemPolyOrder, ielemNodes;
361  double globValNorm = 0.0, globValErrorNorm = 0.0, elemErrLimit, eerror, iratio, currDensity, elemSize;
362  EE_ErrorType errorType = indicatorET;
363  double pe, coeff = 2.0;
364 
365  if ( stateCounter == tStep->giveSolutionStateCounter() ) {
366  return 1;
367  }
368 
369  nelem = this->domain->giveNumberOfElements();
370  nnode = this->domain->giveNumberOfDofManagers();
371 
372  //std::vector<char> nodalDensities(nnode);
373  this->nodalDensities.resize(nnode);
374  std :: vector< char > dofManInitFlag(nnode);
375  for ( int i = 0; i < nnode; i++ ) {
376  dofManInitFlag [ i ] = 0;
377  }
378 
379  // compute element error limit based on equally distribution error principle
380  if ( mode == stressBased ) {
381  globValNorm = this->ee->giveValue(globalNormEEV, tStep);
382  globValErrorNorm = this->ee->giveValue(globalErrorEEV, tStep);
383  errorType = internalStressET;
384  } else {
385  OOFEM_ERROR("unknown mode");
386  }
387 
388 
389  // test if solution is allowable
390  pe = sqrt( globValErrorNorm * globValErrorNorm / ( globValErrorNorm * globValErrorNorm + globValNorm * globValNorm ) );
391  if ( pe <= this->requiredError ) {
393  // added by bp
394  /*
395  * for (i=1; i<=nnode; i++) nodalDensities.at(i) = this->giveDofManDensity (i);
396  * stateCounter = tStep->giveSolutionStateCounter();
397  * return 1; // remove to force computing densities
398  */
399  } else {
401  }
402 
403  elemErrLimit = sqrt( ( globValNorm * globValNorm + globValErrorNorm * globValErrorNorm ) / nelem ) *
404  this->requiredError * coeff;
405 
406  for ( auto &elem : domain->giveElements() ) {
407 
408  if ( this->ee->skipRegion( elem->giveRegionNumber() ) ) {
409  continue;
410  }
411 
412  eerror = this->ee->giveElementError(errorType, elem.get(), tStep);
413  iratio = eerror / elemErrLimit;
414  if ( fabs(iratio) < 1.e-3 ) {
415  continue;
416  }
417 
418  if ( iratio > 1.0 ) {
420  }
421 
422  if ( iratio < 0.5 ) {
423  iratio = 0.5;
424  }
425 
426  // if (iratio > 5.0)iratio = 5.0;
427 
428  currDensity = elem->computeMeanSize();
429  elemPolyOrder = elem->giveInterpolation()->giveInterpolationOrder();
430  elemSize = currDensity / pow(iratio, 1.0 / elemPolyOrder);
431 
432  ielemNodes = elem->giveNumberOfDofManagers();
433  for ( int j = 1; j <= ielemNodes; j++ ) {
434  int jnode = elem->giveDofManager(j)->giveNumber();
435  if ( dofManInitFlag [ jnode - 1 ] ) {
436  this->nodalDensities.at(jnode) = min(this->nodalDensities.at(jnode), elemSize);
437  } else {
438  this->nodalDensities.at(jnode) = elemSize;
439  dofManInitFlag [ jnode - 1 ] = 1;
440  }
441  }
442  }
443 
444  // init non-initialized nodes -> those in skip regions
445  for ( int i = 0; i < nnode; i++ ) {
446  if ( dofManInitFlag [ i ] == 0 ) {
447  this->nodalDensities.at(i + 1) = this->giveDofManDensity(i + 1);
448  }
449  }
450 
451  // remember time stamp
453  return 1;
454 }
455 
458 {
459  IRResultType result; // Required by IR_GIVE_FIELD macro
460 
463 
464  return IRRT_OK;
465 }
466 
467 
468 double
470 {
471  int isize;
472  bool init = false;
474  const IntArray *con;
475  double density;
476 
477  con = ct->giveDofManConnectivityArray(num);
478  isize = con->giveSize();
479 
480 #if 0
481  // Minimum density
482  for ( int i = 1; i <= isize; i++ ) {
483  Element *ielem = domain->giveElement( con->at(i) );
484  if (i==1)
485  density = ielem->computeMeanSize();
486  else
487  density = min(density, ielem->computeMeanSize());
488  }
489 #endif
490 
491  // Average density
492 
493  density = 0.0;
494  for ( int i = 1; i <= isize; i++ ) {
495  Element *ielem = domain->giveElement( con->at(i) );
496  init = true;
497  density += ielem->computeMeanSize();
498  }
499  if ( init ) {
500  density /= isize;
501  } else {
502  // the nodal mesh density could not be determined
503  density = -1;
504  }
505 
506  return density;
507 }
508 } // end namespace oofem
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
The base class for all remeshing criteria.
Definition: remeshingcrit.h:61
void subtract(const FloatArray &src)
Subtracts array src to receiver.
Definition: floatarray.C:258
int giveRegionNumber()
Definition: element.C:507
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the array of interpolation functions (shape functions) at given point.
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Definition: femcmpnn.h:82
double globalErrorEstimate
Global error estimate (relative)
double computeMeanSize()
Computes the size of the element defined as its length.
Definition: element.C:1078
virtual double giveRequiredDofManDensity(int num, TimeStep *tStep, int relative=0)
Returns the required mesh size n given dof manager.
int giveNumberOfDofManagers() const
Returns number of dof managers in domain.
Definition: domain.h:432
virtual RemeshingCriteria * giveRemeshingCrit()
Returns reference to associated remeshing criteria.
REGISTER_ErrorEstimator(CombinedZZSIErrorEstimator, EET_CZZSI)
std::unique_ptr< RemeshingCriteria > rc
double globalENorm
Global error norm.
#define _IFT_ZZRemeshingCriteria_minelemsize
virtual void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)=0
Computes constitutive matrix of receiver.
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
int max(int i, int j)
Returns bigger value form two given decimals.
Definition: mathfem.h:71
ConnectivityTable * giveConnectivityTable()
Returns receiver&#39;s associated connectivity table.
Definition: domain.C:1170
EngngModel * giveEngngModel()
Returns engineering model to which receiver is associated.
Definition: domain.C:433
Abstract base class for all finite elements.
Definition: element.h:145
InternalStateType IStype
Internal state type of variable to get internal forces.
EE_ErrorType
Type characterizing different type of element errors.
int giveNumber()
Returns domain number.
Definition: domain.h:266
NodalRecoveryModel * giveSmoother()
Returns the actual Smoother associated to receiver.
Definition: domain.C:1141
int giveNumberOfElements() const
Returns number of elements in domain.
Definition: domain.h:434
Class implementing an array of integers.
Definition: intarray.h:61
int & at(int i)
Coefficient access function.
Definition: intarray.h:103
void setSmoother(NodalRecoveryModel *newSmoother, bool destroyOld=true)
Sets the given smoother as an actual smoother for receiver.
Definition: domain.C:1148
virtual double giveDofManDensity(int num)
Returns existing mesh size for given dof manager.
#define OOFEM_LOG_RELEVANT(...)
Definition: logger.h:126
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
ErrorEstimator * ee
Definition: remeshingcrit.h:64
#define _IFT_ZZRemeshingCriteria_requirederror
Class representing a general abstraction for finite element interpolation class.
Definition: feinterpol.h:132
virtual double giveElementError(EE_ErrorType type, Element *elem, TimeStep *tStep)
Returns the element error.
virtual double giveValue(EE_ValueType type, TimeStep *tStep)
Returns the characteristic value of given type.
Abstract base class for all "structural" finite elements.
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
Definition: element.h:518
static void giveReducedSymVectorForm(FloatArray &answer, const FloatArray &vec, MaterialMode matMode)
Converts the full unsymmetric Voigt vector (2nd order tensor) to reduced form.
virtual RemeshingStrategy giveRemeshingStrategy(TimeStep *tStep)
Determines, if the remeshing is needed, and if needed, the type of strategy used. ...
Element * giveElement(int n)
Service for accessing particular domain fe element.
Definition: domain.C:160
The element interface corresponding to ZZErrorEstimator.
double dotProduct(const FloatArray &x) const
Computes the dot product (or inner product) of receiver and argument.
Definition: floatarray.C:463
#define _IFT_ZZErrorEstimator_recoverytype
StateCounterType giveSolutionStateCounter()
Returns current solution state counter.
Definition: timestep.h:188
#define OOFEM_ERROR(...)
Definition: error.h:61
RemeshingStrategy remeshingStrategy
Remeshing strategy proposed.
double computeSquaredNorm() const
Computes the square of the norm.
Definition: floatarray.C:846
The class representing Zienkiewicz-Zhu remeshing criteria.
Set of elements, boundaries, edges and/or nodes.
Definition: set.h:66
NodalRecoveryType nodalRecoveryType
Nodal recovery type.
Class representing connectivity table.
Wrapper around element definition to provide FEICellGeometry interface.
Definition: feinterpol.h:95
virtual ParallelContext * giveParallelContext(int n)
Returns the parallel context corresponding to given domain (n) and unknown type Default implementatio...
Definition: engngm.C:1745
ZZRemeshingCriteriaModeType mode
Mode of receiver.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
Definition: floatarray.C:676
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: femcmpnn.C:89
NormType
Type of norm used.
void beTProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix^T and anArray.
Definition: floatarray.C:708
double at(int i, int j) const
Coefficient access function.
Definition: floatmatrix.h:176
double requiredError
Required error to obtain.
FloatArray eNorms
Cache storing element norms.
The base class for all error estimation or error indicator algorithms.
#define _IFT_ZZErrorEstimator_normtype
Class representing vector of real numbers.
Definition: floatarray.h:82
RemeshingStrategy
Type representing the remeshing strategy.
Definition: remeshingcrit.h:50
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
const IntArray * giveDofManConnectivityArray(int dofman)
EE_ErrorMode
Type determining whether temporary or equilibrated variables are used for error evaluation.
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
virtual int estimateMeshDensities(TimeStep *tStep)
Estimates the nodal densities.
StateCounterType stateCounter
Actual state counter.
ZZRemeshingCriteria(int n, ErrorEstimator *e)
Constructor.
The Superconvergent Patch Recovery (SPR) nodal recovery model is based on paper of Zienkiewicz and Zh...
double norm(const FloatArray &x)
Definition: floatarray.C:985
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
bool skipRegion(int reg)
Returns nonzero if region has been skipped in error estimation (user option).
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
Definition: floatmatrix.C:1358
virtual int recoverValues(Set elementSet, InternalStateType type, TimeStep *tStep)=0
Recovers the nodal values for all regions.
Class representing the general Input Record.
Definition: inputrecord.h:101
This class provides an communication context for distributed memory parallelism.
virtual int estimateError(EE_ErrorMode mode, TimeStep *tStep)
Estimates the error on associated domain at given time step.
virtual double giveValue(EE_ValueType type, TimeStep *tStep)=0
Returns the characteristic value of given type.
Zienkiewicz-Zhu EE.
virtual void ZZErrorEstimatorI_computeElementContributions(double &eNorm, double &sNorm, ZZErrorEstimator::NormType norm, InternalStateType type, TimeStep *tStep)
Computes the element contributions to global norms.
void addAllElements()
Initialize the element set to contain all elements in the receiver domain.
Definition: set.C:212
virtual Interface * giveInterface(InterfaceType t)
Interface requesting service.
Definition: femcmpnn.h:179
double accumulate(double local)
Accumulates the global value.
FloatArray nodalDensities
Array of nodal mesh densities.
StateCounterType stateCounter
Actual values (densities) state counter.
EE_ValueType
Type characterizing different type of errors.
double globalSNorm
Global norm of quantity which error is evaluated.
int min(int i, int j)
Returns smaller value from two given decimals.
Definition: mathfem.h:59
std::vector< std::unique_ptr< Element > > & giveElements()
Definition: domain.h:279
NormType normType
Type of norm used.
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:78
int giveSize() const
Definition: intarray.h:203
int giveSize() const
Returns the size of receiver.
Definition: floatarray.h:218
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual double giveElementError(EE_ErrorType type, Element *elem, TimeStep *tStep)=0
Returns the element error.
#define IR_GIVE_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:69
int giveNumber() const
Definition: femcmpnn.h:107
The base class for all recovery models, which perform nodal averaging or projection processes for int...
void beInverseOf(const FloatMatrix &src)
Modifies receiver to become inverse of given parameter.
Definition: floatmatrix.C:835
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
The nodal recovery model based on paper of Zienkiewicz and Zhu "A Simple Estimator and Adaptive Proce...
void resize(int s)
Resizes receiver towards requested size.
Definition: floatarray.C:631
double minElemSize
Minimum element size allowed.

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