OOFEM 3.0
Loading...
Searching...
No Matches
oofem::CrossSection Class Referenceabstract

#include <crosssection.h>

Inheritance diagram for oofem::CrossSection:
Collaboration diagram for oofem::CrossSection:

Public Member Functions

 CrossSection (int n, Domain *d)
virtual ~CrossSection ()
 Destructor.
int giveSetNumber () const
virtual bool hasProperty (CrossSectionProperty a)
virtual double give (CrossSectionProperty a, GaussPoint *gp) const
virtual double give (CrossSectionProperty a, const FloatArray &coords, Element *elem, bool local=true) const
virtual double give (int aProperty, GaussPoint *gp) const
virtual bool isCharacteristicMtrxSymmetric (MatResponseMode rMode) const
void printYourself () override
 Prints receiver state on stdout. Useful for debugging.
virtual int setupIntegrationPoints (IntegrationRule &irule, int npoints, Element *element)
virtual int setupIntegrationPoints (IntegrationRule &irule, int npointsXY, int npointsZ, Element *element)
virtual int testCrossSectionExtension (CrossSectExtension ext)
virtual int giveIPValue (FloatArray &answer, GaussPoint *ip, InternalStateType type, TimeStep *tStep)
virtual int packUnknowns (DataStream &buff, TimeStep *tStep, GaussPoint *ip)=0
virtual int unpackAndUpdateUnknowns (DataStream &buff, TimeStep *tStep, GaussPoint *ip)=0
virtual int estimatePackSize (DataStream &buff, GaussPoint *ip)=0
virtual double predictRelativeComputationalCost (GaussPoint *ip)
virtual double giveRelativeSelfComputationalCost ()
virtual double predictRelativeRedistributionCost (GaussPoint *gp)
void initializeFrom (InputRecord &ir) override
void giveInputRecord (DynamicInputRecord &input) override
virtual MaterialgiveMaterial (IntegrationPoint *ip) const =0
 hidden by virtual oofem::Material* TransportCrossSection::giveMaterial() const
virtual void saveIPContext (DataStream &stream, ContextMode mode, GaussPoint *gp)
virtual void restoreIPContext (DataStream &stream, ContextMode mode, GaussPoint *gp)
void saveContext (DataStream &stream, ContextMode mode) override
void restoreContext (DataStream &stream, ContextMode mode) override
Public Member Functions inherited from oofem::FEMComponent
 FEMComponent (int n, Domain *d)
virtual ~FEMComponent ()=default
 Virtual destructor.
virtual const char * giveClassName () const =0
virtual const char * giveInputRecordName () const =0
DomaingiveDomain () const
virtual void setDomain (Domain *d)
int giveNumber () const
void setNumber (int num)
virtual void updateLocalNumbering (EntityRenumberingFunctor &f)
virtual void initializeFrom (InputRecord &ir, int priority)
virtual void initializeFinish ()
virtual void postInitialize ()
 Performs post initialization steps. Called after all components are created and initialized.
virtual int checkConsistency ()
virtual void printOutputAt (FILE *file, TimeStep *tStep)
virtual InterfacegiveInterface (InterfaceType t)
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros).

Protected Attributes

Dictionary propertyDictionary
int setNumber
Protected Attributes inherited from oofem::FEMComponent
int number
 Component number.
Domaindomain
 Link to domain object, useful for communicating with other FEM components.

Detailed Description

Base abstract class representing cross section in finite element mesh.

The main idea, why cross section has been introduced, is to hide all details of cross section description from particular element. Generally elements do not communicate directly with material but communicate through cross section interface, which therefore can perform necessary integration (for example over layers of fibers).

The cross section returns properties like thickness and area.

The derived classes are supposed to be base cross section classes for particular type of analysis. They should declare general interface methods necessary.

In particular cross section implementation, where is necessary to perform integration over cross section volume (over layers, fibers, ...) and therefore generally one must keep complete load history in these integration points, the concept of master-slave integration points should be used.

Integration point generally can contain list of slave integration points therefore is called as master point. Slaves are used for example to implement layered or fibered cross sections by cross section class. Then in one "macro" master Gauss point, cross section creates few slaves (one per layer) and puts them into master list. When cross sections completes requests for particular master integration point, it performs integration over layers. It therefore calls material class for each layer, sending corresponding slave as parameter and integrates results.

