xc
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members

Finite element as seen by analysis. More...

#include <FE_Element.h>

Inheritance diagram for XC::FE_Element:
Inheritance graph
[legend]
Collaboration diagram for XC::FE_Element:
Collaboration graph
[legend]

Public Member Functions

virtual ~FE_Element (void)
 Destructor.
 
virtual const IDgetDOFtags (void) const
 Returns the tags of the associated DOF_Groups. More...
 
virtual const IDgetID (void) const
 Method to return the ID containing equation numbers. More...
 
void setAnalysisModel (AnalysisModel &theModel)
 Sets the link with the analysis model. More...
 
virtual int setID (void)
 Method to set the corresponding index of the ID to value. More...
 
virtual const MatrixgetTangent (Integrator *theIntegrator)
 Computes and returns the tangent stiffness matrix. More...
 
virtual const VectorgetResidual (Integrator *theIntegrator)
 Computes and returns the residual vector. More...
 
virtual void zeroTangent (void)
 Zeros the tangent matrix. More...
 
virtual void addKtToTang (double fact=1.0)
 Adds the product of fact times the element's tangent stiffness matrix to the tangent. More...
 
virtual void addKiToTang (double fact=1.0)
 Adds the product of fact times the element's initial stiffness matrix to the tangent. More...
 
virtual void addCtoTang (double fact=1.0)
 Adds the product of fact times the element's damping matrix to the tangent. More...
 
virtual void addMtoTang (double fact=1.0)
 Adds the product of fact times the element's mass matrix to the tangent. More...
 
virtual void zeroResidual (void)
 Zeros the residual vector. More...
 
virtual void addRtoResidual (double fact=1.0)
 Adds to the residual vector the product of the elements residual load vector and fact. More...
 
virtual void addRIncInertiaToResidual (double fact=1.0)
 Adds to the residual vector the product of the elements residual load vector with inertia forces included and fact. More...
 
virtual const VectorgetTangForce (const Vector &x, double fact=1.0)
 Returns the product of FE_Elements current tangent matrix and a Vector whose values are obtained by taking the product of {fact} and those elements of the Vector disp associated with the FE_Elements equation numbers. More...
 
virtual const VectorgetK_Force (const Vector &x, double fact=1.0)
 
virtual const VectorgetC_Force (const Vector &x, double fact=1.0)
 
virtual const VectorgetM_Force (const Vector &x, double fact=1.0)
 Returns the product of elements current mass matrix and a Vector whose values are obtained by taking the product of {fact} and those elements of the Vector accel associated with the FE_Elements equation numbers. More...
 
virtual void addM_Force (const Vector &accel, double fact=1.0)
 Adds to the residual the product of elements current mass matrix and a Vector whose values are obtained by taking the product of {fact} and those elements of the Vector accel associated with the FE_Elements equation numbers. More...
 
virtual void addD_Force (const Vector &vel, double fact=1.0)
 Adds to the residual the product of elements current damping matrix and a Vector whose values are obtained by taking the product of {fact} and those elements of the Vector vel associated with the FE_Elements equation numbers. More...
 
virtual int updateElement (void)
 
virtual IntegratorgetLastIntegrator (void)
 Method which returns the last integrator supplied in a formTangent() or a formResidual() invocation. More...
 
virtual const VectorgetLastResponse (void)
 A method which invokes getLastResponse() on the Integrator object that was last passed as an argument to any of the routines. More...
 
ElementgetElement (void)
 Returns a pointer to the associated element.
 
std::string getElementClassName (void) const
 Returns the name of the associated element (if any).
 
virtual void Print (std::ostream &, int=0)
 
virtual void addResistingForceSensitivity (int gradNumber, double fact=1.0)
 
virtual void addM_ForceSensitivity (int gradNumber, const Vector &vect, double fact=1.0)
 
virtual void addD_ForceSensitivity (int gradNumber, const Vector &vect, double fact=1.0)
 
virtual int commitSensitivity (int gradNum, int numGrads)
 
- Public Member Functions inherited from XC::TaggedObject
 TaggedObject (int tag, CommandEntity *owr=nullptr)
 Constructor. More...
 
virtual TaggedObjectgetCopy (void) const
 Virtual constructor.
 
void assignTag (int newTag)
 Set tag (to be called from Python interface).
 
int getTag (void) const
 Returns the tag associated with the object.
 
virtual void Print (std::ostream &, int flag=0) const
 Print stuff.
 
boost::python::dict getPyDict (void) const
 Return a Python dictionary with the object members values.
 
