OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
idmnl1.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 "idmnl1.h"
36 #include "gausspoint.h"
37 #include "floatmatrix.h"
38 #include "floatarray.h"
39 #include "mathfem.h"
40 #include "../sm/Elements/structuralelement.h"
41 #include "sparsemtrx.h"
42 #include "error.h"
43 #include "nonlocalmaterialext.h"
44 #include "contextioerr.h"
45 #include "stressvector.h"
46 #include "strainvector.h"
47 #include "classfactory.h"
48 #include "dynamicinputrecord.h"
49 #include "datastream.h"
50 #include "unknownnumberingscheme.h"
51 
52 #ifdef __OOFEG
53  #include "oofeggraphiccontext.h"
54  #include "connectivitytable.h"
55 #endif
56 
57 namespace oofem {
58 REGISTER_Material(IDNLMaterial);
59 
61  //
62  // constructor
63  //
64 {}
65 
66 
68 //
69 // destructor
70 //
71 { }
72 
73 void
75 {
76  /* Implements the service updating local variables in given integration points,
77  * which take part in nonlocal average process. Actually, no update is necessary,
78  * because the value used for nonlocal averaging is strain vector used for nonlocal secant stiffness
79  * computation. It is therefore necessary only to store local strain in corresponding status.
80  * This service is declared at StructuralNonlocalMaterial level.
81  */
82  FloatArray SDstrainVector;
83  double equivStrain;
84  IDNLMaterialStatus *nlstatus = static_cast< IDNLMaterialStatus * >( this->giveStatus(gp) );
85 
86  this->initTempStatus(gp);
87 
88  // subtract stress-independent part
89  // note: eigenStrains (temperature) is not contained in mechanical strain stored in gp
90  // therefore it is necessary to subtract always the total eigenstrain value
91  this->giveStressDependentPartOfStrainVector(SDstrainVector, gp, strainVector, tStep, VM_Total);
92 
93  // compute and store the local variable to be averaged
94  // (typically the local equivalent strain)
95  nlstatus->letTempStrainVectorBe(SDstrainVector);
96  this->computeLocalEquivalentStrain(equivStrain, SDstrainVector, gp, tStep);
97 
98  // nonstandard formulation based on averaging of compliance parameter gamma
99  // note: gamma is stored in a variable named localEquivalentStrainForAverage, which can be misleading
100  // perhaps this variable should later be renamed
101  if ( averagedVar == AVT_Compliance ) {
102  double gamma = complianceFunction(equivStrain, gp);
103  nlstatus->setLocalEquivalentStrainForAverage(gamma);
104  }
105  // nonstandard formulation based on averaging of damage variable omega
106  // note: omega is stored in a variable named localEquivalentStrainForAverage, which can be misleading
107  // perhaps this variable should later be renamed
108  else if ( averagedVar == AVT_Damage ) {
109  double omega = damageFunction(equivStrain, gp);
110  nlstatus->setLocalEquivalentStrainForAverage(omega);
111  }
112  // standard formulation based on averaging of equivalent strain
113  else {
114  nlstatus->setLocalEquivalentStrainForAverage(equivStrain);
115  }
116 
117  // influence of damage on weight function
118  if ( averType >= 2 && averType <= 6 ) {
120  }
121 }
122 
123 double
125 {
126  IDNLMaterialStatus *status = static_cast< IDNLMaterialStatus * >( this->giveStatus(gp) );
127  double damage = status->giveTempDamage();
128  if ( damage == 0. ) {
129  damage = status->giveDamage();
130  }
131  return damage;
132 }
133 
134 void
135 IDNLMaterial :: computeAngleAndSigmaRatio(double &nx, double &ny, double &ratio, GaussPoint *gp, bool &flag)
136 {
137  IDNLMaterialStatus *status = static_cast< IDNLMaterialStatus * >( this->giveStatus(gp) );
138  MaterialMode matMode = gp->giveMaterialMode();
139  if ( matMode != _PlaneStress ) { //Check if the stress-based approach can be applied
140  OOFEM_ERROR("Stress-based nonlocal averaging is implemented for plane stress only");
141  }
142 
143  //Get the temporary strain vector
144  FloatArray strainFloatArray = status->giveTempStrainVector();
145 
146  /* This old implementation could be generalized more easily to arbitrary types of stress,
147  * but for plane stress we use a more efficient direct implementation
148  * (note that the stress-based nonlocal model is very expensive and these operations are repeated many times)
149  *
150  * //Check if strain vector is zero. In this case this function is not going to modify nonlocal radius
151  * if ( strainFloatArray.computeNorm() == 0 ) {
152  * flag = false;
153  * return;
154  * }
155  * //Convert the FloatArray to StrainVector
156  * StrainVector strain(strainFloatArray, matMode);
157  * //Compute effective Stress tensor
158  * StressVector effectiveStress(matMode);
159  * const double E = this->giveLinearElasticMaterial()->give('E', gp);
160  * const double nu = this->giveLinearElasticMaterial()->give('n', gp);
161  * strain.applyElasticStiffness(effectiveStress, E, nu);
162  * //Compute principal values and eigenvectors of effective stress tensor
163  * FloatArray principalStress;
164  * FloatMatrix princDir;
165  * effectiveStress.computePrincipalValDir(principalStress, princDir);
166  * //Calculate components of the first eigenvector
167  * nx = princDir.at(1, 1);
168  * ny = princDir.at(2, 1);
169  * //Calculate ratio of principal stresses
170  * if ( principalStress.at(2) < 0. && principalStress.at(1) < 0. ) { //Both eigenvalues negative
171  * ratio = 1.;
172  * flag = false; // modification of nonlocal weights not done under biaxial compression
173  * } else if ( principalStress.at(2) < 0. ) { //One eigenvalue positive
174  * ratio = 0.;
175  * } else {
176  * ratio = principalStress.at(2) / principalStress.at(1); //Both eigenvalues positive
177  * }
178  */
179 
180  /* New implementation, directly finds the eigenvalues and eigenvector using an optimized scheme for plane stress */
181  double epsx = strainFloatArray.at(1);
182  double epsy = strainFloatArray.at(2);
183  double gamxy = strainFloatArray.at(3);
184  //Check if strain vector is zero. In this case this function is not going to modify nonlocal radius
185  if ( epsx == 0. && epsy == 0. && gamxy == 0. ) {
186  flag = false;
187  return;
188  }
189  double aux = sqrt( ( epsx - epsy ) * ( epsx - epsy ) + gamxy * gamxy );
190  double e1 = epsx + epsy + aux; // e1 = 2 times the maximum principal strain
191  double e2 = epsx + epsy - aux; // e2 = 2 times the minimum principal strain
192  const double nu = this->giveLinearElasticMaterial()->give('n', gp);
193  double s1 = e1 + nu * e2; // s1 = 2*(1-nu*nu)/E times the maximum principal stress
194  double s2 = e2 + nu * e1; // s2 = 2*(1-nu*nu)/E times the minimum principal stress
195 
196  //Calculate ratio of principal stresses
197  if ( s1 <= 0. ) { //No positive eigenvalue
198  ratio = 1.;
199  flag = false; // modification of nonlocal weights not done under biaxial compression
200  } else if ( s2 <= 0. ) { //One positive eigenvalue
201  ratio = 0.;
202  } else {
203  ratio = s2 / s1; //Two positive eigenvalues
204  }
205 
206  //Calculate components of the first eigenvector
207  nx = gamxy;
208  ny = e1 - 2. * epsx;
209  aux = nx * nx + ny * ny;
210  if ( aux == 0. ) {
211  nx = e1 - 2. * epsy;
212  ny = gamxy;
213  aux = nx * nx + ny * ny;
214  if ( aux == 0. ) {
215  nx = 1.;
216  ny = 0.;
217  return;
218  }
219  }
220  aux = sqrt(aux);
221  nx /= aux;
222  ny /= aux;
223 }
224 
225 double
226 IDNLMaterial :: computeStressBasedWeight(double &nx, double &ny, double &ratio, GaussPoint *gp, GaussPoint *jGp, double weight)
227 {
228  // Take into account periodicity, if required
229  if ( this->px > 0. ) {
230  return computeStressBasedWeightForPeriodicCell(nx, ny, ratio, gp, jGp);
231  }
232 
233  //Check if source and receiver point coincide
234  if ( gp == jGp ) {
235  return weight;
236  }
237  //Compute distance between source and receiver point
238  FloatArray gpCoords, distance;
240  jGp->giveElement()->computeGlobalCoordinates( distance, jGp->giveNaturalCoordinates() );
241  distance.subtract(gpCoords); // Vector connecting the two Gauss points
242 
243  //Compute modified distance
244  double x1 = nx * distance.at(1) + ny *distance.at(2);
245  double x2 = -ny *distance.at(1) + nx *distance.at(2);
246  // Compute axis of ellipse and scale/stretch weak axis so that ellipse is converted to circle
247  double gamma = this->beta + ( 1. - beta ) * ratio * ratio;
248  x2 /= gamma;
249  double modDistance = sqrt(x1 * x1 + x2 * x2);
250 
251  //Get new weight
252  double updatedWeight = this->computeWeightFunction(modDistance);
253  updatedWeight *= jGp->giveElement()->computeVolumeAround(jGp); //weight * (Volume where the weight is applied)
254  return updatedWeight;
255 }
256 
257 // This method is a slight modification of IDNLMaterial :: computeStressBasedWeight but is implemented separately,
258 // to keep the basic method as simple (and efficient) as possible
259 double
260 IDNLMaterial :: computeStressBasedWeightForPeriodicCell(double &nx, double &ny, double &ratio, GaussPoint *gp, GaussPoint *jGp)
261 {
262  double updatedWeight = 0.;
263  FloatArray gpCoords, distance;
265  int ix, nper = 1; // could be increased in the future, if needed
266 
267  for ( ix = -nper; ix <= nper; ix++ ) { // loop over periodic images shifted in x-direction
268  jGp->giveElement()->computeGlobalCoordinates( distance, jGp->giveNaturalCoordinates() );
269  distance.at(1) += ix * px; // shift the x-coordinate
270  distance.subtract(gpCoords); // Vector connecting the two Gauss points
271 
272  //Compute modified distance
273  double x1 = nx * distance.at(1) + ny *distance.at(2);
274  double x2 = -ny *distance.at(1) + nx *distance.at(2);
275  // Compute axis of ellipse and scale/stretch weak axis so that ellipse is converted to circle
276  double gamma = this->beta + ( 1. - beta ) * ratio * ratio;
277  x2 /= gamma;
278  double modDistance = sqrt(x1 * x1 + x2 * x2);
279 
280  //Get new weight
281  double updatedWeightContribution = this->computeWeightFunction(modDistance);
282  if ( updatedWeightContribution > 0. ) {
283  updatedWeightContribution *= jGp->giveElement()->computeVolumeAround(jGp); //weight * (Volume where the weight is applied)
284  updatedWeight += updatedWeightContribution;
285  }
286  }
287  return updatedWeight;
288 }
289 
290 void
291 IDNLMaterial :: computeEquivalentStrain(double &kappa, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep)
292 {
293  double nonlocalContribution, nonlocalEquivalentStrain = 0.0;
294  IDNLMaterialStatus *nonlocStatus, *status = static_cast< IDNLMaterialStatus * >( this->giveStatus(gp) );
295 
296  this->buildNonlocalPointTable(gp);
297  this->updateDomainBeforeNonlocAverage(tStep);
298 
299  // compute nonlocal equivalent strain
300  // or nonlocal compliance variable gamma (depending on averagedVar)
301 
302  auto list = this->giveIPIntegrationList(gp); // !
303 
304  double sigmaRatio = 0.; //ratio sigma2/sigma1 used for stress-based averaging
305  double nx, ny; //components of the first principal stress direction (for stress-based averaging)
306  double updatedIntegrationVolume = 0.; //new integration volume. Sum of all new weights used for stress-based averaging
307  //Flag to deactivate stress-based nonlocal averaging for zero stress states.
308  // When SBAflag is not set, no stress-based averaging takes place.
309  // When SBAflag is set, stress-based averaging takes place.
310  bool SBAflag = ( this->nlvar == NLVT_StressBased );
311  //Check if Stress based averaging is enforced and calculate the angle of the first eigenvector and the sigmaratio
312  if ( SBAflag ) {
313  computeAngleAndSigmaRatio(nx, ny, sigmaRatio, gp, SBAflag);
314  }
315 
316  //Loop over all Gauss points which are in gp's integration domain
317  for ( auto &lir : *list ) {
318  GaussPoint *neargp = lir.nearGp;
319  nonlocStatus = static_cast< IDNLMaterialStatus * >( neargp->giveMaterialStatus() );
320  nonlocalContribution = nonlocStatus->giveLocalEquivalentStrainForAverage();
321  if ( SBAflag ) { //Check if Stress Based Averaging is requested and calculate nonlocal contribution
322  double stressBasedWeight = computeStressBasedWeight(nx, ny, sigmaRatio, gp, neargp, lir.weight); //Compute new weight
323  updatedIntegrationVolume += stressBasedWeight;
324  nonlocalContribution *= stressBasedWeight;
325  } else {
326  nonlocalContribution *= lir.weight;
327  }
328 
329  nonlocalEquivalentStrain += nonlocalContribution;
330  }
331 
332  if ( SBAflag ) { // Nonlocal weights are modified in stress-based averaging. Thus the integration volume needs to be modified
333  //status->setIntegrationScale(updatedIntegrationVolume);
334  nonlocalEquivalentStrain /= updatedIntegrationVolume;
335  } else if ( scaling == ST_Standard ) { // standard rescaling
336  nonlocalEquivalentStrain *= 1. / status->giveIntegrationScale();
337  } else if ( scaling == ST_Borino ) { // Borino modification
338  double scale = status->giveIntegrationScale();
339  if ( scale > 1. ) {
340  nonlocalEquivalentStrain *= 1. / scale;
341  } else {
342  nonlocalEquivalentStrain += ( 1. - scale ) * status->giveLocalEquivalentStrainForAverage();
343  }
344  }
345 
346 
347  // undernonlocal or overnonlocal formulation
348  if ( mm != 1. ) {
349  double localEquivalentStrain = status->giveLocalEquivalentStrainForAverage();
350  if ( mm >= 0. ) { // harmonic averaging
351  if ( localEquivalentStrain > 0. && nonlocalEquivalentStrain > 0. ) {
352  nonlocalEquivalentStrain = 1. / ( mm / nonlocalEquivalentStrain + ( 1. - mm ) / localEquivalentStrain );
353  } else {
354  nonlocalEquivalentStrain = 0.;
355  }
356  } else { // arithmetic averaging, -mm is used instead of mm
357  nonlocalEquivalentStrain = -mm * nonlocalEquivalentStrain + ( 1. + mm ) * localEquivalentStrain;
358  }
359  }
360 
361  this->endIPNonlocalAverage(gp); // ???????????????????
362 
363  kappa = nonlocalEquivalentStrain;
364 }
365 
366 Interface *
368 {
370  return static_cast< StructuralNonlocalMaterialExtensionInterface * >(this);
371  } else if ( type == NonlocalMaterialStiffnessInterfaceType ) {
372  return static_cast< NonlocalMaterialStiffnessInterface * >(this);
373  } else if ( type == MaterialModelMapperInterfaceType ) {
374  return static_cast< MaterialModelMapperInterface * >(this);
375  } else {
376  return NULL;
377  }
378 }
379 
380 
383 {
384  IRResultType result; // Required by IR_GIVE_FIELD macro
385 
387  if ( result != IRRT_OK ) {
388  return result;
389  }
391  if ( result != IRRT_OK ) {
392  return result;
393  }
394 
395  return IRRT_OK;
396 }
397 
398 
399 void
401 {
404 }
405 
406 void
407 IDNLMaterial :: computeDamageParam(double &omega, double kappa, const FloatArray &strain, GaussPoint *g)
408 {
409  if ( averagedVar == AVT_Compliance ) {
410  // formulation based on nonlocal gamma (here formally called kappa)
411  omega = kappa / ( 1. + kappa );
412  } else if ( averagedVar == AVT_Damage ) {
413  // formulation based on nonlocal damage (here formally called kappa)
414  omega = kappa;
415  } else {
416  // formulation based on nonlocal equivalent strain
417  omega = damageFunction(kappa, g);
418  }
419 }
420 
421 void
423  GaussPoint *gp, TimeStep *tStep)
424 {
425  double coeff;
426  IDNLMaterialStatus *status = static_cast< IDNLMaterialStatus * >( this->giveStatus(gp) );
427  auto list = status->giveIntegrationDomainList();
428  IDNLMaterial *rmat;
429  FloatArray rcontrib, lcontrib;
430  IntArray loc, rloc;
431 
432  FloatMatrix contrib;
433 
434  if ( this->giveLocalNonlocalStiffnessContribution(gp, loc, s, lcontrib, tStep) == 0 ) {
435  return;
436  }
437 
438  for ( auto &lir : *list ) {
439  rmat = dynamic_cast< IDNLMaterial * >( lir.nearGp->giveMaterial() );
440  if ( rmat ) {
441  rmat->giveRemoteNonlocalStiffnessContribution(lir.nearGp, rloc, s, rcontrib, tStep);
442  coeff = gp->giveElement()->computeVolumeAround(gp) * lir.weight / status->giveIntegrationScale();
443  // printf ("\nelement %d:", gp->giveElement()->giveNumber());
444  // lcontrib.printYourself();
445  // rcontrib.printYourself();
446  // assemble the contribution
447  // dest.checkSizeTowards (loc, rloc);
448  // dest.assemble (lcontrib,loc, rcontrib,rloc);
449 
450  /* local effective assembly
451  * int i,j, r, c;
452  * for (i=1; i<= loc.giveSize(); i++)
453  * for (j=1; j<=rloc.giveSize(); j++) {
454  * r = loc.at(i);
455  * c = rloc.at(j);
456  * if ((r != 0) && (c!=0)) dest.at(r,c) -= (double) (lcontrib.at(i)*rcontrib.at(j)*coeff);
457  * }
458  */
459  contrib.clear();
460  contrib.plusDyadUnsym(lcontrib, rcontrib, -1.0 * coeff);
461  dest.assemble(loc, rloc, contrib);
462  }
463  }
464 }
465 
466 std :: vector< localIntegrationRecord > *
468 {
469  IDNLMaterialStatus *status = static_cast< IDNLMaterialStatus * >( this->giveStatus(gp) );
470  this->buildNonlocalPointTable(gp);
471  return status->giveIntegrationDomainList();
472 }
473 
474 
475 
476 int
478 {
479  IDNLMaterialStatus *status = static_cast< IDNLMaterialStatus * >( this->giveStatus(gp) );
480  if ( type == IST_LocalEquivalentStrain ) {
481  answer.resize(1);
482  answer.zero();
483  answer.at(1) = status->giveLocalEquivalentStrainForAverage();
484  } else {
485  return IsotropicDamageMaterial1 :: giveIPValue(answer, gp, type, tStep);
486  }
487 
488  return 1; // to make the compiler happy
489 }
490 
491 
492 #ifdef __OOFEG
493 void
495 {
496  IntArray loc, rloc;
497  FloatArray strain;
498  double f, equivStrain;
499  IDNLMaterialStatus *status = static_cast< IDNLMaterialStatus * >( this->giveStatus(gp) );
500  IDNLMaterial *rmat;
501 
502  const double e0 = this->give(e0_ID, gp);
503  //const double ef = this->give(ef_ID, gp);
504 
505  strain = status->giveTempStrainVector();
506  // compute equivalent strain
507  this->computeEquivalentStrain(equivStrain, strain, gp, tStep);
508  f = equivStrain - status->giveTempKappa();
509 
510  if ( ( equivStrain <= e0 ) || ( f < 0.0 ) ) {
511  return;
512  }
513 
514  EASValsSetLineWidth(OOFEG_SPARSE_PROFILE_WIDTH);
515  EASValsSetColor( gc.getExtendedSparseProfileColor() );
516  EASValsSetLayer(OOFEG_SPARSE_PROFILE_LAYER);
517  EASValsSetFillStyle(FILL_SOLID);
518 
519  WCRec p [ 4 ];
520  GraphicObj *go;
521 
523 
524  int n, m;
525  auto list = status->giveIntegrationDomainList();
526  for ( auto &lir : *list ) {
527  rmat = dynamic_cast< IDNLMaterial * >( lir.nearGp->giveMaterial() );
528  if ( rmat ) {
529  lir.nearGp->giveElement()->giveLocationArray( rloc, EModelDefaultEquationNumbering() );
530  } else {
531  continue;
532  }
533 
534  n = loc.giveSize();
535  m = rloc.giveSize();
536  for ( int i = 1; i <= n; i++ ) {
537  if ( loc.at(i) == 0 ) {
538  continue;
539  }
540 
541  for ( int j = 1; j <= m; j++ ) {
542  if ( rloc.at(j) == 0 ) {
543  continue;
544  }
545 
546  if ( gc.getSparseProfileMode() == 0 ) {
547  p [ 0 ].x = ( FPNum ) loc.at(i) - 0.5;
548  p [ 0 ].y = ( FPNum ) rloc.at(j) - 0.5;
549  p [ 0 ].z = 0.;
550  p [ 1 ].x = ( FPNum ) loc.at(i) + 0.5;
551  p [ 1 ].y = ( FPNum ) rloc.at(j) - 0.5;
552  p [ 1 ].z = 0.;
553  p [ 2 ].x = ( FPNum ) loc.at(i) + 0.5;
554  p [ 2 ].y = ( FPNum ) rloc.at(j) + 0.5;
555  p [ 2 ].z = 0.;
556  p [ 3 ].x = ( FPNum ) loc.at(i) - 0.5;
557  p [ 3 ].y = ( FPNum ) rloc.at(j) + 0.5;
558  p [ 3 ].z = 0.;
559  go = CreateQuad3D(p);
560  EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | LAYER_MASK, go);
561  EMAddGraphicsToModel(ESIModel(), go);
562  } else {
563  p [ 0 ].x = ( FPNum ) loc.at(i);
564  p [ 0 ].y = ( FPNum ) rloc.at(j);
565  p [ 0 ].z = 0.;
566 
567  EASValsSetMType(SQUARE_MARKER);
568  go = CreateMarker3D(p);
569  EGWithMaskChangeAttributes(COLOR_MASK | LAYER_MASK | VECMTYPE_MASK, go);
570  EMAddGraphicsToModel(ESIModel(), go);
571  }
572  }
573  }
574  }
575 }
576 #endif
577 
578 
579 
580 
581 int
583  FloatArray &lcontrib, TimeStep *tStep)
584 {
585  int nrows, nsize;
586  double sum, f, equivStrain;
587  IDNLMaterialStatus *status = static_cast< IDNLMaterialStatus * >( this->giveStatus(gp) );
588  StructuralElement *elem = static_cast< StructuralElement * >( gp->giveElement() );
589  FloatMatrix b, de;
590  FloatArray stress, strain;
591 
592  const double e0 = this->give(e0_ID, gp);
593  const double ef = this->give(ef_ID, gp);
594 
595  /*
596  * if (fabs(status->giveTempDamage()) <= 1.e-10) {
597  * // already eleastic regime
598  * loc.clear();
599  * return 0;
600  * }
601  */
602  strain = status->giveTempStrainVector();
603 
604  // compute equivalent strain
605  this->computeEquivalentStrain(equivStrain, strain, gp, tStep);
606  f = equivStrain - status->giveTempKappa();
607 
608  if ( ( equivStrain <= e0 ) || ( f < 0.0 ) ) {
609  /*
610  * if (status->lst == IDNLMaterialStatus::LST_elastic)
611  * printf (" ");
612  * else printf ("_");
613  * status->lst = IDNLMaterialStatus::LST_elastic;
614  */
615  loc.clear();
616  return 0;
617  } else {
618  if ( status->giveDamage() >= 1.00 ) {
619  // printf ("f");
620  return 0;
621  }
622 
623  /*
624  * if (status->lst == IDNLMaterialStatus::LST_loading)
625  * printf ("o");
626  * else printf ("O");
627  * status->lst = IDNLMaterialStatus::LST_loading;
628  */
629 
630  // no support for reduced integration now
631  elem->computeBmatrixAt(gp, b);
632 
634  lmat->giveStiffnessMatrix(de, SecantStiffness, gp, tStep);
635  stress.beProductOf(de, strain);
636 
637  f = ( e0 / ( equivStrain * equivStrain ) ) * exp( -( equivStrain - e0 ) / ( ef - e0 ) )
638  + ( e0 / equivStrain ) * exp( -( equivStrain - e0 ) / ( ef - e0 ) ) * 1.0 / ( ef - e0 );
639 
640  nrows = b.giveNumberOfColumns();
641  nsize = stress.giveSize();
642  lcontrib.resize(nrows);
643  for ( int i = 1; i <= nrows; i++ ) {
644  sum = 0.0;
645  for ( int j = 1; j <= nsize; j++ ) {
646  sum += b.at(j, i) * stress.at(j);
647  }
648 
649  lcontrib.at(i) = sum * f;
650  }
651  }
652 
653  // request element code numbers
654  elem->giveLocationArray(loc, s);
655 
656  return 1;
657 }
658 
659 
660 void
662  FloatArray &rcontrib, TimeStep *tStep)
663 {
664  int ncols, nsize;
665  double coeff = 0.0, sum;
666  IDNLMaterialStatus *status = static_cast< IDNLMaterialStatus * >( this->giveStatus(gp) );
667  StructuralElement *elem = static_cast< StructuralElement * >( gp->giveElement() );
668  FloatMatrix b, de, princDir(3, 3), t;
669  FloatArray stress, fullStress, strain, principalStress, help, nu;
670 
671  elem->giveLocationArray(rloc, s);
672  // no support for reduced integration now
673  elem->computeBmatrixAt(gp, b);
674 
675  if ( this->equivStrainType == EST_Rankine_Standard ) {
676  FloatArray fullHelp;
678 
679  lmat->giveStiffnessMatrix(de, SecantStiffness, gp, tStep);
680  strain = status->giveTempStrainVector();
681  stress.beProductOf(de, strain);
683  if ( gp->giveMaterialMode() == _1dMat ) {
684  principalStress = fullStress;
685  } else {
686  this->computePrincipalValDir(principalStress, princDir, fullStress, principal_stress);
687  if ( ( gp->giveMaterialMode() == _3dMat ) || ( gp->giveMaterialMode() == _PlaneStrain ) ) {
688  ;
689  } else if ( gp->giveMaterialMode() == _PlaneStress ) {
690  // force the out-of-plane princ. dir to be last one
691  int indx = 0, zeroFlag = 1;
692  double swap;
693  for ( int i = 1; i <= 3; i++ ) {
694  if ( fabs( principalStress.at(i) ) > 1.e-10 ) {
695  zeroFlag = 0;
696  }
697 
698  if ( princDir.at(3, i) > 0.90 ) {
699  indx = i;
700  }
701  }
702 
703  if ( indx ) {
704  for ( int i = 1; i <= 3; i++ ) {
705  swap = princDir.at(i, indx);
706  princDir.at(i, indx) = princDir.at(i, 3);
707  princDir.at(i, 3) = swap;
708  }
709 
710  swap = principalStress.at(indx);
711  principalStress.at(indx) = principalStress.at(3);
712  principalStress.at(3) = swap;
713  } else if ( zeroFlag == 0 ) {
714  OOFEM_ERROR("internal error");
715  }
716  } else {
717  OOFEM_ERROR("equivStrainType not supported");
718  }
719  }
720 
721  sum = 0.0;
722  for ( int i = 1; i <= 3; i++ ) {
723  if ( principalStress.at(i) > 0.0 ) {
724  sum += principalStress.at(i) * principalStress.at(i);
725  }
726  }
727 
728  if ( sum > 1.e-15 ) {
729  coeff = 1. / ( lmat->give('E', gp) * sqrt(sum) );
730  } else {
731  coeff = 0.0;
732  }
733 
734  //
735  if ( gp->giveMaterialMode() != _1dMat ) {
736  this->giveStressVectorTranformationMtrx(t, princDir, 0);
737  }
738 
739  //
740  // if (gp->giveMaterialMode() != _1dMat) this->giveStressVectorTranformationMtrx (t, princDir,1);
741 
742  // extract positive part
743  for ( int i = 1; i <= principalStress.giveSize(); i++ ) {
744  principalStress.at(i) = max(principalStress.at(i), 0.0);
745  }
746 
747 #if 0
748  this->giveNormalElasticStiffnessMatrix(den, SecantStiffness, gp, tStep);
749  help.beProductOf(den, principalStress);
750  fullHelp.resize(6);
751  for ( i = 1; i <= 3; i++ ) {
752  fullHelp.at(i) = help.at(i);
753  }
754 
755  if ( gp->giveMaterialMode() != _1dMat ) {
756  fullNu.beProductOf(t, fullHelp);
757  //fullNu.beTProductOf (t, fullHelp);
758  crossSection->giveReducedCharacteristicVector(nu, gp, fullNu);
759  } else {
760  nu = help;
761  }
762 
763 #endif
764 
765  /* Plane stress optimized version
766  *
767  *
768  * help.resize (3); help.zero();
769  * for (i=1; i<=3; i++) {
770  * help.at(1) += t.at(i,1)*principalStress.at(i);
771  * help.at(2) += t.at(i,2)*principalStress.at(i);
772  * help.at(3) += t.at(i,6)*principalStress.at(i);
773  * }
774  */
775  FloatArray fullPrincStress(6);
776  fullPrincStress.zero();
777  for ( int i = 1; i <= 3; i++ ) {
778  fullPrincStress.at(i) = principalStress.at(i);
779  }
780 
781  fullHelp.beTProductOf(t, fullPrincStress);
783 
784  nu.beProductOf(de, help);
785  } else if ( this->equivStrainType == EST_ElasticEnergy ) {
786  double equivStrain;
787 
789  lmat->giveStiffnessMatrix(de, SecantStiffness, gp, tStep);
790  strain = status->giveTempStrainVector();
791  stress.beProductOf(de, strain);
792  this->computeLocalEquivalentStrain(equivStrain, strain, gp, tStep);
793 
794  nu = stress;
795  coeff = 1.0 / ( lmat->give('E', gp) * equivStrain );
796  } else {
797  OOFEM_ERROR("equivStrainType not supported");
798  }
799 
800 
801  ncols = b.giveNumberOfColumns();
802  nsize = nu.giveSize();
803  rcontrib.resize(ncols);
804  for ( int i = 1; i <= ncols; i++ ) {
805  sum = 0.0;
806  for ( int j = 1; j <= nsize; j++ ) {
807  sum += nu.at(j) * b.at(j, i);
808  }
809 
810  rcontrib.at(i) = sum * coeff;
811  }
812 }
813 
814 
815 void
817  MatResponseMode rMode,
818  GaussPoint *gp, TimeStep *tStep)
819 {
820  //
821  // return Elastic Stiffness matrix for normal Stresses
823  FloatMatrix de;
824 
825  lMat->give3dMaterialStiffnessMatrix(de, rMode, gp, tStep);
826  // This isn't used? Do we need one with zeroed entries (below) or the general 3d stiffness (above)?
827  //lMat->giveCharacteristicMatrix(de, rMode, gp, tStep);
828  //StructuralMaterial :: giveFullSymMatrixForm( de, deRed, gp->giveMaterialMode());
829 
830  answer.resize(3, 3);
831  // copy first 3x3 submatrix to answer
832  for ( int i = 1; i <= 3; i++ ) {
833  for ( int j = 1; j <= 3; j++ ) {
834  answer.at(i, j) = de.at(i, j);
835  }
836  }
837 }
838 
839 
842 {
844 }
845 
846 
848 { }
849 
850 
851 void
853 {
855  fprintf(file, "status { ");
856  if ( this->damage > 0.0 ) {
857  fprintf(file, "nonloc-kappa %f, damage %f ", this->kappa, this->damage);
858 
859 #ifdef keep_track_of_dissipated_energy
860  fprintf(file, ", dissW %f, freeE %f, stressW %f ", this->dissWork, ( this->stressWork ) - ( this->dissWork ), this->stressWork);
861  } else {
862  fprintf(file, "stressW %f ", this->stressWork);
863 #endif
864  }
865 
866  fprintf(file, "}\n");
867 }
868 
869 void
871 //
872 // initializes temp variables according to variables form previous equilibrium state.
873 // builds new crackMap
874 //
875 {
877 }
878 
879 
880 
881 void
883 //
884 // updates variables (nonTemp variables describing situation at previous equilibrium state)
885 // after a new equilibrium state has been reached
886 // temporary variables are having values corresponding to newly reched equilibrium.
887 //
888 {
890 }
891 
892 
893 
896 //
897 // saves full information stored in this Status
898 // no temp variables stored
899 //
900 {
901  contextIOResultType iores;
902  // save parent class status
903  if ( ( iores = IsotropicDamageMaterial1Status :: saveContext(stream, mode, obj) ) != CIO_OK ) {
904  THROW_CIOERR(iores);
905  }
906 
907  //if (!stream.write(&localEquivalentStrainForAverage,1)) THROW_CIOERR(CIO_IOERR);
908  return CIO_OK;
909 }
910 
913 //
914 // restores full information stored in stream to this Status
915 //
916 {
917  contextIOResultType iores;
918  // read parent class status
919  if ( ( iores = IsotropicDamageMaterial1Status :: restoreContext(stream, mode, obj) ) != CIO_OK ) {
920  THROW_CIOERR(iores);
921  }
922 
923  // read raw data
924  //if (!stream.read (&localEquivalentStrainForAverage,1)) THROW_CIOERR(CIO_IOERR);
925 
926  return CIO_OK;
927 }
928 
929 Interface *
931 {
933  return static_cast< StructuralNonlocalMaterialStatusExtensionInterface * >(this);
934  } else {
936  }
937 }
938 
939 
940 int
942 {
943  IDNLMaterialStatus *status = static_cast< IDNLMaterialStatus * >( this->giveStatus(ip) );
944 
945  this->buildNonlocalPointTable(ip);
946  this->updateDomainBeforeNonlocAverage(tStep);
947 
948  return buff.write( status->giveLocalEquivalentStrainForAverage() );
949 }
950 
951 int
953 {
954  int result;
955  IDNLMaterialStatus *status = static_cast< IDNLMaterialStatus * >( this->giveStatus(ip) );
957 
958  result = buff.read(localEquivalentStrainForAverage);
959  status->setLocalEquivalentStrainForAverage(localEquivalentStrainForAverage);
960  return result;
961 }
962 
963 int
965 {
966  //
967  // Note: status localStrainVectorForAverage memeber must be properly sized!
968  //
969 
970  //IDNLMaterialStatus *status = (IDNLMaterialStatus*) this -> giveStatus (ip);
971 
972  return buff.givePackSizeOfDouble(1);
973 }
974 
975 
976 double
978 {
979  //
980  // The values returned come from measurement
981  // do not change them unless you know what are you doing
982  //
983  double cost = 1.2;
984 
985 
986  if ( gp->giveMaterialMode() == _3dMat ) {
987  cost = 1.5;
988  }
989 
990  IDNLMaterialStatus *status = static_cast< IDNLMaterialStatus * >( this->giveStatus(gp) );
991  int size = status->giveIntegrationDomainList()->size();
992  // just a guess (size/10) found optimal
993  // cost *= (1.0 + (size/10)*0.5);
994  cost *= ( 1.0 + size / 15.0 );
995 
996  return cost;
997 }
998 } // end namespace oofem
double damageFunction(double kappa, GaussPoint *gp)
Returns the value of damage parameter corresponding to a given value of the damage-driving variable k...
Definition: idm1.C:968
virtual Interface * giveInterface(InterfaceType it)
Interface requesting service.
Definition: idm1.C:1467
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
Abstract base class for all nonlocal structural materials.
double giveDamage()
Returns the last equilibrated damage level.
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
Definition: gausspoint.h:191
int giveNumberOfColumns() const
Returns number of columns of receiver.
Definition: floatmatrix.h:158
The representation of EngngModel default unknown numbering.
void subtract(const FloatArray &src)
Subtracts array src to receiver.
Definition: floatarray.C:258
void letTempStrainVectorBe(const FloatArray &v)
Assigns tempStrainVector to given vector v.
Definition: structuralms.h:137
double beta
Parameter which multiplied with the interaction radius cl0 gives its minimum allowed value...
void updateDomainBeforeNonlocAverage(TimeStep *tStep)
Updates data in all integration points before nonlocal average takes place.
This class implements associated Material Status to IDNLMaterial (Nonlocal isotropic damage)...
Definition: idmnl1.h:55
#define OOFEG_SPARSE_PROFILE_WIDTH
void modifyNonlocalWeightFunctionAround(GaussPoint *gp)
Recompute the nonlocal interaction weights based on the current solution (e.g., on the damage field)...
GaussPoint * gp
Associated integration point.
Class and object Domain.
Definition: domain.h:115
void endIPNonlocalAverage(GaussPoint *gp)
Notifies the receiver, that the nonlocal averaging has been finished for given ip.
virtual int assemble(const IntArray &loc, const FloatMatrix &mat)=0
Assembles sparse matrix from contribution of local elements.
void setLocalEquivalentStrainForAverage(double ls)
Sets the localEquivalentStrainForAverage to given value.
Definition: idmnl1.h:78
For computing principal stresses.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
Base class for all matrices stored in sparse format.
Definition: sparsemtrx.h:60
double kappa
Scalar measure of the largest strain level ever reached in material.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
AveragedVarType averagedVar
Parameter specifying the type of averaged (nonlocal) variable.
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
double damage
Damage level of material.
virtual int unpackAndUpdateUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *ip)
Unpack and updates all necessary data of given integration point (according to element parallel_mode)...
Definition: idmnl1.C:952
The class representing the general material model adaptive mapping interface.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
double computeStressBasedWeightForPeriodicCell(double &nx, double &ny, double &ratio, GaussPoint *gp, GaussPoint *jGp)
Definition: idmnl1.C:260
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
NlVariationType nlvar
Parameter specifying the type of nonlocal variation.
#define OOFEG_SPARSE_PROFILE_LAYER
virtual Interface * giveInterface(InterfaceType)
Interface requesting service.
Definition: idmnl1.C:930
void buildNonlocalPointTable(GaussPoint *gp)
Builds list of integration points which take part in nonlocal average in given integration point...
Element * giveElement()
Returns corresponding element to receiver.
Definition: gausspoint.h:188
ScalingType scaling
Parameter specifying the type of scaling of nonlocal weight function.
std::vector< localIntegrationRecord > * giveIntegrationDomainList()
Returns integration list of receiver.
double complianceFunction(double kappa, GaussPoint *gp)
Returns the value of compliance parameter corresponding to a given value of the damage-driving variab...
Definition: idm1.C:1125
void plusDyadUnsym(const FloatArray &a, const FloatArray &b, double dV)
Adds to the receiver the product .
Definition: floatmatrix.C:811
This class implements associated Material Status to IsotropicDamageMaterial1.
Definition: idm1.h:117
MaterialMode
Type representing material mode of integration point.
Definition: materialmode.h:89
void giveStressDependentPartOfStrainVector(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrainVector, TimeStep *tStep, ValueModeType mode)
Method for subtracting from reduced space strain vector its stress-independent parts (caused by tempe...
virtual int packUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *ip)
Pack all necessary data of integration point (according to element parallel_mode) into given communic...
Definition: idmnl1.C:941
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver&#39;s output to given stream.
Definition: structuralms.C:73
static void computePrincipalValDir(FloatArray &answer, FloatMatrix &dir, const FloatArray &s, stressStrainPrincMode mode)
Computes principal values and directions of stress or strain vector.
Class implementing an array of integers.
Definition: intarray.h:61
int & at(int i)
Coefficient access function.
Definition: intarray.h:103
virtual int read(int *data, int count)=0
Reads count integer values into array pointed by data.
MatResponseMode
Describes the character of characteristic material matrix.
double ef
Determines ductility -> corresponds to fracturing strain.
Definition: idm1.h:145
void giveRemoteNonlocalStiffnessContribution(GaussPoint *gp, IntArray &rloc, const UnknownNumberingScheme &s, FloatArray &rcontrib, TimeStep *tStep)
Computes the "remote" part of nonlocal stiffness contribution assembled for given integration point...
Definition: idmnl1.C:661
double weight
Integration weight.
Definition: gausspoint.h:107
#define THROW_CIOERR(e)
Definition: contextioerr.h:61
This class is a abstract base class for all linear elastic material models in a finite element proble...
virtual int estimatePackSize(DataStream &buff, GaussPoint *ip)
Estimates the necessary pack size to hold all packed data of receiver.
Definition: idmnl1.C:964
double giveLocalEquivalentStrainForAverage()
Returns the local equivalent strain to be averaged.
Definition: idmnl1.h:76
static void giveFullSymVectorForm(FloatArray &answer, const FloatArray &vec, MaterialMode matMode)
Converts the reduced unsymmetric Voigt vector (2nd order tensor) to full form.
EquivStrainType equivStrainType
Parameter specifying the definition of equivalent strain.
Definition: idm1.h:189
IRResultType initializeFrom(InputRecord *ir)
int averType
Parameter specifying how the weight function should be adjusted due to damage.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
Definition: idm1.C:395
virtual int write(const int *data, int count)=0
Writes count integer values from array pointed by data.
virtual void NonlocalMaterialStiffnessInterface_showSparseMtrxStructure(GaussPoint *gp, oofegGraphicContext &gc, TimeStep *tStep)
Plots the sparse structure of stiffness contribution.
Definition: idmnl1.C:494
virtual double give(int aProperty, GaussPoint *gp)
Returns the value of material property &#39;aProperty&#39;.
Definition: material.C:52
Abstract base class for all "structural" finite elements.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
Definition: idmnl1.C:400
virtual void giveStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes the stiffness matrix for giveRealStressVector of receiver in given integration point...
double localEquivalentStrainForAverage
Equivalent strain for averaging.
Definition: idmnl1.h:59
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.
double computeStressBasedWeight(double &nx, double &ny, double &ratio, GaussPoint *gp, GaussPoint *jGp, double weight)
Function used to compute the new weight based on stress-based averaging.
Definition: idmnl1.C:226
double stressWork
Density of total work done by stresses on strain increments.
double px
Parameter specifying the periodic shift in x-direction.
#define OOFEM_ERROR(...)
Definition: error.h:61
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Definition: idmnl1.C:912
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: idm1.C:112
void clear()
Clears the array (zero size).
Definition: intarray.h:177
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
Definition: idmnl1.C:477
Class Nonlocal Material Stiffness Interface.
virtual void give3dMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes full 3d material stiffness matrix at given integration point, time, respecting load history ...
int giveLocalNonlocalStiffnessContribution(GaussPoint *gp, IntArray &loc, const UnknownNumberingScheme &s, FloatArray &lcontrib, TimeStep *tStep)
Computes the "local" part of nonlocal stiffness contribution assembled for given integration point...
Definition: idmnl1.C:582
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
std::vector< localIntegrationRecord > * giveIPIntegrationList(GaussPoint *gp)
Returns integration list corresponding to given integration point.
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
IDNLMaterial(int n, Domain *d)
Constructor.
Definition: idmnl1.C:60
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
Definition: floatarray.C:676
void computeAngleAndSigmaRatio(double &nx, double &ny, double &ratio, GaussPoint *gp, bool &flag)
Function used in the Stress based nonlocal variation.In this function the ratio of the first two eige...
Definition: idmnl1.C:135
const FloatArray & giveTempStrainVector() const
Returns the const pointer to receiver&#39;s temporary strain vector.
Definition: structuralms.h:115
virtual void computeEquivalentStrain(double &kappa, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep)
Computes the equivalent strain measure from given strain vector (full form).
Definition: idmnl1.C:291
virtual double give(int aProperty, GaussPoint *gp)
Returns the value of material property &#39;aProperty&#39;.
Definition: idm1.C:1313
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
LinearElasticMaterial * giveLinearElasticMaterial()
Returns reference to undamaged (bulk) material.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
Definition: idmnl1.C:870
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
Definition: idm1.C:1354
void computeLocalEquivalentStrain(double &kappa, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep)
Definition: idmnl1.h:150
double giveTempKappa()
Returns the temp. scalar measure of the largest strain level.
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
virtual std::vector< localIntegrationRecord > * NonlocalMaterialStiffnessInterface_giveIntegrationDomainList(GaussPoint *gp)
Returns integration list of receiver.
Definition: idmnl1.C:467
Class representing vector of real numbers.
Definition: floatarray.h:82
double e1
Parameters used if softType = 7 (extended smooth damage law)
Definition: idm1.h:214
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
virtual double giveNonlocalMetricModifierAt(GaussPoint *gp)
Compute the factor that specifies how the interaction length should be modified (by eikonal nonlocal ...
Definition: idmnl1.C:124
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
virtual int givePackSizeOfDouble(int count)=0
virtual void NonlocalMaterialStiffnessInterface_addIPContribution(SparseMtrx &dest, const UnknownNumberingScheme &s, GaussPoint *gp, TimeStep *tStep)
Computes and adds IP contributions to destination matrix.
Definition: idmnl1.C:422
static void giveStressVectorTranformationMtrx(FloatMatrix &answer, const FloatMatrix &base, bool transpose=false)
Computes 3d stress vector transformation matrix from standard vector transformation matrix...
double mm
For "undernonlocal" or "overnonlocal" formulation.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: idmnl1.C:382
IntegrationPointStatus * giveMaterialStatus()
Returns reference to associated material status (NULL if not defined).
Definition: gausspoint.h:205
virtual ~IDNLMaterial()
Destructor.
Definition: idmnl1.C:67
double giveTempDamage()
Returns the temp. damage level.
double e0
Equivalent strain at stress peak (or a similar parameter).
Definition: idm1.h:143
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
Definition: floatmatrix.C:1358
Class representing the general Input Record.
Definition: inputrecord.h:101
Base class for all nonlocal structural material statuses.
Class Interface.
Definition: interface.h:82
void zero()
Zeroes all coefficients of receiver.
Definition: floatarray.C:658
Class representing the a dynamic Input Record.
virtual void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int lowerIndx=1, int upperIndx=ALL_STRAINS)=0
Computes the geometrical matrix of receiver in given integration point.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
This class implements a Nonlocal Isotropic Damage Model for Concrete in Tension Model based on nonloc...
Definition: idmnl1.h:108
This class implements a simple local isotropic damage model for concrete in tension.
Definition: idm1.h:137
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
Definition: idmnl1.C:882
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver&#39;s output to given stream.
Definition: idmnl1.C:852
InterfaceType
Enumerative type, used to identify interface type.
Definition: interfacetype.h:43
double giveIntegrationScale()
Returns associated integration scale.
#define ef_ID
Definition: matconst.h:84
REGISTER_Material(DummyMaterial)
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.
void giveNormalElasticStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes elastic stiffness for normal stress components.
Definition: idmnl1.C:816
void clear()
Sets size of receiver to be an empty matrix. It will have zero rows and zero columns size...
Definition: floatmatrix.h:516
virtual void initTempStatus(GaussPoint *gp)
Initializes temporary variables stored in integration point status at the beginning of new time step...
Definition: material.C:267
virtual void updateBeforeNonlocAverage(const FloatArray &strainVector, GaussPoint *gp, TimeStep *tStep)
Declares the service updating local variables in given integration points, which take part in nonloca...
Definition: idmnl1.C:74
virtual Interface * giveInterface(InterfaceType it)
Interface requesting service.
Definition: idmnl1.C:367
virtual void computeDamageParam(double &omega, double kappa, const FloatArray &strain, GaussPoint *gp)
Computes the value of damage parameter omega, based on given value of equivalent strain.
Definition: idmnl1.C:407
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
Definition: idmnl1.C:895
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
double dissWork
Density of dissipated work.
virtual double predictRelativeComputationalCost(GaussPoint *gp)
Returns the weight representing relative computational cost of receiver The reference material model ...
Definition: idmnl1.C:977
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
virtual int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords)
Computes the global coordinates from given element&#39;s local coordinates.
Definition: element.C:1207
virtual ~IDNLMaterialStatus()
Destructor.
Definition: idmnl1.C:847
virtual double computeWeightFunction(double distance)
Evaluates the basic nonlocal weight function for a given distance between interacting points...
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
Definition: gausspoint.h:138
#define e0_ID
Definition: matconst.h:83
void giveInputRecord(DynamicInputRecord &input)
Stores receiver in an input record.
void resize(int s)
Resizes receiver towards requested size.
Definition: floatarray.C:631
IDNLMaterialStatus(int n, Domain *d, GaussPoint *g)
Constructor.
Definition: idmnl1.C:840

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:29 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011