IRResultType NonlinearMassTransferMaterial :: initializeFrom(InputRecord *ir) { const char *__proc = "initializeFrom"; // Required by IR_GIVE_FIELD macro IRResultType result; // Required by IR_GIVE_FIELD macro this->Material :: initializeFrom(ir); IR_GIVE_FIELD(ir, C, IFT_NonlinearMassTransferMaterial_c, "c"); // Constant C IR_GIVE_FIELD(ir, alpha, IFT_NonlinearMassTransferMaterial_alpha, "alpha"); // Constant alpha return IRRT_OK; }
IRResultType NonlinearFluidMaterial :: initializeFrom(InputRecord *ir) { IRResultType result; // Required by IR_GIVE_FIELD macro this->FluidDynamicMaterial :: initializeFrom(ir); IR_GIVE_FIELD(ir, viscosity, _IFT_NonlinearFluidMaterial_mu); IR_GIVE_FIELD(ir, alpha, _IFT_NonlinearFluidMaterial_alpha); IR_GIVE_FIELD(ir, c, _IFT_NonlinearFluidMaterial_C); return IRRT_OK; }
IRResultType TrabBoneEmbed :: initializeFrom(InputRecord *ir) { const char *__proc = "initializeFrom"; // Required by IR_GIVE_FIELD macro IRResultType result; // Required by IR_GIVE_FIELD macro // Read material properties here IR_GIVE_FIELD(ir, eps0, IFT_TrabBoneEmbed_eps0, "eps0"); // Macro IR_GIVE_FIELD(ir, nu0, IFT_TrabBoneEmbed_nu0, "nu0"); // Macro return StructuralMaterial :: initializeFrom(ir); }
IRResultType DEIDynamic :: initializeFrom(InputRecord *ir) { const char *__proc = "initializeFrom"; // Required by IR_GIVE_FIELD macro IRResultType result; // Required by IR_GIVE_FIELD macro StructuralEngngModel :: initializeFrom(ir); IR_GIVE_FIELD(ir, dumpingCoef, IFT_DEIDynamic_dumpcoef, "dumpcoef"); // C = dumpingCoef * M IR_GIVE_FIELD(ir, deltaT, IFT_DEIDynamic_deltat, "deltat"); // Macro return IRRT_OK; }
IRResultType WinklerPasternakMaterial :: initializeFrom(InputRecord *ir) { IRResultType result; // Required by IR_GIVE_FIELD macro StructuralMaterial :: initializeFrom(ir); // we use rather object's member data than to store data into slow // key-val dictionary with lot of memory allocations IR_GIVE_FIELD(ir, c1, _IFT_WinklerPasternakMaterial_C1); IR_GIVE_FIELD(ir, c2, _IFT_WinklerPasternakMaterial_C2); return IRRT_OK; }
IRResultType RCM2Material :: initializeFrom(InputRecord *ir) { const char *__proc = "initializeFrom"; // Required by IR_GIVE_FIELD macro IRResultType result; // Required by IR_GIVE_FIELD macro IR_GIVE_FIELD(ir, Gf, IFT_RCM2Material_gf, "gf"); // Macro IR_GIVE_FIELD(ir, Ft, IFT_RCM2Material_ft, "ft"); // Macro this->giveLinearElasticMaterial()->initializeFrom(ir); return IRRT_OK; }
IRResultType Delamination :: initializeFrom(InputRecord *ir) { EnrichmentItem :: initializeFrom(ir); IRResultType result; // Required by IR_GIVE_FIELD macro // Compute the delamination xi-coord IR_GIVE_FIELD(ir, this->interfaceNum, _IFT_Delamination_interfacenum); // interface number from the bottom IR_GIVE_FIELD(ir, this->crossSectionNum, _IFT_Delamination_csnum); LayeredCrossSection *layeredCS = dynamic_cast< LayeredCrossSection * >( this->giveDomain()->giveCrossSection(this->crossSectionNum) ); if ( layeredCS == NULL ) { OOFEM_ERROR("Delamination EI requires a valid layered cross section number input: see record '%s'.", _IFT_Delamination_csnum); } else if ( this->interfaceNum.giveSize() < 1 || this->interfaceNum.giveSize() > 2 ) { OOFEM_ERROR("Size of record 'interfacenum' must be 1 or 2"); } // check that interface numbers are valid interfaceNum.printYourself("interface num"); for ( int i = 1; i <= this->interfaceNum.giveSize(); i++ ) { if ( this->interfaceNum.at(i) < 1 || this->interfaceNum.at(i) >= layeredCS->giveNumberOfLayers() ) { OOFEM_ERROR( "Cross section does not contain the interface number (%d) specified in the record '%s' since number of layers is %d.", this->interfaceNum.at(i), _IFT_Delamination_interfacenum, layeredCS->giveNumberOfLayers() ); } } // compute xi-coord of the delamination this->delamXiCoord = -1.0; double totalThickness = layeredCS->give(CS_Thickness, FloatArray(), NULL, false); // no position available for ( int i = 1; i <= this->interfaceNum.at(1); i++ ) { this->delamXiCoord += layeredCS->giveLayerThickness(i) / totalThickness * 2.0; this->xiBottom += layeredCS->giveLayerThickness(i) / totalThickness * 2.0; } if ( this->interfaceNum.giveSize() == 2 ) { if ( this->interfaceNum.at(1) >= this->interfaceNum.at(2) ) { OOFEM_ERROR("second intercfacenum must be greater than the first one"); } for ( int i = 1; i <= this->interfaceNum.at(2); i++ ) { this->xiTop += layeredCS->giveLayerThickness(i) / totalThickness * 2.0; } } else { this->xiTop = 1.0; // default is the top surface } IR_GIVE_OPTIONAL_FIELD(ir, this->matNum, _IFT_Delamination_CohesiveZoneMaterial); if ( this->matNum > 0 ) { this->mat = this->giveDomain()->giveMaterial(this->matNum); } return IRRT_OK; }
IRResultType IsotropicHeatTransferMaterial :: initializeFrom(InputRecord *ir) { const char *__proc = "initializeFrom"; // Required by IR_GIVE_FIELD macro IRResultType result; // Required by IR_GIVE_FIELD macro // double value ; this->Material :: initializeFrom(ir); IR_GIVE_FIELD(ir, conductivity, IFT_IsotropicHeatTransferMaterial_k, "k"); // Macro// conductivity IR_GIVE_FIELD(ir, capacity, IFT_IsotropicHeatTransferMaterial_c, "c"); // Macro// specific heat capacity return IRRT_OK; }
IRResultType CohesiveInterfaceMaterial :: initializeFrom(InputRecord *ir) { IRResultType result; // Required by IR_GIVE_FIELD macro // elastic parameters IR_GIVE_FIELD(ir, kn, _IFT_IsoInterfaceDamageMaterial_kn); IR_GIVE_FIELD(ir, ks, _IFT_IsoInterfaceDamageMaterial_ks); // thermal coefficient tempDillatCoeff = 0.0; return StructuralMaterial :: initializeFrom(ir); }
IRResultType StaticFracture :: initializeFrom(InputRecord *ir) { const char *__proc = "initializeFrom"; // Required by IR_GIVE_FIELD macro IRResultType result; // Required by IR_GIVE_FIELD macro IR_GIVE_FIELD(ir, this->numberOfSteps, _IFT_OptimizationProblem_nsteps); if ( this->numberOfSteps <= 0 ) { _error("instanciateFrom: nsteps not specified, bad format"); } //if ( ir->hasField(_IFT_StaggeredProblem_deltat) ) { // EngngModel :: initializeFrom(ir); // IR_GIVE_FIELD(ir, deltaT, _IFT_StaggeredProblem_deltat); // dtTimeFunction = 0; //} else if ( ir->hasField(_IFT_StaggeredProblem_prescribedtimes) ) { // EngngModel :: initializeFrom(ir); // IR_GIVE_FIELD(ir, discreteTimes, _IFT_StaggeredProblem_prescribedtimes); // dtTimeFunction = 0; //} else { // IR_GIVE_FIELD(ir, timeDefinedByProb, _IFT_StaggeredProblem_timeDefinedByProb); //} //if ( dtTimeFunction < 1 ) { // ndomains = 0; //} //IR_GIVE_OPTIONAL_FIELD(ir, dtTimeFunction, _IFT_StaggeredProblem_dtf); //IR_GIVE_OPTIONAL_FIELD(ir, stepMultiplier, _IFT_StaggeredProblem_stepmultiplier); //if ( stepMultiplier < 0 ) { // _error("stepMultiplier must be > 0") //} IR_GIVE_FIELD(ir, this->numObjFunc, _IFT__IFT_OptimizationProblem_NumObjFunc); emodelList = new AList< EngngModel >(1); inputStreamNames = new std :: string [ 1 ]; //for (int i = 1; i <= this->numObjFunc; i++) { //IR_GIVE_FIELD(ir, inputStreamNames [ i-1 ], _IFT__IFT_OptimizationProblem_Name_prob1); //} IR_GIVE_FIELD(ir, inputStreamNames [ 0 ], _IFT__IFT_OptimizationProblem_Name_prob1); // IR_GIVE_FIELD(ir, inputStreamNames [ 1 ], "top.in"); this->objFuncList.resize(1); this->objFuncList[0] = new MinCompliance(); return IRRT_OK; }
IRResultType LineDistributedSpring :: initializeFrom(InputRecord *ir) { IRResultType result; // Required by IR_GIVE_FIELD macro IR_GIVE_FIELD (ir, dofs, _IFT_LineDistributedSpring_Dofs); IR_GIVE_FIELD (ir, springStiffnesses, _IFT_LineDistributedSpring_Stifnesses); if (dofs.giveSize() != springStiffnesses.giveSize()) { OOFEM_ERROR ("dofs and k params size mismatch"); } // from element return StructuralElement::initializeFrom(ir); }
IRResultType NonStationaryTransportProblem :: initializeFrom(InputRecord *ir) { IRResultType result; // Required by IR_GIVE_FIELD macro result = EngngModel :: initializeFrom(ir); if ( result != IRRT_OK ) return result; if ( ir->hasField(_IFT_NonStationaryTransportProblem_initt) ) { IR_GIVE_FIELD(ir, initT, _IFT_NonStationaryTransportProblem_initt); } if ( ir->hasField(_IFT_NonStationaryTransportProblem_deltat) ) { IR_GIVE_FIELD(ir, deltaT, _IFT_NonStationaryTransportProblem_deltat); } else if ( ir->hasField(_IFT_NonStationaryTransportProblem_deltatfunction) ) { IR_GIVE_FIELD(ir, dtFunction, _IFT_NonStationaryTransportProblem_deltatfunction); } else if ( ir->hasField(_IFT_NonStationaryTransportProblem_prescribedtimes) ) { IR_GIVE_FIELD(ir, discreteTimes, _IFT_NonStationaryTransportProblem_prescribedtimes); } else { OOFEM_WARNING("Time step not defined"); return IRRT_BAD_FORMAT; } IR_GIVE_FIELD(ir, alpha, _IFT_NonStationaryTransportProblem_alpha); /* The following done in updateAttributes * if (this->giveNumericalMethod (giveCurrentStep())) nMethod -> instanciateFrom (ir); */ // read lumped capacity stabilization flag if ( ir->hasField(_IFT_NonStationaryTransportProblem_lumpedcapa) ) { lumpedCapacityStab = 1; } //secure equation renumbering, otherwise keep efficient algorithms if ( ir->hasField(_IFT_NonStationaryTransportProblem_changingproblemsize) ) { changingProblemSize = true; UnknownsField.reset( new DofDistributedPrimaryField(this, 1, FT_TransportProblemUnknowns, 1) ); } else { UnknownsField.reset( new PrimaryField(this, 1, FT_TransportProblemUnknowns, 1) ); } //read other input data from StationaryTransportProblem StationaryTransportProblem :: initializeFrom(ir); int val = 0; IR_GIVE_OPTIONAL_FIELD(ir, val, _IFT_EngngModel_lstype); solverType = ( LinSystSolverType ) val; return IRRT_OK; }
IRResultType TutorialMaterial :: initializeFrom(InputRecord *ir) { IRResultType result; // Required by IR_GIVE_FIELD macro result = D.initializeFrom(ir); if ( result != IRRT_OK ) return result; IR_GIVE_FIELD(ir, this->sig0, _IFT_TutorialMaterial_yieldstress); IR_GIVE_FIELD(ir, this->H, _IFT_TutorialMaterial_hardeningmoduli); return StructuralMaterial :: initializeFrom(ir); }
IRResultType NonlinearFluidMaterial :: initializeFrom(InputRecord *ir) { const char *__proc = "initializeFrom"; // Required by IR_GIVE_FIELD macro IRResultType result; // Required by IR_GIVE_FIELD macro this->FluidDynamicMaterial :: initializeFrom(ir); IR_GIVE_FIELD(ir, viscosity, IFT_NewtonianFluidMaterial_mu, "mu"); // Macro IR_GIVE_FIELD(ir, alpha, IFT_NonlinearFluidMaterial_alpha, "alpha"); // Macro IR_GIVE_FIELD(ir, c, IFT_NonlinearFluidMaterial_C, "c"); // Macro return IRRT_OK; }
IRResultType TransportGradientPeriodic :: initializeFrom(InputRecord *ir) { IRResultType result; IR_GIVE_FIELD(ir, this->mGradient, _IFT_TransportGradientPeriodic_gradient) this->mCenterCoord = {0., 0., 0.}; IR_GIVE_OPTIONAL_FIELD(ir, this->mCenterCoord, _IFT_TransportGradientPeriodic_centerCoords) IR_GIVE_FIELD(ir, this->masterSet, _IFT_TransportGradientPeriodic_masterSet) IR_GIVE_FIELD(ir, this->jump, _IFT_TransportGradientPeriodic_jump) return ActiveBoundaryCondition :: initializeFrom(ir); //return PrescribedGradientHomogenization::initializeFrom(ir); }
IRResultType StaggeredSolver :: initializeFrom(InputRecord *ir) { IRResultType result; // Required by IR_GIVE_FIELD macro NRSolver ::initializeFrom(ir); IR_GIVE_FIELD(ir, this->totalIdList, _IFT_StaggeredSolver_DofIdList); IR_GIVE_FIELD(ir, this->idPos, _IFT_StaggeredSolver_DofIdListPositions); this->instanciateYourself(); return IRRT_OK; }
IRResultType MicroplaneMaterial :: initializeFrom(InputRecord *ir) { IRResultType result; // Required by IR_GIVE_FIELD macro StructuralMaterial :: initializeFrom(ir); // elastic constants IR_GIVE_FIELD(ir, E, _IFT_MicroplaneMaterial_e); IR_GIVE_FIELD(ir, nu, _IFT_MicroplaneMaterial_n); // number of microplanes IR_GIVE_FIELD(ir, numberOfMicroplanes, _IFT_MicroplaneMaterial_nmp); this->initializeData(numberOfMicroplanes); return IRRT_OK; }
IRResultType PiecewiseLinFunction :: initializeFrom(InputRecord *ir) { const char *__proc = "initializeFrom"; // Required by IR_GIVE_FIELD macro IRResultType result; // Required by IR_GIVE_FIELD macro LoadTimeFunction :: initializeFrom(ir); IR_GIVE_FIELD(ir, numberOfPoints, IFT_PiecewiseLinFunction_npoints, "npoints"); // Macro IR_GIVE_FIELD(ir, dates, IFT_PiecewiseLinFunction_t, "t"); // Macro IR_GIVE_FIELD(ir, values, IFT_PiecewiseLinFunction_ft, "f(t)"); // Macro return IRRT_OK; }
IRResultType Reinforcement :: initializeFrom(InputRecord *ir) { IRResultType result; // Required by IR_GIVE_FIELD macro # ifdef VERBOSE // VERBOSE_PRINT1 ("Instanciating load ",number) # endif //Load :: initializeFrom(ir); IR_GIVE_FIELD(ir, porosity, _IFT_Reinforcement_porosity); IR_GIVE_FIELD(ir, shapefactor, _IFT_Reinforcement_shapeFactor); IR_GIVE_FIELD(ir, permeability, _IFT_Reinforcement_permeability); return IRRT_OK; }
IRResultType SimpleCrossSection :: initializeFrom(InputRecord *ir) // // instanciates receiver from input record // { const char *__proc = "initializeFrom"; // Required by IR_GIVE_FIELD macro IRResultType result; // Required by IR_GIVE_FIELD macro double value; this->CrossSection :: initializeFrom(ir); double thick = 0.0; if ( ir->hasField(IFT_SimpleCrossSection_thick, "thick")) { IR_GIVE_OPTIONAL_FIELD(ir, thick, IFT_SimpleCrossSection_thick, "thick"); // Macro propertyDictionary->add(CS_Thickness, thick); } double width = 0.0; if ( ir->hasField(IFT_SimpleCrossSection_width, "width")) { IR_GIVE_OPTIONAL_FIELD(ir, width, IFT_SimpleCrossSection_width, "width"); // Macro propertyDictionary->add(CS_Width, width); } double area = 0.0; if ( ir->hasField(IFT_SimpleCrossSection_area, "area") ) { IR_GIVE_FIELD(ir, area, IFT_SimpleCrossSection_area, "area"); // Macro } else { area = thick*width; } propertyDictionary->add(CS_Area, area); value = 0.0; IR_GIVE_OPTIONAL_FIELD(ir, value, IFT_SimpleCrossSection_iy, "iy"); // Macro propertyDictionary->add(CS_InertiaMomentY, value); value = 0.0; IR_GIVE_OPTIONAL_FIELD(ir, value, IFT_SimpleCrossSection_iz, "iz"); // Macro propertyDictionary->add(CS_InertiaMomentZ, value); value = 0.0; IR_GIVE_OPTIONAL_FIELD(ir, value, IFT_SimpleCrossSection_ik, "ik"); // Macro propertyDictionary->add(CS_TorsionMomentX, value); double beamshearcoeff=0.0; IR_GIVE_OPTIONAL_FIELD(ir, beamshearcoeff, IFT_SimpleCrossSection_shearcoeff, "beamshearcoeff"); // Macro propertyDictionary->add(CS_BeamShearCoeff, beamshearcoeff); value = 0.0; IR_GIVE_OPTIONAL_FIELD(ir, value, IFT_SimpleCrossSection_shearareay, "shearareay"); // Macro if (value == 0.0) value=beamshearcoeff * area; propertyDictionary->add(CS_SHEAR_AREA_Y, value); value = 0.0; IR_GIVE_OPTIONAL_FIELD(ir, value, IFT_SimpleCrossSection_shearareaz, "shearareaz"); // Macro if (value == 0.0) value=beamshearcoeff * area; propertyDictionary->add(CS_SHEAR_AREA_Z, value); return IRRT_OK; }
IRResultType CebFipSlip90Material :: initializeFrom(InputRecord *ir) { const char *__proc = "initializeFrom"; // Required by IR_GIVE_FIELD macro IRResultType result; // Required by IR_GIVE_FIELD macro IR_GIVE_FIELD(ir, tmax, IFT_CebFipSlip90Material_tmax, "tmax"); // Macro IR_GIVE_FIELD(ir, tres, IFT_CebFipSlip90Material_tres, "tres"); // Macro IR_GIVE_FIELD(ir, s1, IFT_CebFipSlip90Material_s1, "s1"); // Macro IR_GIVE_FIELD(ir, s2, IFT_CebFipSlip90Material_s2, "s2"); // Macro IR_GIVE_FIELD(ir, s3, IFT_CebFipSlip90Material_s3, "s3"); // Macro alpha = 0.4; return StructuralMaterial :: initializeFrom(ir); }
IRResultType LIBeam3dNL :: initializeFrom(InputRecord *ir) { const char *__proc = "initializeFrom"; // Required by IR_GIVE_FIELD macro IRResultType result; // Required by IR_GIVE_FIELD macro // first call parent NLStructuralElement :: initializeFrom(ir); IR_GIVE_FIELD(ir, referenceNode, IFT_LIBeam3dNL_refnode, "refnode"); // Macro if ( referenceNode == 0 ) { _error("instanciateFrom: wrong reference node specified"); } /* * if (this->hasString (initString, "dofstocondense")) { * dofsToCondense = this->ReadIntArray (initString, "dofstocondense"); * if (dofsToCondense->giveSize() >= 12) * _error ("instanciateFrom: wrong input data for condensed dofs"); * } else { * dofsToCondense = NULL; * } */ // compute initial triad at centre - requires nodal coordinates FloatMatrix lcs; this->giveLocalCoordinateSystem(lcs); this->tc.beTranspositionOf(lcs); this->computeGaussPoints(); return IRRT_OK; }
IRResultType DoublePowerLawMaterial :: initializeFrom(InputRecord *ir) { const char *__proc = "initializeFrom"; // Required by IR_GIVE_FIELD macro IRResultType result; // Required by IR_GIVE_FIELD macro MaxwellChainMaterial :: initializeFrom(ir); IR_GIVE_FIELD(ir, E28, IFT_DoublePowerLawMaterial_e28, "e28"); // Macro IR_GIVE_FIELD(ir, fi1, IFT_DoublePowerLawMaterial_fi1, "fi1"); // Macro IR_GIVE_FIELD(ir, m, IFT_DoublePowerLawMaterial_m, "m"); // Macro IR_GIVE_FIELD(ir, n, IFT_DoublePowerLawMaterial_n, "n"); // Macro IR_GIVE_FIELD(ir, alpha, IFT_DoublePowerLawMaterial_alpha, "alpha"); // Macro return IRRT_OK; }
IRResultType IncrementalLinearStatic :: initializeFrom(InputRecord *ir) { IRResultType result; IR_GIVE_OPTIONAL_FIELD(ir, discreteTimes, _IFT_IncrementalLinearStatic_prescribedtimes); if ( discreteTimes.giveSize() > 0 ) { numberOfSteps = discreteTimes.giveSize(); endOfTimeOfInterest = discreteTimes.at( discreteTimes.giveSize() ); fixedSteps = false; } else { deltaT = 1.0; IR_GIVE_OPTIONAL_FIELD(ir, deltaT, _IFT_IncrementalLinearStatic_deltat); IR_GIVE_FIELD(ir, numberOfSteps, _IFT_EngngModel_nsteps); endOfTimeOfInterest = deltaT * numberOfSteps; fixedSteps = true; } IR_GIVE_OPTIONAL_FIELD(ir, endOfTimeOfInterest, _IFT_IncrementalLinearStatic_endoftimeofinterest); int val = 0; IR_GIVE_OPTIONAL_FIELD(ir, val, _IFT_EngngModel_lstype); solverType = ( LinSystSolverType ) val; val = 0; IR_GIVE_OPTIONAL_FIELD(ir, val, _IFT_EngngModel_smtype); sparseMtrxType = ( SparseMtrxType ) val; //StructuralEngngModel::initializeFrom (ir); return IRRT_OK; }
IRResultType EnrichmentItem :: initializeFrom(InputRecord *ir) { const char *__proc = "initializeFrom"; // Required by IR_GIVE_FIELD macro IRResultType result; // Required by IR_GIVE_FIELD macro this->geometry = 0; this->enrichmentFunction = 0; IR_GIVE_FIELD(ir, geometry, IFT_EnrichmentItem_geometryItemNr, "geometryitem"); // Macro IR_GIVE_FIELD(ir, enrichmentFunction, IFT_EnrichmentItem_enrichmentFunctionNr, "enrichmentfunction"); // Macro // this->setEnrichmentFunction(enrItemFunction); // this should go into enrichmentfunction probably // enrItemFunction->insertEnrichmentItem(this); // enrItemFunction->setActive(this); return IRRT_OK; }
IRResultType TrabBoneNL3D :: initializeFrom(InputRecord *ir) { IRResultType result; // Required by IR_GIVE_FIELD macro result = TrabBone3D :: initializeFrom(ir); if ( result != IRRT_OK ) { return result; } result = StructuralNonlocalMaterialExtensionInterface :: initializeFrom(ir); if ( result != IRRT_OK ) { return result; } IR_GIVE_FIELD(ir, R, _IFT_TrabBoneNL3D_r); if ( R < 0.0 ) { R = 0.0; } mParam = 2.; IR_GIVE_OPTIONAL_FIELD(ir, mParam, _IFT_TrabBoneNL3D_m); return IRRT_OK; }
IRResultType MixedGradientPressureWeakPeriodic :: initializeFrom(InputRecord *ir) { IRResultType result; MixedGradientPressureBC :: initializeFrom(ir); IR_GIVE_FIELD(ir, this->order, _IFT_MixedGradientPressureWeakPeriodic_order); if ( this->order < 0 ) { OOFEM_ERROR("order must be at least 0"); } int nsd = this->domain->giveNumberOfSpatialDimensions(); int total = nsd * nsd * ( int ) pow(double ( order + 1 ), nsd - 1); this->tractionsdman->setNumberOfDofs(0); t_id.clear(); for ( int i = 1; i <= total; ++i ) { int dofid = this->domain->giveNextFreeDofID(); t_id.followedBy(dofid); // Simply use t_i = S_i . n, where S_1 = [1,0,0;0,0,0;0,0,0], S_2 = [0,1,0;0,0,0;0,0,0], etc. // then the linear terms, [x,0,0], [0,x,0] ... and so on this->tractionsdman->appendDof( new MasterDof( tractionsdman.get(), ( DofIDItem ) dofid ) ); } return IRRT_OK; }
// reads the model parameters from the input file IRResultType MisesMat :: initializeFrom(InputRecord *ir) { IRResultType result; // required by IR_GIVE_FIELD macro result = StructuralMaterial :: initializeFrom(ir); if ( result != IRRT_OK ) return result; result = linearElasticMaterial->initializeFrom(ir); // takes care of elastic constants if ( result != IRRT_OK ) return result; G = static_cast< IsotropicLinearElasticMaterial * >(linearElasticMaterial)->giveShearModulus(); K = static_cast< IsotropicLinearElasticMaterial * >(linearElasticMaterial)->giveBulkModulus(); IR_GIVE_FIELD(ir, sig0, _IFT_MisesMat_sig0); // uniaxial yield stress H = 0.; IR_GIVE_OPTIONAL_FIELD(ir, H, _IFT_MisesMat_h); // hardening modulus /*********************************************************************************************************/ omega_crit = 0; IR_GIVE_OPTIONAL_FIELD(ir, omega_crit, _IFT_MisesMat_omega_crit); // critical damage a = 0; IR_GIVE_OPTIONAL_FIELD(ir, a, _IFT_MisesMat_a); // exponent in damage law /********************************************************************************************************/ return IRRT_OK; }
IRResultType HyperElasticMaterial :: initializeFrom(InputRecord *ir) { const char *__proc = "initializeFrom"; // Required by IR_GIVE_FIELD macro IRResultType result; // Required by IR_GIVE_FIELD macro StructuralMaterial :: initializeFrom(ir); // Read material properties here IR_GIVE_FIELD(ir, K, IFT_HyperElasticMaterial_k, "k"); // Macro IR_GIVE_FIELD(ir, G, IFT_HyperElasticMaterial_g, "g"); return IRRT_OK; }
IRResultType SpringElement :: initializeFrom(InputRecord *ir) { IRResultType result; // Required by IR_GIVE_FIELD macro int _mode; IR_GIVE_FIELD(ir, _mode, _IFT_SpringElement_mode); IR_GIVE_FIELD(ir, springConstant, _IFT_SpringElement_springConstant); this->mode = ( SpringElementType ) _mode; if ( mode != SE_1D_SPRING ) { IR_GIVE_OPTIONAL_FIELD(ir, this->dir, _IFT_SpringElement_orientation); this->dir.normalize(); } return StructuralElement :: initializeFrom(ir); }