void setPyDict (const boost::python::dict &)
 Set the values of the object members from a Python dictionary.
 
- Public Member Functions inherited from CommandEntity
 CommandEntity (CommandEntity *owr=nullptr)
 Default constructor.
 
CommandEntityOwner (void)
 Return a pointer to the object owner.
 
const CommandEntityOwner (void) const
 Return un puntero al objeto propietario de ESTE.
 
const StandardOutputWrappergetStandardOutputWrapper (void) const
 Return the regular output stream wrapper.
 
StandardOutputWrappergetStandardOutputWrapper (void)
 Return the regular output stream wrapper.
 
const std::string & getLogFileName (void) const
 Returns log file name.
 
void setLogFileName (const std::string &)
 Sets log file name.
 
const std::string & getErrFileName (void) const
 Returns err file name.
 
void setErrFileName (const std::string &)
 Sets error file name.
 
const std::string & getOutputFileName (void) const
 Returns regular output file name.
 
void setOutputFileName (const std::string &)
 Sets regular output file name.
 
boost::python::object evalPy (boost::python::object dict, const std::string &)
 Return the Python object that results from evaluating the argument.
 
boost::python::object execPy (boost::python::object dict, const std::string &)
 Return the Python objects that results from executing the code in the string argument.
 
boost::python::object execFilePy (boost::python::object dict, const std::string &)
 Return the Python object that results from executing the code in the file.
 
- Public Member Functions inherited from EntityWithProperties
 EntityWithProperties (EntityWithProperties *owr=nullptr)
 Default constructor.
 
virtual bool operator== (const EntityWithProperties &) const
 Comparison operator.
 
void clearPyProps (void)
 Clear python properties map.
 
bool hasPyProp (const std::string &)
 Returns true if property exists.
 
boost::python::object getPyProp (const std::string &str)
 Return the Python object with the name being passed as parameter.
 
void setPyProp (std::string str, boost::python::object val)
 Sets/appends a value tho the Python object's dictionary.
 
void copyPropsFrom (const EntityWithProperties &)
 Copy the properties from the argument.
 
boost::python::list getPropNames (void) const
 Return the names of the object properties weightings.
 
const PythonDict & getPropertiesDict (void) const
 Return a std::map container with the properties of the object.
 
- Public Member Functions inherited from EntityWithOwner
 EntityWithOwner (EntityWithOwner *owr=nullptr)
 Default constructor.
 
 EntityWithOwner (const EntityWithOwner &)
 Copy constructor.
 
EntityWithOwneroperator= (const EntityWithOwner &)
 Assignment operator.
 
virtual bool operator== (const EntityWithOwner &) const
 Comparison operator.
 
virtual ~EntityWithOwner (void)
 Virtual destructor.
 
virtual std::string getClassName (void) const
 Returns demangled class name.
 
void set_owner (EntityWithOwner *owr)
 Assigns the owner of the object.
 
EntityWithOwnerOwner (void)
 
const EntityWithOwnerOwner (void) const
 

Protected Member Functions

void addLocalM_Force (const Vector &accel, double fact=1.0)
 
void addLocalD_Force (const Vector &vel, double fact=1.0)
 
void addLocalM_ForceSensitivity (int gradNumber, const Vector &accel, double fact=1.0)
 
void addLocalD_ForceSensitivity (int gradNumber, const Vector &vel, double fact=1.0)
 
 FE_Element (int tag, Element *theElement)
 Construictor that take the corresponding model element. More...
 
 FE_Element (int tag, int numDOF_Group, int ndof)
 Constructor. More...
 
- Protected Member Functions inherited from XC::TaggedObject
void setTag (int newTag)
 Set tag. More...
 
- Protected Member Functions inherited from CommandEntity
template<class T >
void string_to (T &, const std::string &) const
 

Protected Attributes

ID myDOF_Groups
 
ID myID
 

Friends

class AnalysisModel
 

Additional Inherited Members

- Public Types inherited from EntityWithProperties
typedef std::map< std::string, boost::python::object > PythonDict
 
- Static Public Member Functions inherited from CommandEntity
static void resetStandardOutput (void)
 Reset the standard output streams to its defaults buffers.
 
- Static Public Member Functions inherited from EntityWithOwner
static int getVerbosityLevel (void)
 Get the value of the verbosity level.
 
static void setVerbosityLevel (const int &)
 Set the value of the verbosity level.
 
- Static Protected Member Functions inherited from CommandEntity
static CommandEntityentcmd_cast (boost::any &data)
 