See also
GaussPoint class for more detail.

Definition at line 107 of file crosssection.h.

Constructor & Destructor Documentation

◆ CrossSection()

◆ ~CrossSection()

oofem::CrossSection::~CrossSection ( )
virtual

Destructor.

Definition at line 50 of file crosssection.C.

Member Function Documentation

◆ estimatePackSize()

virtual int oofem::CrossSection::estimatePackSize ( DataStream & buff,
GaussPoint * ip )
pure virtual

Estimates the necessary pack size to hold all packed data of receiver. The corresponding material model service is invoked. The nature of packed data is typically material model dependent.

Parameters
buffCommunication buffer.
ipIntegration point.
Returns
Estimate of pack size.

Implemented in oofem::DummyCrossSection, oofem::EmptyCS, oofem::FiberedCrossSection, oofem::FluidCrossSection, oofem::LatticeCrossSection, oofem::LayeredCrossSection, oofem::SimpleCrossSection, oofem::SimpleTransportCrossSection, and oofem::StructuralInterfaceCrossSection.

References predictRelativeComputationalCost().

◆ give() [1/3]

double oofem::CrossSection::give ( CrossSectionProperty a,
const FloatArray & coords,
Element * elem,
bool local = true ) const
virtual

Returns the value of cross section property at given point (belonging to given element). the point coordinates can be specified using its local element coordinates or global coordinates (one of these two can be set to NULL) The default implementation assumes constant properties stored in propertyDictionary.

Parameters
aId of requested property.
coordslocal or global coordinates (determined by local parameter) of point of interest
elemreference to underlying element containing given point
gpIntegration point
Returns
Property value.

Reimplemented in oofem::LayeredCrossSection, oofem::SimpleCrossSection, and oofem::VariableCrossSection.

Definition at line 138 of file crosssection.C.

References OOFEM_ERROR, and propertyDictionary.

◆ give() [2/3]

double oofem::CrossSection::give ( CrossSectionProperty a,
GaussPoint * gp ) const
virtual

Returns the value of cross section property at given point. The default implementation assumes constant properties stored in propertyDictionary.

Parameters
aId of requested property.
gpIntegration point
Returns
Property value.

Reimplemented in oofem::FiberedCrossSection, oofem::LayeredCrossSection, oofem::SimpleCrossSection, and oofem::VariableCrossSection.

Definition at line 125 of file crosssection.C.

References OOFEM_ERROR, and propertyDictionary.

