OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
structuralfe2material.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 "structuralfe2material.h"
36 #include "gausspoint.h"
37 #include "engngm.h"
38 #include "oofemtxtdatareader.h"
39 #include "floatmatrix.h"
40 #include "floatarray.h"
41 #include "dynamicinputrecord.h"
42 #include "classfactory.h"
43 #include "util.h"
44 #include "contextioerr.h"
47 #include "exportmodulemanager.h"
48 #include "vtkxmlexportmodule.h"
49 #include "nummet.h"
52 #include "unknownnumberingscheme.h"
54 #include "mathfem.h"
55 
56 #include "dynamicdatareader.h"
57 
58 #include <sstream>
59 
60 namespace oofem {
61 REGISTER_Material(StructuralFE2Material);
62 
64 
66 useNumTangent(true)
67 {}
68 
70 {}
71 
72 
75 {
76  IRResultType result; // Required by IR_GIVE_FIELD macro
78 
80 
82 }
83 
84 
85 void
87 {
90 
91  if ( useNumTangent ) {
93  }
94 }
95 
96 
99 {
100  return new StructuralFE2MaterialStatus(1, this->giveDomain(), gp, this->inputfile);
101 }
102 
103 
104 void
106  const FloatArray &totalStrain, TimeStep *tStep)
107 {
108  FloatArray stress;
109  StructuralFE2MaterialStatus *ms = static_cast< StructuralFE2MaterialStatus * >( this->giveStatus(gp) );
110 
111 #if 0
112  XfemStructureManager *xMan = dynamic_cast<XfemStructureManager*>( ms->giveRVE()->giveDomain(1)->giveXfemManager() );
113  if(xMan) {
114  printf("Total crack length in RVE: %e\n", xMan->computeTotalCrackLength() );
115  }
116 #endif
117 
118  ms->setTimeStep(tStep);
119  // Set input
120  ms->giveBC()->setPrescribedGradientVoigt(totalStrain);
121  // Solve subscale problem
122  ms->giveRVE()->solveYourselfAt(tStep);
123  // Post-process the stress
124  ms->giveBC()->computeField(stress, tStep);
125 
126  if ( stress.giveSize() == 6 ) {
127  answer = stress;
128  } if ( stress.giveSize() == 9 ) {
129  answer = {stress[0], stress[1], stress[2], 0.5*(stress[3]+stress[6]), 0.5*(stress[4]+stress[7]), 0.5*(stress[5]+stress[8])};
130  } else {
132  }
133 
134  // Update the material status variables
135  ms->letTempStressVectorBe(answer);
136  ms->letTempStrainVectorBe(totalStrain);
137  ms->markOldTangent(); // Mark this so that tangent is reevaluated if they are needed.
138 }
139 
140 
141 void
143 {
144  if ( useNumTangent ) {
145  // Numerical tangent
146  StructuralFE2MaterialStatus *status = static_cast<StructuralFE2MaterialStatus*>( this->giveStatus( gp ) );
147  double h = 1.0e-9;
148 
149  const FloatArray &epsRed = status->giveTempStrainVector();
150  FloatArray eps;
152 
153 
154  int dim = eps.giveSize();
155  answer.resize(dim, dim);
156  answer.zero();
157 
158  FloatArray sig, sigPert, epsPert;
159 
160  for(int i = 1; i <= dim; i++) {
161  // Add a small perturbation to the strain
162  epsPert = eps;
163  epsPert.at(i) += h;
164 
165  giveRealStressVector_3d(sigPert, gp, epsPert, tStep);
166  answer.setColumn(sigPert, i);
167  }
168 
169  giveRealStressVector_3d(sig, gp, eps, tStep);
170 
171  for(int i = 1; i <= dim; i++) {
172  for(int j = 1; j <= dim; j++) {
173  answer.at(j,i) -= sig.at(j);
174  answer.at(j,i) /= h;
175  }
176  }
177 
178  } else {
179 
180  StructuralFE2MaterialStatus *ms = static_cast< StructuralFE2MaterialStatus * >( this->giveStatus(gp) );
181  ms->computeTangent(tStep);
182  const FloatMatrix &ans9 = ms->giveTangent();
183 
184  StructuralMaterial::giveReducedSymMatrixForm(answer, ans9, _3dMat);
185 
186 // const FloatMatrix &ans9 = ms->giveTangent();
187 // printf("ans9: "); ans9.printYourself();
188 //
189 // // Compute the (minor) symmetrized tangent:
190 // answer.resize(6, 6);
191 // for ( int i = 0; i < 6; ++i ) {
192 // for ( int j = 0; j < 6; ++j ) {
193 // answer(i, j) = ans9(i, j);
194 // }
195 // }
196 // for ( int i = 0; i < 6; ++i ) {
197 // for ( int j = 6; j < 9; ++j ) {
198 // answer(i, j-3) += ans9(i, j);
199 // answer(j-3, i) += ans9(j, i);
200 // }
201 // }
202 // for ( int i = 6; i < 9; ++i ) {
203 // for ( int j = 6; j < 9; ++j ) {
204 // answer(j-3, i-3) += ans9(j, i);
205 // }
206 // }
207 // for ( int i = 0; i < 6; ++i ) {
208 // for ( int j = 3; j < 6; ++j ) {
209 // answer(j, i) *= 0.5;
210 // answer(i, j) *= 0.5;
211 // }
212 // }
213 
214 
215 
216 #if 0
217  // Numerical ATS for debugging
218  FloatMatrix numericalATS(6, 6);
219  FloatArray dsig;
220  // Note! We need a copy of the temp strain, since the pertubations might change it.
221  FloatArray tempStrain = ms->giveTempStrainVector();
222 
223  FloatArray sig, strain, sigPert;
224  giveRealStressVector_3d(sig, gp, tempStrain, tStep);
225  double hh = 1e-6;
226  for ( int k = 1; k <= 6; ++k ) {
227  strain = tempStrain;
228  strain.at(k) += hh;
229  giveRealStressVector_3d(sigPert, gp, strain, tStep);
230  dsig.beDifferenceOf(sigPert, sig);
231  numericalATS.setColumn(dsig, k);
232  }
233  numericalATS.times(1. / hh);
234  giveRealStressVector_3d(sig, gp, tempStrain, tStep); // Reset
235 
236  //answer.printYourself("Analytical deviatoric tangent");
237  //numericalATS.printYourself("Numerical deviatoric tangent");
238 
239  numericalATS.subtract(answer);
240  double norm = numericalATS.computeFrobeniusNorm();
241  if ( norm > answer.computeFrobeniusNorm() * 1e-3 && norm > 0.0 ) {
242  OOFEM_ERROR("Error in deviatoric tangent");
243  }
244 #endif
245  }
246 }
247 
248 
249 //=============================================================================
250 
251 
253 StructuralMaterialStatus(n, d, g),
254 mNewlyInitialized(true)
255 {
256  mInputFile = inputfile;
257 
258  this->oldTangent = true;
259 
260  if ( !this->createRVE(n, gp, inputfile) ) {
261  OOFEM_ERROR("Couldn't create RVE");
262  }
263 
264 }
265 
267 {
268  this->bc = dynamic_cast< PrescribedGradientHomogenization * >( this->rve->giveDomain(1)->giveBc(1) );
269  return this->bc;
270 }
271 
272 
273 bool
274 StructuralFE2MaterialStatus :: createRVE(int n, GaussPoint *gp, const std :: string &inputfile)
275 {
276  OOFEMTXTDataReader dr( inputfile.c_str() );
277  EngngModel *em = InstanciateProblem(dr, _processor, 0); // Everything but nrsolver is updated.
278  dr.finish();
279  em->setProblemScale(microScale);
280  em->checkProblemConsistency();
281  em->initMetaStepAttributes( em->giveMetaStep(1) );
282  em->giveNextStep(); // Makes sure there is a timestep (which we will modify before solving a step)
283  em->init();
284 
285  this->rve.reset( em );
286 
287  std :: ostringstream name;
288  name << this->rve->giveOutputBaseFileName() << "-gp" << n;
289  if ( this->domain->giveEngngModel()->isParallel() && this->domain->giveEngngModel()->giveNumberOfProcesses() > 1 ) {
290  name << "." << this->domain->giveEngngModel()->giveRank();
291  }
292 
293  this->rve->letOutputBaseFileNameBe( name.str() );
294 
295  this->bc = dynamic_cast< PrescribedGradientHomogenization * >( this->rve->giveDomain(1)->giveBc(1) );
296  if ( !this->bc ) {
297  OOFEM_ERROR("RVE doesn't have necessary boundary condition; should have a type of PrescribedGradientHomogenization as first b.c.");
298  }
299 
300  return true;
301 }
302 
303 void
305 {
306  TimeStep *rveTStep = this->rve->giveCurrentStep(); // Should i create a new one if it is empty?
307  rveTStep->setNumber( tStep->giveNumber() );
308  rveTStep->setTime( tStep->giveTargetTime() );
309  rveTStep->setTimeIncrement( tStep->giveTimeIncrement() );
310 }
311 
312 void
314 {
316 }
317 
318 void
320 
321 void
323 {
324  if ( !tStep->isTheCurrentTimeStep() ) {
325  OOFEM_ERROR("Only current timestep supported.");
326  }
327 
328  if ( this->oldTangent ) {
329  bc->computeTangent(this->giveTangent(), tStep);
330  }
331 
332  this->oldTangent = false;
333 }
334 
335 void
337 {
339  this->rve->updateYourself(tStep);
340  this->rve->terminate(tStep);
341 
342  mNewlyInitialized = false;
343 }
344 
345 
348 {
349  contextIOResultType iores;
350  if ( ( iores = StructuralMaterialStatus :: saveContext(stream, mode, obj) ) != CIO_OK ) {
351  THROW_CIOERR(iores);
352  }
353 
354  return this->rve->saveContext(stream, mode);
355 }
356 
357 
360 {
361  contextIOResultType iores;
362  if ( ( iores = StructuralMaterialStatus :: restoreContext(stream, mode, obj) ) != CIO_OK ) {
363  THROW_CIOERR(iores);
364  }
365 
366  return this->rve->restoreContext(stream, mode);
367 }
368 
370 {
371  return sqrt( bc->domainSize() );
372 }
373 
375 {
376  //static int num = 0;
377  //printf("Entering StructuralFE2MaterialStatus :: copyStateVariables.\n");
378 
379  this->oldTangent = true;
380 
381 // if ( !this->createRVE(this->giveNumber(), gp, mInputFile) ) {
382 // OOFEM_ERROR("Couldn't create RVE");
383 // }
384 
385 
387 
388 
390  MaterialStatus &tmpStat = const_cast< MaterialStatus & >(iStatus);
391  StructuralFE2MaterialStatus *fe2ms = dynamic_cast<StructuralFE2MaterialStatus*>(&tmpStat);
392 
393  if ( !fe2ms ) {
394  OOFEM_ERROR("Failed to cast StructuralFE2MaterialStatus.")
395  }
396 
397 
398  this->mNewlyInitialized = fe2ms->mNewlyInitialized;
399 
400  // The proper way to do this would be to clone the RVE from iStatus.
401  // However, this is a mess due to all pointers that need to be tracked.
402  // Therefore, we consider a simplified version: copy only the enrichment items.
403 
404  Domain *ext_domain = fe2ms->giveRVE()->giveDomain(1);
405  if ( ext_domain->hasXfemManager() ) {
406 
407  Domain *rve_domain = rve->giveDomain(1);
408 
409  XfemManager *ext_xMan = ext_domain->giveXfemManager();
410  XfemManager *this_xMan = rve->giveDomain(1)->giveXfemManager();
411  DynamicDataReader dataReader("fe2");
412  if ( ext_xMan != NULL ) {
413 
414  IRResultType result; // Required by IR_GIVE_FIELD macro
415  std::vector<std::unique_ptr<EnrichmentItem>> eiList;
416 
417  //DynamicInputRecord *xmanRec = new DynamicInputRecord();
418  //ext_xMan->giveInputRecord(* xmanRec);
419  //dataReader.insertInputRecord(DataReader :: IR_xfemManRec, xmanRec);
420 
421  // Enrichment items
422  int nEI = ext_xMan->giveNumberOfEnrichmentItems();
423  for ( int i = 1; i <= nEI; i++ ) {
424  EnrichmentItem *ext_ei = ext_xMan->giveEnrichmentItem(i);
425  ext_ei->appendInputRecords(dataReader);
426 
427 
429  std :: string name;
430  result = mir->giveRecordKeywordField(name);
431 
432  if ( result != IRRT_OK ) {
433  mir->report_error(this->giveClassName(), __func__, "", result, __FILE__, __LINE__);
434  }
435 
436  std :: unique_ptr< EnrichmentItem >ei( classFactory.createEnrichmentItem( name.c_str(), i, this_xMan, rve_domain ) );
437  if ( ei.get() == NULL ) {
438  OOFEM_ERROR( "unknown enrichment item (%s)", name.c_str() );
439  }
440 
441  ei->initializeFrom(mir);
442  ei->instanciateYourself(dataReader);
443  eiList.push_back( std :: move(ei) );
444 
445  }
446 
447  this_xMan->clearEnrichmentItems();
448  this_xMan->appendEnrichmentItems(eiList);
449 
450  rve_domain->postInitialize();
451  rve->forceEquationNumbering();
452  }
453 
454  }
455 
456  //printf("done.\n");
457 
458 #if 0
459  Domain *newDomain = fe2ms->giveRVE()->giveDomain(1)->Clone();
460  newDomain->SetEngngModel(rve.get());
461  bool deallocateOld = true;
462  rve->setDomain(1, newDomain, deallocateOld);
463 
464  //rve->giveDomain(1)->postInitialize();
465  rve->giveNumericalMethod(NULL)->setDomain(newDomain);
466 
467  rve->postInitialize();
468  //rve->forceEquationNumbering();
469 
470  rve->initMetaStepAttributes( rve->giveMetaStep(1) );
471  rve->giveNextStep(); // Makes sure there is a timestep (which we will modify before solving a step)
472  rve->init();
473 
474 
475 // std :: ostringstream name;
476 // name << this->rve->giveOutputBaseFileName() << "-gp" << n;
477 // this->rve->letOutputBaseFileNameBe( name.str() );
478 // n++;
479 
480  double crackLength = 0.0;
481  XfemStructureManager *xMan = dynamic_cast<XfemStructureManager*>( rve->giveDomain(1)->giveXfemManager() );
482  if ( xMan ) {
483  crackLength = xMan->computeTotalCrackLength();
484  }
485 
486  std :: ostringstream name;
487  name << this->rve->giveOutputBaseFileName() << "-gp" << num << "crackLength" << crackLength;
488  if ( this->domain->giveEngngModel()->isParallel() && this->domain->giveEngngModel()->giveNumberOfProcesses() > 1 ) {
489  name << "." << this->domain->giveEngngModel()->giveRank();
490  }
491 
492  num++;
493 
494  this->rve->letOutputBaseFileNameBe( name.str() );
495 
496 
497  // Update BC
498  this->bc = dynamic_cast< PrescribedGradientHomogenization * >( this->rve->giveDomain(1)->giveBc(1) );
499 
500 #if 1
501 
502  XfemSolverInterface *xfemSolInt = dynamic_cast<XfemSolverInterface*>(rve.get());
503  StaticStructural *statStruct = dynamic_cast<StaticStructural*>(rve.get());
504  if ( xfemSolInt && statStruct ) {
505  //printf("Successfully casted to XfemSolverInterface.\n");
506 
507  TimeStep *tStep = rve->giveCurrentStep();
508 
510  int numDofsNew = rve->giveNumberOfDomainEquations( 1, num );
511  FloatArray u;
512  u.resize(numDofsNew);
513  u.zero();
514 
515  xfemSolInt->xfemUpdatePrimaryField(*statStruct, tStep, u);
516 
517  // Set domain pointer to various components ...
518  rve->giveNumericalMethod(NULL)->setDomain(newDomain);
519  //ioEngngModel.nMethod->setDomain(domain);
520 
521  }
522 
523 // TimeStep *tStep = rve->giveNextStep();
524 // setTimeStep(tStep);
525 // rve->solveYourselfAt(tStep);
526 
527 
528  int numExpModules = rve->giveExportModuleManager()->giveNumberOfModules();
529  for ( int i = 1; i <= numExpModules; i++ ) {
530  // ... by diving deep into the hierarchies ... :-/
531  VTKXMLExportModule *vtkxmlMod = dynamic_cast< VTKXMLExportModule * >( rve->giveExportModuleManager()->giveModule(i) );
532  if ( vtkxmlMod != NULL ) {
533  vtkxmlMod->giveSmoother()->setDomain(newDomain);
534  vtkxmlMod->givePrimVarSmoother()->setDomain(newDomain);
535  }
536  }
537 #endif
538 #endif
539 }
540 
541 
542 } // end namespace oofem
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
Definition: structuralms.C:96
void setField(int item, InputFieldType id)
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
Definition: gausspoint.h:191
The representation of EngngModel default unknown numbering.
void letTempStrainVectorBe(const FloatArray &v)
Assigns tempStrainVector to given vector v.
Definition: structuralms.h:137
Abstract class representing entity, which is included in the FE model using one (or more) global func...
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
Definition: material.C:244
void clearEnrichmentItems()
Remove all enrichment items.
Definition: xfemmanager.C:461
GaussPoint * gp
Associated integration point.
Class and object Domain.
Definition: domain.h:115
EnrichmentItem * createEnrichmentItem(const char *name, int num, XfemManager *xm, Domain *domain)
Definition: classfactory.C:281
Class representing the implementation of a dynamic data reader for in-code use.
virtual const char * giveClassName() const
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Definition: femcmpnn.h:82
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
virtual void computeField(FloatArray &sigma, TimeStep *tStep)=0
Computes the homogenized, macroscopic, field (stress).
#define _IFT_StructuralFE2Material_fileName
void setDomain(Domain *ipDomain)
Class for homogenization of applied gradients.
virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector for second Piola-Kirchoff stress.
void setPrescribedGradientVoigt(const FloatArray &t)
Sets the prescribed gradient from the matrix from given voigt notation.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
Provides extra solver functionality needed for XFEM.
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
void postInitialize()
Performs post-initialization for all the domain contents (which is called after initializeFrom).
Definition: domain.C:960
This class implements a structural material status information.
Definition: structuralms.h:65
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Solves a static structural problem.
EngngModel * giveEngngModel()
Returns engineering model to which receiver is associated.
Definition: domain.C:433
virtual bool hasField(InputFieldType id)=0
Returns true if record contains field identified by idString keyword.
double giveTargetTime()
Returns target time.
Definition: timestep.h:146
bool isParallel() const
Returns true if receiver in parallel mode.
Definition: engngm.h:1056
void setTime(double newt)
Sets target and intrinsic time to be equal.
Definition: timestep.h:154
void setTimeIncrement(double newDt)
Sets solution step time increment.
Definition: timestep.h:152
int giveNumberOfProcesses() const
Returns the number of collaborating processes.
Definition: engngm.h:1060
XfemStructureManager: XFEM manager with extra functionality specific for the sm module.
virtual void computeTangent(FloatMatrix &tangent, TimeStep *tStep)=0
Computes the macroscopic tangent for homogenization problems through sensitivity analysis.
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
MatResponseMode
Describes the character of characteristic material matrix.
virtual void report_error(const char *_class, const char *proc, InputFieldType id, IRResultType result, const char *file, int line)=0
Prints the error message.
XfemManager * giveXfemManager()
Definition: domain.C:375
#define THROW_CIOERR(e)
Definition: contextioerr.h:61
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
Sets receiver to be a - b.
Definition: floatarray.C:341
static void giveFullSymVectorForm(FloatArray &answer, const FloatArray &vec, MaterialMode matMode)
Converts the reduced unsymmetric Voigt vector (2nd order tensor) to full form.
void setTimeStep(TimeStep *tStep)
Copies time step data to RVE.
double giveTimeIncrement()
Returns solution step associated time increment.
Definition: timestep.h:150
PrescribedGradientHomogenization * giveBC()
int giveNumberOfEnrichmentItems() const
Definition: xfemmanager.h:185
EngngModel * InstanciateProblem(DataReader &dr, problemMode mode, int contextFlag, EngngModel *_master, bool parallelFlag)
Instanciates the new problem.
Definition: util.C:45
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
int giveNumber()
Returns receiver&#39;s number.
Definition: timestep.h:129
virtual InputRecord * giveInputRecord(InputRecordType, int recordId)
Returns input record corresponding to given InputRecordType value and its record_id.
virtual IRResultType giveRecordKeywordField(std::string &answer, int &value)=0
Reads the record id field (type of record) and its corresponding number.
#define OOFEM_ERROR(...)
Definition: error.h:61
void times(double f)
Multiplies receiver by factor f.
Definition: floatmatrix.C:1594
virtual void copyStateVariables(const MaterialStatus &iStatus)
Functions for MaterialStatusMapperInterface.
Definition: structuralms.C:180
const FloatArray & giveTempStrainVector() const
Returns the const pointer to receiver&#39;s temporary strain vector.
Definition: structuralms.h:115
double at(int i, int j) const
Coefficient access function.
Definition: floatmatrix.h:176
std::unique_ptr< EngngModel > rve
The RVE.
Represents VTK (Visualization Toolkit) export module.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Definition: structuralms.C:157
PrescribedGradientHomogenization * bc
Boundary condition in RVE that performs the computational homogenization.
void subtract(const FloatMatrix &a)
Subtracts matrix from the receiver.
Definition: floatmatrix.C:1084
Abstract base class representing a material status information.
Definition: matstatus.h:84
bool hasXfemManager()
Definition: domain.C:386
Class representing vector of real numbers.
Definition: floatarray.h:82
bool createRVE(int n, GaussPoint *gp, const std::string &inputfile)
Creates/Initiates the RVE problem.
bool isTheCurrentTimeStep()
Check if receiver is current solution step.
Definition: timestep.C:155
StructuralFE2MaterialStatus(int n, Domain *d, GaussPoint *g, const std::string &inputfile)
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
double computeFrobeniusNorm() const
Computes the Frobenius norm of the receiver.
Definition: floatmatrix.C:1613
This class manages the xfem part.
Definition: xfemmanager.h:109
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
NodalRecoveryModel * giveSmoother()
Returns the internal smoother.
void letTempStressVectorBe(const FloatArray &v)
Assigns tempStressVector to given vector v.
Definition: structuralms.h:135
virtual MaterialStatus * CreateStatus(GaussPoint *gp) const
Creates new copy of associated status and inserts it into given integration point.
virtual void copyStateVariables(const MaterialStatus &iStatus)
Functions for MaterialStatusMapperInterface.
double norm(const FloatArray &x)
Definition: floatarray.C:985
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
Definition: floatmatrix.C:1358
void appendEnrichmentItems(std::vector< std::unique_ptr< EnrichmentItem > > &iEIlist)
Definition: xfemmanager.C:467
Class representing the general Input Record.
Definition: inputrecord.h:101
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
void zero()
Zeroes all coefficients of receiver.
Definition: floatarray.C:658
int giveRank() const
Returns domain rank in a group of collaborating processes (0..groupSize-1)
Definition: engngm.h:1058
void setColumn(const FloatArray &src, int c)
Sets the values of the matrix in specified column.
Definition: floatmatrix.C:648
Class representing the a dynamic Input Record.
EnrichmentItem * giveEnrichmentItem(int n)
Definition: xfemmanager.h:184
ClassFactory & classFactory
Definition: classfactory.C:59
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
Abstract base class for all "structural" constitutive models.
virtual void appendInputRecords(DynamicDataReader &oDR)=0
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 ...
void zero()
Zeroes all coefficient of receiver.
Definition: floatmatrix.C:1326
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
Definition: structuralms.C:108
Domain * giveDomain() const
Definition: femcmpnn.h:100
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
Definition: engngm.h:451
REGISTER_Material(DummyMaterial)
Abstract base class representing the "problem" under consideration.
Definition: engngm.h:181
double computeTotalCrackLength()
Compute the total length of all cracks in the domain.
int giveSize() const
Returns the size of receiver.
Definition: floatarray.h:218
Class representing the implementation of plain text date reader.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
Definition: structuralms.C:133
the oofem namespace is to define a context or scope in which all oofem names are defined.
Domain * giveDomain(int n)
Service for accessing particular problem domain.
Definition: engngm.C:1720
void SetEngngModel(EngngModel *ipEngngModel)
Definition: domain.h:308
#define IR_GIVE_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:69
NodalRecoveryModel * givePrimVarSmoother()
Returns the smoother for primary variables (nodal averaging).
#define _IFT_StructuralFE2Material_useNumericalTangent
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
void setNumber(int i)
Set receiver&#39;s number.
Definition: timestep.h:131
static void giveReducedSymMatrixForm(FloatMatrix &answer, const FloatMatrix &full, MaterialMode matMode)
Converts the full unsymmetric Voigt matrix (4th order tensor) to reduced form.
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:31 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011