- Static Protected Attributes inherited from EntityWithOwner
static int verbosity = 1
 Object that owns THIS ONE. More...
 

Detailed Description

Finite element as seen by analysis.

FE_Element is a base class, subtypes of which are used to enforce the constraints on the domain. An object of type FE_Element represents an element of the domain in the analysis. It enforces no constraints other than single point homogeneous boundary conditions, imposed on any of the elements nodes. It provides a similar interface to that of an Element but modified to provide features useful to an Analysis class. The FE_Element is responsible for:

While the FE_Element class is associated with an element in the domain, subclasses do not have to be. It is the subclasses that are used to implement the constraints imposed on the nodal displacements in the domain.

Constructor & Destructor Documentation

◆ FE_Element() [1/2]

XC::FE_Element::FE_Element ( int  tag,
Element ele 
)
protected

Construictor that take the corresponding model element.

Constructs an empty FE_Element with an associated element given by {theElement}. During construction it determines the number of unknown dofs from the element. Constructs an ID for the mapping between dof's of the element and equation numbers in the system of equation and an ID to hold the tag of the DOF_Group objects associated with each Node of the element. If the result of invoking {theElementPtr- \(>\)isSubdomain()} is true invokes {setFE_Element(this)} on the Subdomain; if false creates a Matrix for the tangent and a Vector for the residual to be stored. An error message is printed and the program is terminated if no Domain object is associated with the Element, a Node of the Element does not exist in the Domain, each Node has not yet been associated with a DOF_Group object, or there is not enough memory for the Vectors and Matrices required.

◆ FE_Element() [2/2]

XC::FE_Element::FE_Element ( int  tag,
int  numDOF_Group,
int  ndof 
)
protected

Constructor.

Provided for subclasses. Constructs an empty FE_Element with the number of unknown dofs given by numDOF and the number of associated DOF_Group objects given by numDOFGroup, two empty IDs are constructed to hold the mapping and the tags of the DOF_Groups. The subclass must fill in the ID for the tags of the DOF_Groups in order that setID() will work. No element is associated with this FE_Element. No space is allocated for the tangent and residual matrix and vector, this is the responsibility of the subclass.

Member Function Documentation

◆ addCtoTang()

void XC::FE_Element::addCtoTang ( double  fact = 1.0)
virtual

Adds the product of fact times the element's damping matrix to the tangent.

Adds the product of fact times the element's damping matrix to the tangent. If no element is associated with the FE_Element nothing is added, if the element is not a Subdomain {addMatrix(theEle- \(>\)getDamp(),fact} is invoked on the tangent matrix. Nothing is done and a warning message is printed if no Element was passed in the constructor or the Element passed was a Subdomain.

◆ addD_Force()

void XC::FE_Element::addD_Force ( const Vector vel,
double  fact = 1.0 
)
virtual

Adds to the residual the product of elements current damping matrix and a Vector whose values are obtained by taking the product of {fact} and those elements of the Vector vel associated with the FE_Elements equation numbers.

If no element is associated with the FE_Element or the Element is a Subdomain nothing is added and an warning message is printed. An error message is also printed if invoking addMatrixVector() on the residual vector returns \(< 0\).

Reimplemented in XC::TransformationFE.

◆ addKiToTang()

void XC::FE_Element::addKiToTang ( double  fact = 1.0)
virtual

Adds the product of fact times the element's initial stiffness matrix to the tangent.