Referenced by oofem::Quasicontinuum::applyApproach3(), oofem::TR1_2D_SUPG::computeBCRhsTerm_MB(), oofem::CCTPlate3d::computeBodyLoadVectorAt(), oofem::CCTPlate::computeBodyLoadVectorAt(), oofem::DKTPlate3d::computeBodyLoadVectorAt(), oofem::DKTPlate::computeBodyLoadVectorAt(), oofem::QDKTPlate::computeBodyLoadVectorAt(), oofem::Quad1Mindlin::computeBodyLoadVectorAt(), oofem::Quad1MindlinShell3D::computeBodyLoadVectorAt(), oofem::XfemStructuralElementInterface::computeCohesiveForces(), oofem::XfemStructuralElementInterface::computeCohesiveTangent(), oofem::StructuralElementEvaluator::computeConsistentMassMatrix(), oofem::Truss3d::computeInitialStressMatrix(), oofem::TR1_2D_SUPG::computeLoadVector(), oofem::SurfaceTensionBoundaryCondition::computeLoadVectorFromElement(), oofem::CCTPlate3d::computeLocalCoordinates(), oofem::CCTPlate::computeLocalCoordinates(), oofem::DKTPlate3d::computeLocalCoordinates(), oofem::DKTPlate::computeLocalCoordinates(), oofem::MITC4Shell::computeLocalCoordinates(), oofem::QDKTPlate::computeLocalCoordinates(), oofem::RerShell::computeLocalCoordinates(), oofem::CCTPlate::computeLumpedMassMatrix(), oofem::DKTPlate::computeLumpedMassMatrix(), oofem::LIBeam2dNL::computeLumpedMassMatrix(), oofem::LIBeam3d2::computeLumpedMassMatrix(), oofem::LIBeam3dNL2::computeLumpedMassMatrix(), oofem::LIBeam3dNL::computeLumpedMassMatrix(), oofem::Quad1Mindlin::computeLumpedMassMatrix(), oofem::Quad1MindlinShell3D::computeLumpedMassMatrix(), oofem::Truss1d::computeLumpedMassMatrix(), oofem::Truss2d::computeLumpedMassMatrix(), oofem::Truss3d::computeLumpedMassMatrix(), oofem::MITC4Shell::computeStiffnessMatrix(), oofem::Quad1MindlinShell3D::computeStiffnessMatrix(), oofem::CCTPlate::computeStrainVectorInLayer(), oofem::DKTPlate::computeStrainVectorInLayer(), oofem::LIBeam2dNL::computeStrainVectorInLayer(), oofem::QDKTPlate::computeStrainVectorInLayer(), oofem::SurfaceTensionBoundaryCondition::computeTangentFromElement(), oofem::QClinearStatic::computeTotalVolumeOfInterpolationMesh(), oofem::QTruss1d::computeVolumeAround(), oofem::Structural2DElement::computeVolumeAround(), oofem::Truss1d::computeVolumeAround(), oofem::Truss2d::computeVolumeAround(), oofem::Truss3d::computeVolumeAround(), oofem::PrescribedDispSlipBCNeumannRC::computeWeightMatrix(), oofem::PrescribedDispSlipBCDirichletRC::domainSize(), oofem::PrescribedDispSlipBCNeumannRC::domainSize(), oofem::FiberedCrossSection::give(), oofem::LayeredCrossSection::give(), oofem::LayeredCrossSection::give(), oofem::SimpleCrossSection::give(), oofem::SimpleCrossSection::give(), oofem::MITC4Shell::giveDirectorVectors(), oofem::MITC4Shell::giveInternalForcesVector(), oofem::Quad1MindlinShell3D::giveInternalForcesVector(), oofem::Truss3d::giveIPValue(), oofem::MITC4Shell::giveMidplaneIPValue(), oofem::MITC4Shell::giveThickness(), oofem::PrescribedDispSlipBCNeumannRC::integrateTangentBStressSteel(), oofem::PrescribedDispSlipBCNeumannRC::integrateTangentRStressSteel(), and oofem::XfemStructuralElementInterface::XfemElementInterface_computeConsistentMassMatrix().

◆ give() [3/3]

virtual double oofem::CrossSection::give ( int aProperty,
GaussPoint * gp ) const
inlinevirtual

Returns the value of cross section property.

Parameters
aPropertyId of requested property.
gpIntegration point.
Returns
Property value.

Reimplemented in oofem::FiberedCrossSection, oofem::LatticeCrossSection, oofem::LayeredCrossSection, and oofem::SimpleCrossSection.

Definition at line 163 of file crosssection.h.

◆ giveInputRecord()

void oofem::CrossSection::giveInputRecord ( DynamicInputRecord & input)
overridevirtual

◆ giveIPValue()

int oofem::CrossSection::giveIPValue ( FloatArray & answer,
GaussPoint * ip,
InternalStateType type,
TimeStep * tStep )
virtual

Returns the integration point corresponding value in Reduced form.

Parameters
answercontain corresponding ip value, zero sized if not available
ipIntegration point.
typeDetermines the type of internal variable.
tStepTime step.
Returns
Nonzero if o.k, zero otherwise.

Reimplemented in oofem::FiberedCrossSection, oofem::FluidCrossSection, oofem::LatticeCrossSection, oofem::LayeredCrossSection, oofem::SimpleCrossSection, oofem::SimpleTransportCrossSection, and oofem::StructuralInterfaceCrossSection.

Definition at line 83 of file crosssection.C.

References oofem::FloatArray::at(), giveMaterial(), oofem::FEMComponent::giveNumber(), and oofem::FloatArray::resize().

Referenced by oofem::Truss3d::NodalAveragingRecoveryMI_computeNodalValue().

◆ giveMaterial()

virtual Material * oofem::CrossSection::giveMaterial ( IntegrationPoint * ip) const
pure virtual

