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

A DOF_Group object is instantiated by the ConstraintHandler for every unconstrained node in the domain. More...

#include <DOF_Group.h>

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

Public Member Functions

virtual ~DOF_Group ()
 Destructor.
 
virtual void setID (int dof, int value)
 to set the corresponding index of the ID to value. More...
 
virtual void setID (const ID &values)
 Method to set the ID to be same as that given. More...
 
virtual const IDgetID (void) const
 Method to return the current ID. More...
 
int inicID (const int &value)
 
virtual int doneID (void)
 
virtual int getNodeTag (void) const
 Returns the tag of the associated node (-1 if there is no associated node). More...
 
virtual int getNumDOF (void) const
 Returns the total number of DOFs in the DOF_Group.
 
virtual int getNumFreeDOF (void) const
 Returns the total number of free DOFs. More...
 
virtual int getNumConstrainedDOF (void) const
 Returns the total number of constrained DOFs. More...
 
virtual const MatrixgetTangent (Integrator *theIntegrator)
 Returns the current tangent matrix for the DOF_Group. More...
 
virtual void zeroTangent (void)
 To zero the tangent matrix. More...
 
virtual void addMtoTang (double fact=1.0)
 To add fact times the nodal mass matrix to the tangent matrix. More...
 
virtual void addCtoTang (double fact=1.0)
 
virtual const VectorgetUnbalance (Integrator *theIntegrator)
 Returns the vector holding the unbalance.
 
virtual void zeroUnbalance (void)
 To zero the unbalance vector. More...
 
virtual void addPtoUnbalance (double fact=1.0)
 Adds the product of the unbalanced load at the node and fact to the unbalance vector. More...
 
virtual void addPIncInertiaToUnbalance (double fact=1.0)
 
virtual void addM_Force (const Vector &Udotdot, double fact=1.0)
 
virtual const VectorgetTangForce (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)
 
virtual const VectorgetCommittedDisp (void) const
 To return the committed displacement at the associated node. More...
 
virtual const VectorgetCommittedVel (void) const
 Return the committed velocity at the associated node. More...
 
virtual const VectorgetCommittedAccel (void) const
 Return the committed acceleration at the associated node. More...
 
virtual void setNodeDisp (const Vector &u)
 Method to set the corresponding nodes displacements to the values in u, components identified by myID. More...
 
virtual void setNodeVel (const Vector &udot)
 Method to set the corresponding nodes velocities to the values in udot, components identified by myID. More...
 
virtual void setNodeAccel (const Vector &udotdot)
 Method to set the corresponding nodes accelerations to the values in udotdot, components identified by myID. More...
 
virtual void incrNodeDisp (const Vector &u)
 Method to set the corresponding nodes displacements to the.
 
virtual void incrNodeVel (const Vector &udot)
 Method to set the corresponding nodes velocities to the values in udot, components identified by myID. More...
 
virtual void incrNodeAccel (const Vector &udotdot)
 
virtual const VectorgetTrialDisp (void) const
 Return trial displacement.
 
virtual const VectorgetTrialVel (void) const
 Return trial velocity.
 
virtual const VectorgetTrialAccel (void) const
 Return trial acceleration.
 
virtual void setEigenvector (int mode, const Vector &eigenvalue)
 
virtual const MatrixgetT (void) const
 
virtual void addM_ForceSensitivity (const Vector &Udotdot, double fact=1.0)
 
virtual void addD_ForceSensitivity (const Vector &vel, double fact=1.0)
 
virtual void addD_Force (const Vector &vel, double fact=1.0)
 
virtual const VectorgetDispSensitivity (int gradNumber)
 
virtual const VectorgetVelSensitivity (int gradNumber)
 
virtual const VectorgetAccSensitivity (int gradNumber)
 
virtual int saveSensitivity (Vector *v, Vector *vdot, Vector *vdotdot, int gradNum, int numGrads)
 
virtual void Print (std::ostream &, int=0)
 
virtual void resetNodePtr (void)
 