If no element is associated with the FE_Element nothing is added, if the element is not a Subdomain {addMatrix(theEle- \(>\)getInitialStiff(),fact} is invoked on the tangent matrix. Nothing is done and a warning message is printed if no element was passed in the constructor or the element passed was a Subdomain.

◆ addKtToTang()

void XC::FE_Element::addKtToTang ( double  fact = 1.0)
virtual

Adds the product of fact times the element's tangent stiffness matrix to the tangent.

Adds the product of fact times the element's tangent stiffness matrix to the tangent. If no element is associated with the FE_Element nothing is added, if the element is not a Subdomain {addMatrix(theEle- \(>\)getTangentStiff(),fact} is invoked on the tangent matrix. Nothing is done and a warning message is printed if no Element was passed in the constructor or the Element passed was a Subdomain.

◆ addM_Force()

void XC::FE_Element::addM_Force ( const Vector accel,
double  fact = 1.0 
)
virtual

Adds to the residual the product of elements current mass matrix and a Vector whose values are obtained by taking the product of {fact} and those elements of the Vector accel associated with the FE_Elements equation numbers.

If no element is associated with the FE_Element or the Element is a Subdomain nothing is added and an warning message is printed. An error message is also printed if invoking addMatrixVector() on the residual vector returns \(< 0\).

Reimplemented in XC::TransformationFE.

◆ addMtoTang()

void XC::FE_Element::addMtoTang ( double  fact = 1.0)
virtual

Adds the product of fact times the element's mass matrix to the tangent.

Adds the product of fact times the element's mass matrix to the tangent. If no element is associated with the FE_Element nothing is added, if the element is not a Subdomain {addMatrix(theEle- \(>\)getMass(),fact} is invoked on the tangent matrix. Nothing is done and a warning message is printed if no Element was passed in the constructor or the Element passed was a Subdomain.

◆ addRIncInertiaToResidual()

void XC::FE_Element::addRIncInertiaToResidual ( double  fact = 1.0)
virtual

Adds to the residual vector the product of the elements residual load vector with inertia forces included and fact.

Adds to the residual vector the product of the elements residual load vector with inertia forces included and fact. If no element is associated with the FE_Element nothing is added, if the associated element is not a Subdomain {addVector(myEle- \(>\)getResistingForceIncInertia(),fact)} is invoked on the residual. Nothing is done and a warning message is printed if no Element was passed in the constructor or the Element passed was a Subdomain.

◆ addRtoResidual()

void XC::FE_Element::addRtoResidual ( double  fact = 1.0)
virtual

Adds to the residual vector the product of the elements residual load vector and fact.

Adds to the residual vector the product of the elements residual load vector and fact. If no element is associated with the FE_Element nothing is added, if the associated element is not a Subdomain {addVector(myEle- \(>\)getResistingForce(),fact)} is invoked on the residual. Nothing is done and a warning message is printed if no Element was passed in the constructor or the Element passed was a Subdomain.

◆ getDOFtags()

const XC::ID & XC::FE_Element::getDOFtags ( void  ) const
virtual

Returns the tags of the associated DOF_Groups.

Returns a const ID containing the unique tag number of the DOF_Group objects associated with that FE_Element. For this base class, these are obtained from the DOF_Groups associated with the Node objects that are associated with the Element object passed in the constructor. This ID is computed only once, during the creation of the object.

Reimplemented in XC::TransformationFE.

◆ getID()

const XC::ID & XC::FE_Element::getID ( void  ) const
virtual

Method to return the ID containing equation numbers.

Returns a const ID containing the equation numbers associated with its matrices and vectors. This ID will contain \(0\)'s unless the {setID()} method has been called.

Reimplemented in XC::TransformationFE.

◆ getLastIntegrator()

XC::Integrator * XC::FE_Element::getLastIntegrator ( void  )
virtual

Method which returns the last integrator supplied in a formTangent() or a formResidual() invocation.

◆ getLastResponse()

const XC::Vector & XC::FE_Element::getLastResponse ( void  )
virtual

A method which invokes getLastResponse() on the Integrator object that was last passed as an argument to any of the routines.

A method which invokes getLastResponse() on the Integrator object that was last passed as an argument to any of the routines. The FE_Elements ID and the force Vector object is passed as arguments. Returns the force Vector object if successful. If no element is associated with the FE_Element or no integrator has yet to be passed, a warning message is printed and an error Vector is returned.

Reimplemented in XC::TransformationFE.

◆ getM_Force()

const XC::Vector & XC::FE_Element::getM_Force ( const Vector disp,
double  fact = 1.0 
)
virtual

Returns the product of elements current mass matrix and a Vector whose values are obtained by taking the product of {fact} and those elements of the Vector accel associated with the FE_Elements equation numbers.

If no element is associated with the FE_Element or the associated element is a Subdomain a warning message is printed and an error Vector is returned.

Reimplemented in XC::TransformationFE, XC::LagrangeMFreedom_FE, XC::LagrangeSFreedom_FE, XC::PenaltyMFreedom_FE, XC::PenaltySFreedom_FE, XC::PenaltyMRMFreedom_FE, and XC::LagrangeMRMFreedom_FE.

◆ getResidual()

const XC::Vector & XC::FE_Element::getResidual ( Integrator theNewIntegrator)
virtual

Computes and returns the residual vector.

Causes the FE_Element to determine it's contribution to the residual vector and to return this vector. If the Element is a Subdomain it invokes computeResidual()} and {getResistingForce() on the Subdomain. Otherwise {formEleResidual(this)} is invoked on theIntegrator and the resuting residual vector is returned. Subclasses must provide their own implementation. If no Element is passed in the constructor, a warning message and an error vector is returned.

Reimplemented in XC::TransformationFE, XC::LagrangeMFreedom_FE, XC::LagrangeSFreedom_FE, XC::PenaltyMFreedom_FE, XC::PenaltySFreedom_FE, XC::PenaltyMRMFreedom_FE, and XC::LagrangeMRMFreedom_FE.

◆ getTangent()

const XC::Matrix & XC::FE_Element::getTangent ( Integrator theNewIntegrator)
virtual

Computes and returns the tangent stiffness matrix.

Causes the FE_Element to determine it's contribution to the tangent matrix and to return this matrix. If the Element is a Subdomain it invokes computeTangent()} and {getTang() on the Subdomain. Otherwise {formEleTangent(this)} is invoked on {theIntegrator} and the new tangent matrix is returned. Subclasses must provide their own implementation. If no Element is passed in the constructor, a warning message is printed and an error Matrix of size 1X1 is returned.

Reimplemented in XC::TransformationFE, XC::LagrangeMFreedom_FE, XC::LagrangeSFreedom_FE, XC::PenaltyMFreedom_FE, XC::PenaltySFreedom_FE, XC::PenaltyMRMFreedom_FE, and XC::LagrangeMRMFreedom_FE.

◆ getTangForce()

const XC::Vector & XC::FE_Element::getTangForce ( const Vector disp,
double  fact = 1.0 
)
virtual

Returns the product of FE_Elements current tangent matrix and a Vector whose values are obtained by taking the product of {fact} and those elements of the Vector disp associated with the FE_Elements equation numbers.

If the element associated with the FE_Element is a subdomain, the tangent is obtained by invoking {getTang()} on the subdomain, otherwise the tangent is formed by invoking {formEleTang(this)} on the integrator object last used in a getTangent()} or {getResidual(). If no element is associated with the FE_Element a zero vector is returned and an error message is printed. An error message is also printed if invoking addMatrixVector() on the force vector returns \(< 0\).

Reimplemented in XC::TransformationFE, XC::LagrangeMFreedom_FE, XC::LagrangeSFreedom_FE, XC::PenaltyMFreedom_FE, XC::PenaltySFreedom_FE, XC::PenaltyMRMFreedom_FE, and XC::LagrangeMRMFreedom_FE.

◆ setAnalysisModel()

void XC::FE_Element::setAnalysisModel ( AnalysisModel theAnalysisModel)

Sets the link with the analysis model.

To set a link to the AnalysisModel in which the FE_element resides; this link is needed in setID(). Is invoked by the AnalysisModel when the FE_element is added to the AnalysisModel.

◆ setID()

int XC::FE_Element::setID ( void  )
virtual

Method to set the corresponding index of the ID to value.

Causes the FE_Element to determine the mapping between it's equation numbers and the degrees-of-freedom. The \(i-1\) component of the ID contains the equation number that is associated with \(i\)'th degree-of-freedom (a consequence of C indexing for IDs). The method is to be invoked by the DOF_Numberer after the DOF_Groups have been assigned their equation numbers. The base class uses the ID containing the tags of the DOF_Group objects to determine this by looping over the DOF_Group objects (identified in the DOF_Group ID and obtained from the AnalysisModel) and getting their mapping by invoking {getID()}. Returns \(0\) if successful, a warning message and a negative number is returned if an error occurs: \(-1\) returned if no AnalysisModel link has been set, \(-2\) if a DOF_Group object does not exist in the AnalysisModel and a \(-3\) if there are more dof's in the DOF_Groups than dof's identified for the FE_Element.

Reimplemented in XC::TransformationFE, XC::LagrangeMFreedom_FE, XC::LagrangeSFreedom_FE, XC::PenaltyMFreedom_FE, XC::PenaltySFreedom_FE, XC::PenaltyMRMFreedom_FE, and XC::LagrangeMRMFreedom_FE.

◆ zeroResidual()

void XC::FE_Element::zeroResidual ( void  )
virtual

Zeros the residual vector.

Zeros the residual vector. If the Element is not a Subdomain invokes Zero() on the residual vector. Subclasses must provide their own implementation. Nothing is done and a warning message is printed if no Element was passed in the constructor or the Element passed was a Subdomain.

◆ zeroTangent()

void XC::FE_Element::zeroTangent ( void  )
virtual

Zeros the tangent matrix.

Zeros the tangent matrix. If the Element is not a Subdomain invokes Zero() on the tangent matrix. Subclasses must provide their own implementation. Nothing is done and a warning message is printed if no Element was passed in the constructor or the Element passed was a Subdomain.


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