hidden by virtual oofem::Material* TransportCrossSection::giveMaterial() const

Returns the material associated with the GP. Default implementation uses gp->giveMaterial() for backwards compatibility, but it should be overloaded in each specialized cross-section.

Implemented in oofem::DummyCrossSection, oofem::EmptyCS, oofem::FiberedCrossSection, oofem::FluidCrossSection, oofem::LatticeCrossSection, oofem::LayeredCrossSection, oofem::SimpleCrossSection, oofem::SimpleTransportCrossSection, oofem::StructuralCrossSection, and oofem::StructuralInterfaceCrossSection.

References restoreContext(), restoreIPContext(), saveContext(), and saveIPContext().

Referenced by oofem::Element::adaptiveMap(), oofem::LIBeam3dNL::computeTempCurv(), oofem::GPInitModule::doInit(), oofem::BTSigmaTerm2::evaluate(), oofem::BTSigTerm::evaluate(), oofem::gNTfTerm::evaluate(), oofem::InternalTMFluxSourceTerm::evaluate(), oofem::TMBTSigTerm::evaluate(), oofem::TMgNTfTerm::evaluate(), oofem::BDalphaPiTerm::evaluate_lin(), oofem::BTamNTerm::evaluate_lin(), oofem::BTdSigmadT::evaluate_lin(), oofem::BTmuBTerm::evaluate_lin(), oofem::BTmuVfBTerm::evaluate_lin(), oofem::BTSigmaTerm2::evaluate_lin(), oofem::BTSigTerm::evaluate_lin(), oofem::gNTfTerm::evaluate_lin(), oofem::NTamTBTerm::evaluate_lin(), oofem::NTcN::evaluate_lin(), oofem::NTmuVfSNTerm::evaluate_lin(), oofem::NLStructuralElement::giveInternalForcesVector(), giveIPValue(), oofem::IsotropicDamageMaterial1::MMI_map(), predictRelativeComputationalCost(), restoreIPContext(), and saveIPContext().

◆ giveRelativeSelfComputationalCost()

virtual double oofem::CrossSection::giveRelativeSelfComputationalCost ( )
inlinevirtual

Returns the weight representing relative computational cost of receiver The reference element is integral model in plane stress. Its weight is equal to 1.0. The other cross section models should compare to this reference.

Returns
Relative computational cost of self.

Definition at line 261 of file crosssection.h.

Referenced by predictRelativeComputationalCost().

◆ giveSetNumber()

int oofem::CrossSection::giveSetNumber ( ) const
inline

◆ hasProperty()

bool oofem::CrossSection::hasProperty ( CrossSectionProperty a)
virtual

Returns true if the dictionary contains the requested property.

Parameters
aId of requested property.

Definition at line 119 of file crosssection.C.

References propertyDictionary.

◆ initializeFrom()

void oofem::CrossSection::initializeFrom ( InputRecord & ir)
overridevirtual

Initializes receiver according to object description stored in input record. This function is called immediately after creating object using constructor. Input record can be imagined as data record in component database belonging to receiver. Receiver may use value-name extracting functions to extract particular field from record. Note that initializeFrom may be called mutiple times.

See also
IR_GIVE_FIELD
IR_GIVE_OPTIONAL_FIELD
Parameters
irInput record to initialize from.
priorityPriority of the input record. This is used to determine the order of initialization

Reimplemented from oofem::FEMComponent.

Reimplemented in oofem::DummyCrossSection, oofem::FiberedCrossSection, oofem::FluidCrossSection, oofem::LatticeCrossSection, oofem::LayeredCrossSection, oofem::SimpleCrossSection, oofem::SimpleTransportCrossSection, oofem::StructuralInterfaceCrossSection, oofem::VariableCrossSection, and oofem::WarpingCrossSection.

Definition at line 68 of file crosssection.C.

References _IFT_CrossSection_SetNumber, IR_GIVE_OPTIONAL_FIELD, and setNumber.

Referenced by oofem::FiberedCrossSection::initializeFrom(), oofem::LayeredCrossSection::initializeFrom(), and oofem::SimpleCrossSection::initializeFrom().

◆ isCharacteristicMtrxSymmetric()