- 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.
 
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 &Udotdot, double fact=1.0)
 
 DOF_Group (int tag, Node *myNode)
 Constructor that take the corresponding model node. More...
 
 DOF_Group (int tag, int ndof)
 Constructor. More...
 
- Protected Member Functions inherited from XC::TaggedObject
void setTag (int newTag)
 Set tag. More...
 
bool isEqual (const TaggedObject &) const
 Return true if both objects are equal.
 
- Protected Member Functions inherited from CommandEntity
template<class T >
void string_to (T &, const std::string &) const
 
- Protected Member Functions inherited from EntityWithProperties
bool isEqual (const EntityWithProperties &) const
 Return true if both objects are equal.
 
- Protected Member Functions inherited from EntityWithOwner
virtual bool isEqual (const EntityWithOwner &) const
 Return true if both objects are equal.
 

Protected Attributes

UnbalAndTangent unbalAndTangent
 
NodemyNode
 

Friends

class AnalysisModel
 
class AutoConstraintHandler
 

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

A DOF_Group object is instantiated by the ConstraintHandler for every unconstrained node in the domain.

The constrained nodes require specialised types of DOF_Group; which deal with the constraints. DOF_Group objects can handle 0 boundary constraints; if the eqn number of a DOF is less than START_EQN_NUM a value of 0.0 is set for disp, vel and accel when a setNode*(Vector &) is invoked.

Each node in the domain is associated with one DOF_Group. DOF_Groups are called upon in the analysis to provide their contributions of unbalanced load to the system of equations. Subclasses are used by the constraint handler to to introduce new dofs into the analysis.

The DOF_Group is responsible for providing operations to set and access the mapping betwwen equation numbers and DOFs, allowing the Integrator to from the tangent (if nodal masses in transient problem) and unbalanced load information, and for setting and obtaining the nodal trial response quantities.

Constructor & Destructor Documentation

◆ DOF_Group() [1/2]

XC::DOF_Group::DOF_Group ( int  tag,
Node node 
)
protected

Constructor that take the corresponding model node.

Constructs a DOF_Group with an associated node given by {theNode} and a tag given by tag. During construction it determines the number of unknown dofs from the node, numDOF, and creates an Vector object to hold the unbalance information and an ID object to hold mapping between degrees-of-freedom and equation numbers. All values of the ID are set to \(-2\) initially. It creates a Vector to hold the unbalance loads and an ID to hold the mapping information, both of size equal to the number of unknowns. If the size of the Vector or the ID is \(0\), i.e. ran out of memory, a warning message is orinted and numDOF set to \(0\).

Parameters
tagobject identifier.
nodenode associated to the DOF group.

◆ DOF_Group() [2/2]

XC::DOF_Group::DOF_Group ( int  tag,
int  ndof 
)
protected

Constructor.

Provided for subclasses. Constructs a DOF_Group with the number of unknown dofs given by numDOF and a tag given by tag. No Node is associated with this DOF_Group. Creates a Vector of size {numDOF} to hold the unbalance information and an ID object to hold mapping between degrees-of-freedom and equation numbers. All values of the ID are set to \(-2\) initially. If the size of the Vector or the ID is \(0\), i.e. ran out of memory, a warning message is orinted and numDOF set to \(0\).

Member Function Documentation

◆ addMtoTang()

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

To add fact times the nodal mass matrix to the tangent matrix.

To add fact times the nodal mass matrix to the tangent matrix. In this base class, if a Matrix to store the tangent has not yet been created, one of size (numDOF,numDOF) is now created; if construction of this matrix fails an error is printed and an error Matrix is returned. Invokes {addMatrix(theNode- \(>\)getMass,fact)} on the Matrix, printing a warining message if this method returns a \(negative\) value. If no Node is associated with the DOF_Group an error message is printed and nothing is done.

Reimplemented in XC::LagrangeDOF_Group.

◆ addPtoUnbalance()

void XC::DOF_Group::addPtoUnbalance ( double  fact = 1.0)
virtual

