コード例 #1
0
ファイル: propagationlaw.C プロジェクト: Micket/oofem
void PLnodeRadius :: giveInputRecord(DynamicInputRecord &input)
{
    int number = 1;
    input.setRecordKeywordField(this->giveInputRecordName(), number);

    input.setField(mRadius, _IFT_PLnodeRadius_Radius);
}
コード例 #2
0
void
SolutionbasedShapeFunction :: setLoads(EngngModel *myEngngModel, int d)
{
    DynamicInputRecord ir;
    FloatArray gradP;

    gradP.resize( this->giveDomain()->giveNumberOfSpatialDimensions() );
    gradP.zero();
    gradP.at(d) = 1.0;

    ir.setRecordKeywordField("deadweight", 1);
    ir.setField(gradP, _IFT_Load_components);
    ir.setField(1, _IFT_GeneralBoundaryCondition_timeFunct);

    int bcID = myEngngModel->giveDomain(1)->giveNumberOfBoundaryConditions() + 1;
    GeneralBoundaryCondition *myBodyLoad;
    myBodyLoad = classFactory.createBoundaryCondition( "deadweight", bcID, myEngngModel->giveDomain(1) );
    myBodyLoad->initializeFrom(& ir);
    myEngngModel->giveDomain(1)->setBoundaryCondition(bcID, myBodyLoad);

    for ( int i = 1; i <= myEngngModel->giveDomain(1)->giveNumberOfElements(); i++ ) {
        IntArray *blArray;
        blArray = myEngngModel->giveDomain(1)->giveElement(i)->giveBodyLoadArray();
        blArray->resizeWithValues(blArray->giveSize() + 1);
        blArray->at( blArray->giveSize() ) = bcID;
    }
}
コード例 #3
0
void PLCrackPrescribedDir :: giveInputRecord(DynamicInputRecord &input)
{
	int number = 1;
    input.setRecordKeywordField(this->giveInputRecordName(), number);

    input.setField(mAngle			, _IFT_PLCrackPrescribedDir_Dir);
    input.setField(mIncrementLength	, _IFT_PLCrackPrescribedDir_IncLength);
}
コード例 #4
0
void
Delamination :: appendInputRecords(DynamicDataReader &oDR)
{
    ///@todo almost everything is copied from EnrichmentItem :: giveInputRecord, should be written in a better way
    DynamicInputRecord *eiRec = new DynamicInputRecord();
    FEMComponent :: giveInputRecord(* eiRec);

    eiRec->setField(mEnrFrontIndex,                     _IFT_EnrichmentItem_front);
    eiRec->setField(mPropLawIndex,                      _IFT_EnrichmentItem_propagationlaw);

    // Delamination specific records
    eiRec->setField(this->interfaceNum, _IFT_Delamination_interfacenum);
    eiRec->setField(this->crossSectionNum, _IFT_Delamination_csnum);
    eiRec->setField(this->matNum, _IFT_Delamination_CohesiveZoneMaterial);


    oDR.insertInputRecord(DataReader :: IR_enrichItemRec, eiRec);

    // Enrichment function
    DynamicInputRecord *efRec = new DynamicInputRecord();
    mpEnrichmentFunc->giveInputRecord(* efRec);
    oDR.insertInputRecord(DataReader :: IR_enrichFuncRec, efRec);


    // Enrichment domain

    DynamicInputRecord *geoRec = new DynamicInputRecord();
    geoRec->setRecordKeywordField(this->giveInputRecordName(), 1);

    IntArray idList;
    idList.resize( dofManList.size() );
    for ( size_t i = 0; i < dofManList.size(); i++ ) {
        idList.at(i + 1) = dofManList [ i ];
    }

    geoRec->setField(idList, _IFT_ListBasedEI_list);

    oDR.insertInputRecord(DataReader :: IR_geoRec, geoRec);

    // Enrichment front
    if ( mEnrFrontIndex != 0 ) {
        DynamicInputRecord *efrRecStart = new DynamicInputRecord();
        mpEnrichmentFrontStart->giveInputRecord(* efrRecStart);
        oDR.insertInputRecord(DataReader :: IR_enrichFrontRec, efrRecStart);

        DynamicInputRecord *efrRecEnd = new DynamicInputRecord();
        mpEnrichmentFrontEnd->giveInputRecord(* efrRecEnd);
        oDR.insertInputRecord(DataReader :: IR_enrichFrontRec, efrRecEnd);
    }

    if ( mPropLawIndex != 0 ) {
        // Propagation law
        DynamicInputRecord *plRec = new DynamicInputRecord();
        this->mpPropagationLaw->giveInputRecord(* plRec);
        oDR.insertInputRecord(DataReader :: IR_propagationLawRec, plRec);
    }
}
コード例 #5
0
ファイル: plmaterialforce.C プロジェクト: erisve/oofem
void PLMaterialForce :: giveInputRecord(DynamicInputRecord &input)
{
    int number = 1;
    input.setRecordKeywordField(this->giveInputRecordName(), number);

    input.setField(mRadius,                     _IFT_PLMaterialForce_Radius);
    input.setField(mIncrementLength,            _IFT_PLMaterialForce_IncLength);
    input.setField(mCrackPropThreshold,         _IFT_PLMaterialForce_CrackPropThreshold);
}
コード例 #6
0
ファイル: xfemmanager.C プロジェクト: xyuan/oofem
void XfemManager :: giveInputRecord(DynamicInputRecord &input)
{
    input.setRecordKeywordField(_IFT_XfemManager_Name, 1);
    input.setField(numberOfEnrichmentItems, _IFT_XfemManager_numberOfEnrichmentItems);
    input.setField(mNumGpPerTri, _IFT_XfemManager_numberOfGpPerTri);
    input.setField(doVTKExport, _IFT_XfemManager_VTKExport);
    input.setField(vtkExportFields, _IFT_XfemManager_VTKExportFields);

    if ( mDebugVTK ) {
        input.setField(1, _IFT_XfemManager_debugVTK);
    }
}
コード例 #7
0
void DofManList :: giveInputRecord(DynamicInputRecord &input)
{
    input.setRecordKeywordField(this->giveInputRecordName(), 1);

	IntArray idList;
	idList.resize(dofManList.size());
    for ( size_t i = 0; i < dofManList.size(); i++ ) {
    	idList.at(i+1) = dofManList[i];
    }

    input.setField(idList, _IFT_DofManList_list);
}
コード例 #8
0
ファイル: plhoopstresscirc.C プロジェクト: xyuan/oofem
void PLHoopStressCirc :: giveInputRecord(DynamicInputRecord &input)
{
    int number = 1;
    input.setRecordKeywordField(this->giveInputRecordName(), number);

    input.setField(mRadius,                             _IFT_PLHoopStressCirc_Radius);
    input.setField(mAngleInc,                           _IFT_PLHoopStressCirc_AngleInc);
    input.setField(mIncrementLength,            _IFT_PLHoopStressCirc_IncLength);
    input.setField(mHoopStressThreshold,        _IFT_PLHoopStressCirc_HoopStressThreshold);

    if ( mUseRadialBasisFunc ) {
        input.setField(1,       _IFT_PLHoopStressCirc_RadialBasisFunc);
    }
}
コード例 #9
0
ファイル: geometry.C プロジェクト: Benjamin-git/OOFEM_Jim
void PolygonLine :: giveInputRecord(DynamicInputRecord &input)
{
    input.setRecordKeywordField( "PolygonLine", 1 );

    FloatArray points;
    int nVert = mVertices.size();
    points.resize(nVert * 2);

    for ( int i = 0; i < nVert; i++ ) {
        points.at(2 * i + 1) = mVertices [ i ].at(1);
        points.at(2 * i + 2) = mVertices [ i ].at(2);
    }

    input.setField(points, _IFT_PolygonLine_points);
}
コード例 #10
0
ファイル: set.C プロジェクト: rreissnerr/oofem
void Set :: giveInputRecord(DynamicInputRecord &input)
{
    input.setRecordKeywordField( _IFT_Set_Name, this->giveNumber() );

    if ( this->giveNodeList().giveSize() ) {
        input.setField(this->nodes, _IFT_Set_nodes);
    }
    if ( this->giveElementList().giveSize() ) {
        input.setField(this->elements, _IFT_Set_elements);
    }
    if ( this->giveBoundaryList().giveSize() ) {
        input.setField(this->elementBoundaries, _IFT_Set_elementBoundaries);
    }
    if ( this->giveEdgeList().giveSize() ) {
        input.setField(this->elementEdges, _IFT_Set_elementEdges);
    }
}
コード例 #11
0
ファイル: xfemmanager.C プロジェクト: Micket/oofem
void XfemManager :: giveInputRecord(DynamicInputRecord &input)
{
    input.setRecordKeywordField(giveInputRecordName(), 1);

    numberOfEnrichmentItems = giveNumberOfEnrichmentItems();
    input.setField(numberOfEnrichmentItems, _IFT_XfemManager_numberOfEnrichmentItems);

    numberOfNucleationCriteria = giveNumberOfNucleationCriteria();
    input.setField(numberOfNucleationCriteria, _IFT_XfemManager_numberOfNucleationCriteria);


    input.setField(mNumGpPerTri, _IFT_XfemManager_numberOfGpPerTri);
    input.setField(mNumTriRef, _IFT_XfemManager_numberOfTriRefs);
    input.setField(mEnrDofScaleFac, _IFT_XfemManager_enrDofScaleFac);
    input.setField(doVTKExport, _IFT_XfemManager_VTKExport);
    input.setField(vtkExportFields, _IFT_XfemManager_VTKExportFields);

    if ( mDebugVTK ) {
        input.setField(1, _IFT_XfemManager_debugVTK);
    }
}
コード例 #12
0
void
SolutionbasedShapeFunction :: setBoundaryConditionOnDof(Dof *d, double value)
{
    int bcID = d->giveBcId();

    if ( bcID == 0 ) {
        DynamicInputRecord ir;
        ir.setRecordKeywordField("boundarycondition", 1);
        ir.setField(1, _IFT_GeneralBoundaryCondition_timeFunct);
        ir.setField(value, _IFT_BoundaryCondition_PrescribedValue);

        bcID = d->giveDofManager()->giveDomain()->giveNumberOfBoundaryConditions() + 1;

        GeneralBoundaryCondition *myBC;
        myBC = classFactory.createBoundaryCondition( "boundarycondition", bcID, d->giveDofManager()->giveDomain() );
        myBC->initializeFrom(& ir);
        d->giveDofManager()->giveDomain()->setBoundaryCondition(bcID, myBC);

        d->setBcId(bcID);
    } else {
        BoundaryCondition *bc = static_cast< BoundaryCondition * >( d->giveDofManager()->giveDomain()->giveBc(bcID) );
        bc->setPrescribedValue(value);
    }
}
コード例 #13
0
void EnrichmentDomain_BG :: giveInputRecord(DynamicInputRecord &input)
{
    input.setRecordKeywordField(this->giveInputRecordName(), 1);

    bg->giveInputRecord(input);
}
コード例 #14
0
void WholeDomain :: giveInputRecord(DynamicInputRecord &input)
{
    input.setRecordKeywordField(this->giveInputRecordName(), 1);

}
コード例 #15
0
void
FEMComponent :: giveInputRecord(DynamicInputRecord &input)
{
    input.setRecordKeywordField(this->giveInputRecordName(), this->giveNumber());
}
コード例 #16
0
void PLDoNothing :: giveInputRecord(DynamicInputRecord &input)
{
	int number = 1;
    input.setRecordKeywordField(this->giveInputRecordName(), number);
}