virtual bool oofem::CrossSection::isCharacteristicMtrxSymmetric ( MatResponseMode rMode) const
inlinevirtual

Check for symmetry of stiffness matrix. Default implementation returns true. It can be moved to base Cross section class in the future.

Parameters
rModeResponse mode of material.
Returns
True if stiffness matrix of receiver is symmetric.

Reimplemented in oofem::DummyCrossSection, oofem::FiberedCrossSection, oofem::FluidCrossSection, oofem::LayeredCrossSection, oofem::SimpleCrossSection, oofem::SimpleTransportCrossSection, and oofem::StructuralCrossSection.

Definition at line 172 of file crosssection.h.

Referenced by oofem::BaseMixedPressureElement::computeStiffnessMatrix_uu(), oofem::GradDpElement::computeStiffnessMatrix_uu(), and oofem::GradientDamageElement::computeStiffnessMatrix_uu().

◆ packUnknowns()

virtual int oofem::CrossSection::packUnknowns ( DataStream & buff,
TimeStep * tStep,
GaussPoint * ip )
pure virtual

Pack all necessary data of integration point (according to element parallel_mode) into given communication buffer. The corresponding material model service for particular integration point is invoked. The nature of packed data is material model dependent. Typically, for material of "local" response (response depends only on integration point local state) no data are exchanged. For "nonlocal" constitutive models the send/receive of local values which undergo averaging is performed between local and corresponding remote elements.

Parameters
buffCommunication buffer.
tStepSolution step.
ipIntegration point.
Returns
Nonzero if successful.

Implemented in oofem::DummyCrossSection, oofem::EmptyCS, oofem::FiberedCrossSection, oofem::FluidCrossSection, oofem::LatticeCrossSection, oofem::LayeredCrossSection, oofem::SimpleCrossSection, oofem::SimpleTransportCrossSection, and oofem::StructuralInterfaceCrossSection.

◆ predictRelativeComputationalCost()

double oofem::CrossSection::predictRelativeComputationalCost ( GaussPoint * ip)
virtual

Returns the weight representing relative computational cost of receiver The reference cross section is integral model in plane stress. Its weight is equal to 1.0 Default implementation computes average computational cost of material model and multiplies it by cross section type weight (obtained by giveRelativeSelfComputationalCost()) The other cross section models should compare to this reference.

Parameters
ipIntegration point.
Returns
Prediction of the computational cost.

Definition at line 152 of file crosssection.C.

References giveMaterial(), and giveRelativeSelfComputationalCost().

Referenced by estimatePackSize().

◆ predictRelativeRedistributionCost()

virtual double oofem::CrossSection::predictRelativeRedistributionCost ( GaussPoint * gp)
inlinevirtual
Returns
Relative redistribution cost of the receiver.

Definition at line 265 of file crosssection.h.

◆ printYourself()

void oofem::CrossSection::printYourself ( )
overridevirtual

Prints receiver state on stdout. Useful for debugging.

Reimplemented from oofem::FEMComponent.

Reimplemented in oofem::FiberedCrossSection, and oofem::LayeredCrossSection.

Definition at line 95 of file crosssection.C.

References propertyDictionary.

◆ restoreContext()

void oofem::CrossSection::restoreContext ( DataStream & stream,
ContextMode mode )
overridevirtual

Restores the receiver state previously written in stream.

See also
saveContext
Parameters
streamInput stream.
modeDetermines amount of info available in stream (state, definition, ...).
Exceptions
throwsan ContextIOERR exception if error encountered.

Reimplemented from oofem::FEMComponent.

Reimplemented in oofem::SimpleCrossSection.

Definition at line 172 of file crosssection.C.

References oofem::CIO_IOERR, CM_Definition, propertyDictionary, oofem::DataStream::read(), setNumber, and THROW_CIOERR.

Referenced by giveMaterial(), and oofem::SimpleCrossSection::restoreContext().

◆ restoreIPContext()

void oofem::CrossSection::restoreIPContext ( DataStream & stream,
ContextMode mode,
GaussPoint * gp )
virtual

Reads integration point state to output stream.

Parameters
streamOutput stream.
modeDetermines amount of info required in stream (state, definition, ...).
gpintegration point.
Exceptions
throwsan ContextIOERR exception if error encountered.