Adds the product of the unbalanced load at the node and fact to the unbalance vector.

Adds the product of the unbalanced load at the node and fact to the unbalance vector. A warning message is printed and nothing is done if no node is associated with the DOF_Group, otherwise {addVector(theNode- \(>\)getUnbalancedLoad(),fact)} is invoked on the unbalance vector and a warning message is printed if this method returns a negative value.

Reimplemented in XC::LagrangeDOF_Group.

◆ getCommittedAccel()

const XC::Vector & XC::DOF_Group::getCommittedAccel ( void  ) const
virtual

Return the committed acceleration at the associated node.

Return the committed acceleration at the associated node. Returns result of invoking getAccel() on the Node. If there is no associated node object, an error message is printed and an error Vector is returned.

Reimplemented in XC::TransformationDOF_Group, and XC::LagrangeDOF_Group.

◆ getCommittedDisp()

const XC::Vector & XC::DOF_Group::getCommittedDisp ( void  ) const
virtual

To return the committed displacement at the associated node.

To return the committed displacement at the associated node. Returns the result of invoking getDisp() on the node. If there is no associated node object, an error message is printed and an error Vector is returned.

Reimplemented in XC::TransformationDOF_Group, and XC::LagrangeDOF_Group.

◆ getCommittedVel()

const XC::Vector & XC::DOF_Group::getCommittedVel ( void  ) const
virtual

Return the committed velocity at the associated node.

To return the committed velocity at the associated node. Returns the result of invoking getVel() on the node. If there is no associated node object, an error message is printed and an error Vector is returned.

Reimplemented in XC::TransformationDOF_Group, and XC::LagrangeDOF_Group.

◆ getID()

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

Method to return the current ID.

A const member function which returns in an ID object the equation numbers associated with the degrees-of-freedom in the DOF_Group. The size of the ID object is equal to the number of degrees-of-freedom represented by the DOF_Group. This base class returns the ID created for the mapping.

Reimplemented in XC::TransformationDOF_Group.

◆ getNodeTag()

int XC::DOF_Group::getNodeTag ( void  ) const
virtual

Returns the tag of the associated node (-1 if there is no associated node).

◆ getNumConstrainedDOF()

int XC::DOF_Group::getNumConstrainedDOF ( void  ) const
virtual

Returns the total number of constrained DOFs.

Returns the total number of constrained DOFs in the DOF_Group, i.e. number of dof in the group who have been assigned a negative equation number. Determines this by looping through the ID containing the mapping information.

Reimplemented in XC::TransformationDOF_Group.

◆ getNumFreeDOF()

int XC::DOF_Group::getNumFreeDOF ( void  ) const
virtual

Returns the total number of free DOFs.

Returns the total number of free DOFs in the DOF_Group, i.e. number of dof in the group who have not been assigned a negative equation number. Determines this by looping through the ID containing the mapping information.

Reimplemented in XC::TransformationDOF_Group.

◆ getTangent()

const XC::Matrix & XC::DOF_Group::getTangent ( Integrator theIntegrator)
virtual

Returns the current tangent matrix for the DOF_Group.

Returns the current tangent matrix for the DOF_Group. If no tangent matrix has been created, one of size(numDOF,numDOF) is constructed. If not enough space is available for a new tangent matrix, an error message is printed and an error Matrix is returned..

Reimplemented in XC::TransformationDOF_Group, and XC::LagrangeDOF_Group.

◆ incrNodeVel()

void XC::DOF_Group::incrNodeVel ( const Vector udot)
virtual

Method to set the corresponding nodes velocities to the values in udot, components identified by myID.