Reimplemented in oofem::FiberedCrossSection, and oofem::LayeredCrossSection.

Definition at line 112 of file crosssection.C.

References giveMaterial(), and oofem::Material::restoreIPContext().

Referenced by giveMaterial(), oofem::FiberedCrossSection::restoreIPContext(), and oofem::LayeredCrossSection::restoreIPContext().

◆ saveContext()

void oofem::CrossSection::saveContext ( DataStream & stream,
ContextMode mode )
overridevirtual

Stores receiver state to output stream.

Parameters
streamOutput stream.
modeDetermines amount of info required in stream (state, definition, ...).
Exceptions
throwsan ContextIOERR exception if error encountered.

Reimplemented from oofem::FEMComponent.

Reimplemented in oofem::SimpleCrossSection.

Definition at line 158 of file crosssection.C.

References oofem::CIO_IOERR, CM_Definition, propertyDictionary, setNumber, THROW_CIOERR, and oofem::DataStream::write().

Referenced by giveMaterial(), and oofem::SimpleCrossSection::saveContext().

◆ saveIPContext()

void oofem::CrossSection::saveIPContext ( DataStream & stream,
ContextMode mode,
GaussPoint * gp )
virtual

Stores integration point state to output stream.

Parameters
streamOutput stream.
modeDetermines amount of info required in stream (state, definition, ...).
gpintegration point.
Exceptions
throwsan ContextIOERR exception if error encountered.

Reimplemented in oofem::FiberedCrossSection, and oofem::LayeredCrossSection.

Definition at line 104 of file crosssection.C.

References giveMaterial(), and oofem::Material::saveIPContext().

Referenced by giveMaterial(), oofem::FiberedCrossSection::saveIPContext(), and oofem::LayeredCrossSection::saveIPContext().

◆ setupIntegrationPoints() [1/2]

int oofem::CrossSection::setupIntegrationPoints ( IntegrationRule & irule,
int npoints,
Element * element )
virtual

◆ setupIntegrationPoints() [2/2]

int oofem::CrossSection::setupIntegrationPoints ( IntegrationRule & irule,
int npointsXY,
int npointsZ,
Element * element )
virtual

Sets up integration rule for the given element. Default behavior is just to call the Gauss integration rule, but for example the layered and fibered crosssections need to do their own thing.

Parameters
iruleIntegration rule to set up.
npointsNumber of integration points.
elementElement which the integration rule belongs to.
Returns
Number of integration points.

Reimplemented in oofem::LayeredCrossSection.

Definition at line 62 of file crosssection.C.

References oofem::Element::giveIntegrationDomain(), oofem::Element::giveMaterialMode(), and oofem::IntegrationRule::setUpIntegrationPoints().

◆ testCrossSectionExtension()

virtual int oofem::CrossSection::testCrossSectionExtension ( CrossSectExtension ext)
inlinevirtual

Returns nonzero, if receiver implements required extension.

Parameters
extRequired extension.
Returns
Nonzero, if supported, zero otherwise.

Reimplemented in oofem::LatticeCrossSection, oofem::StructuralCrossSection, and oofem::StructuralInterfaceCrossSection.

Definition at line 199 of file crosssection.h.

◆ unpackAndUpdateUnknowns()

virtual int oofem::CrossSection::unpackAndUpdateUnknowns ( DataStream & buff,
TimeStep * tStep,
GaussPoint * ip )
pure virtual

Unpack and updates all necessary data of given integration point (according to element parallel_mode) into given communication buffer.

See also
packUnknowns service.
Parameters
buffCommunication buffer.
tStepSolution step.
ipIntegration point.
Returns
Nonzero if successful.

Implemented in oofem::DummyCrossSection, oofem::EmptyCS, oofem::FiberedCrossSection, oofem::FluidCrossSection, oofem::LatticeCrossSection, oofem::LayeredCrossSection, oofem::SimpleCrossSection, oofem::SimpleTransportCrossSection, and oofem::StructuralInterfaceCrossSection.

Member Data Documentation

◆ propertyDictionary

◆ setNumber

int oofem::CrossSection::setNumber
protected

The documentation for this class was generated from the following files:

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011