These methods are similar to those three just outlined, the only difference being that the trial response quantities at the nodes are incremented, not set, with the values now given; this is done by invoking incrTrialDisp()}, {incrTrialVel(), and {incrTrialAccel()} respectively on the nodes. MUST ALL CHANGE AS setNodeDisp.

Reimplemented in XC::TransformationDOF_Group, and XC::LagrangeDOF_Group.

◆ setID() [1/2]

void XC::DOF_Group::setID ( int  index,
int  value 
)
virtual

to set the corresponding index of the ID to value.

Operation to set the equation number of the {dof'th} DOF in the DOF_Group to value. In this base class, if index is a valid location, \(0 < index < numDOF-1\) the operator {(index) = value} is invoked on the ID object created for the mapping, otherwise an error message is printed.

Reimplemented in XC::TransformationDOF_Group.

◆ setID() [2/2]

void XC::DOF_Group::setID ( const ID copy)
virtual

Method to set the ID to be same as that given.

An operation to set the equation numbers of all the DOFs in the DOF_Group to be those given in the ID values. In this base class, the operator {= values} is invoked on the ID object created for the mapping.

◆ setNodeAccel()

void XC::DOF_Group::setNodeAccel ( const Vector udotdot)
virtual

Method to set the corresponding nodes accelerations to the values in udotdot, components identified by myID.

This operation sets the value of the nodal trial acceleration at the associated node. The vector {\(u^{..}\)} is of size equal to the number of equations in the AnalysisModel (this is not checked by the DOF_Group). The DOF_Group object accesses the contents of the Vector {\(u^{..}\)} using its assigned equation numbers. If a \(-1\) exists for a DOF a \(0\) value is set as the corresponding nodal acceleration for the node. The return value is as outlined above for {setNodeAccel().} Creates a Vector to store the correct components of u, then invokes setTrialAccel() on the node object; if no node object an error message is printed. MUST CHANGE AS setNodeDisp

Reimplemented in XC::TransformationDOF_Group, and XC::LagrangeDOF_Group.

◆ setNodeDisp()

void XC::DOF_Group::setNodeDisp ( const Vector u)
virtual

Method to set the corresponding nodes displacements to the values in u, components identified by myID.

This operation sets the value of the nodal trial displacement at the associated node. The vector u is of size equal to the number of equations in the AnalysisModel (this is not checked by the DOF_Group). The DOF_Group object accesses the contents of the Vector u using its assigned equation numbers. If a \(-1\) exists for a DOF a \(0\) value is set as the corresponding nodal displacement for the node. Creates a Vector to store the correct components of u, then invokes setTrialDisp() on the node object; if no node object an error message is printed. CURRENTLY THERE IS NO CHECK TO SEE IF myID(i) DOES NOT OVERFLOW ADMISSIBLE VALUES IN U - THIS NEES TO CHANGE

Reimplemented in XC::TransformationDOF_Group, and XC::LagrangeDOF_Group.

◆ setNodeVel()

void XC::DOF_Group::setNodeVel ( const Vector udot)
virtual

Method to set the corresponding nodes velocities to the values in udot, components identified by myID.

This operation sets the value of the nodal trial velocity at the associated node. The vector {\(u^{.}\)} is of size equal to the number of equations in the AnalysisModel (this is not checked by the DOF_Group). The DOF_Group object accesses the contents of the Vector {\(u^{.}\)} using its assigned equation numbers. If a \(-1\) exists for a DOF a \(0\) value is set as the corresponding nodal velocity for the node. Creates a Vector to store the correct components of u, then invokes setTrialVel() on the node object; if no node object an error message is printed. MUST CHANGE AS setNodeDisp

Reimplemented in XC::TransformationDOF_Group, and XC::LagrangeDOF_Group.

◆ zeroTangent()

void XC::DOF_Group::zeroTangent ( void  )
virtual

To zero the tangent matrix.

To zero the tangent. If a tangent matrix has been allocated, will invoke Zero() on the tangent matrix.

Reimplemented in XC::LagrangeDOF_Group.

◆ zeroUnbalance()

void XC::DOF_Group::zeroUnbalance ( void  )
virtual

To zero the unbalance vector.

To zero the unbalance vector. Invokes Zero() on the vector object used to store the unbalance information.

Reimplemented in XC::LagrangeDOF_Group.


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