xc
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
XC::SetMeshComp Class Reference

Set of mesh components (nodes, elements and constraints). More...

#include <SetMeshComp.h>

Inheritance diagram for XC::SetMeshComp:
XC::SetBase XC::EntMdlrBase XC::MovableObject XC::DistributedBase XC::Set

Public Types

typedef DqPtrsNode::iterator nod_iterator
 Iterator over the node set.
 
typedef DqPtrsNode::const_iterator nod_const_iterator
 Iterator over the node set.
 
typedef DqPtrsElem::iterator elem_iterator
 Iterator over the element set.
 
typedef DqPtrsElem::const_iterator elem_const_iterator
 Iterator over the element set.
 
typedef DqPtrsConstraint lst_ptr_constraints
 Set of constraints.
 
typedef DqPtrsConstraint::iterator constraint_iterator
 Iterator over the set de constraints.
 
typedef DqPtrsConstraint::const_iterator constraint_const_iterator
 Iterator over the set de constraints.
 

Public Member Functions

 SetMeshComp (const std::string &nmb="", Preprocessor *preprocessor=nullptr)
 Constructor.
 
 SetMeshComp (const SetMeshComp &)
 Copy constructor.
 
SetMeshCompoperator= (const SetMeshComp &)
 Assignment operator.
 
SetMeshCompoperator+= (const SetMeshComp &)
 += operator.
 
SetMeshCompoperator-= (const SetMeshComp &)
 -= operator.
 
SetMeshCompoperator*= (const SetMeshComp &)
 *= operator (intersection).
 
size_t getNumberOfNodes (void) const
 Returns the number of nodes.
 
void addNode (Node *nPtr)
 Appends a node. More...
 
virtual const DqPtrsNodegetNodes (void) const
 Return the node container.
 
virtual DqPtrsNodegetNodes (void)
 Return the nodes container.
 
void setNodes (const DqPtrsNode &nds)
 Sets the nodes.
 
void clearNodes (void)
 Clears out the nodes.
 
void sel_nodes_from_list (const ID &)
 Select the nodes identified by the tags being passed as parameters.
 
bool In (const Node *) const
 Returns true if the node belongs to the set.
 
SetMeshComp pickNodesInside (const std::string &, const GeomObj3d &, const double &tol=0.0)
 Return a new set that contains the nodes that lie insiof the geometric object. More...
 
BND3d Bnd (const double &) const
 Return the nodes current position boundary. More...
 
size_t getNumberOfElements (void) const
 Returns the number of elements.
 
void addElement (Element *ePtr)
 Adds an element. More...
 
virtual const DqPtrsElemgetElements (void) const
 Returns the element container.
 
virtual DqPtrsElemgetElements (void)
 Returns the elements container.
 
void setElements (const DqPtrsElem &els)
 Sets the elements.
 
void clearElements (void)
 Clears out the elements.
 
void sel_elements_from_list (const ID &tags)
 Selects the elements identified by the tags being passed as parameters.
 
bool In (const Element *) const
 Returns true if the element belongs to the set.
 
SetMeshComp pickElemsInside (const std::string &, const GeomObj3d &, const double &tol=0.0)
 Return a new set that contains the elements that lie insiof the geometric object. More...
 
SetMeshComp pickElemsOfType (const std::string &, const std::string &)
 Return a new set that contains the elements that match the type. More...
 
SetMeshComp pickElemsOfDimension (const std::string &, const size_t &)
 Return a new set that contains the elements of the specified dimension. More...
 
boost::python::list getElementTypesPy (void) const
 
boost::python::list getElementDimensionsPy (void) const
 
boost::python::list getElementMaterialNamesPy (void) const
 
SetMeshComp pickElemsOfMaterial (const std::string &, const std::string &)
 Return a new set that contains the elements who have the material being passed as parameter. More...
 
virtual const DqPtrsConstraintGetConstraints (void) const
 Return the constraints container.
 
virtual DqPtrsConstraintGetConstraints (void)
 Return the constraints container.
 
void setConstraints (const DqPtrsConstraint &cts)
 Sets the constraints.
 
void clearConstraints (void)
 Clears out the constraints.
 
void sel_constraints_from_list (const ID &tags)
 Select the constraints identified by the tags. More...
 
void appendFromGeomEntity (const SetBase &)
 Appends to this set the objects the nodes and elements from the set being passed as parameter. More...
 
void clear (void)
 Clears all the objectsof the lists.
 
void fix (const SFreedom_Constraint &)
 Applies the single freedom constraint being passed as parameter to the nodes.
 
nod_const_iterator nodes_begin (void) const
 Returns an iterator that points to the first item of the node container.
 
nod_const_iterator nodes_end (void) const
 Returns an iterator that points to the past-the-end item in the node container.
 
NodefindNode (const int &tag)
 Returns (if it exists) a pointer to the node which tag is being passed as parameter. More...
 
const NodefindNode (const int &tag) const
 Returns (if it exists) a pointer to the node which tag is being passed as parameter. More...
 
bool InNodeTag (const int) const
 Returns true if the node with the tag being passed as parameter, belongs to the set. More...
 
bool InNodeTags (const ID &) const
 Returns true if the nodes, with the tags being passed as parameter, belongs to the set. More...
 
std::set< int > getNodeTags (void) const
 Returns node tags.
 
std::set< int > getElementTags (void) const
 Returns the tags de los elements.
 
std::set< int > getConstraintTags (void) const
 Returns the tags de los constraints.
 
NodegetNearestNode (const Pos3d &p)
 Returns the node closest to the point being passed as parameter.
 
const NodegetNearestNode (const Pos3d &p) const
 Returns the node closest to the point being passed as parameter.
 
elem_iterator elem_begin (void)
 
elem_const_iterator elem_begin (void) const
 Returns an iterator which points to principio de la lista de elements.
 
elem_iterator elem_end (void)
 
elem_const_iterator elem_end (void) const
 Returns an iterator apuntando tras el final de la lista de elements.
 
ElementfindElement (const int &)
 Returns (if it exists) a pointer to the node identified by the tag being passed as parameter. More...
 
const ElementfindElement (const int &) const
 Returns (if it exists) a pointer to the node identified by the tag being passed as parameter. More...
 
ElementgetNearestElement (const Pos3d &)
 Returns the element closest to the point being passed as parameter.
 
const ElementgetNearestElement (const Pos3d &) const
 Returns the element closest to the point being passed as parameter.
 
void kill_elements (void)
 Deactivates the elements.
 
void alive_elements (void)
 Reactivates the elements.
 
size_t getNumDeadElements (void) const
 Returns the number of inactive elements.
 
size_t getNumLiveElements (void) const
 Returns the number of active elements.
 
size_t getNumDeadNodes (void) const
 Returns the number of inactive nodes.
 
size_t getNumLiveNodes (void) const
 Returns the number of active nodes.
 
constraint_iterator constraints_begin (void)
 Returns an iterator which points to principio de la lista de constraints.
 
constraint_const_iterator constraints_begin (void) const
 Returns an iterator which points to principio de la lista de constraints.
 
constraint_iterator constraints_end (void)
 Returns an iterator apuntando tras el final de la lista de constraints.
 
constraint_const_iterator constraints_end (void) const
 Returns an iterator apuntando tras el final de la lista de constraints.
 
ConstraintbuscaConstraint (const int &tag)
 Returns, if it exists, a pointer to the constraint which tag is being passed as parameter. More...
 
const ConstraintbuscaConstraint (const int &tag) const
 Returns, if it exists, a pointer to the constraint which tag is being passed as parameter. More...
 
void fillUpwards (void)
 Appends to this set the objects that make reference to one or more of the objects that already are in the set. More...
 
void fillDownwards (void)
 Appends to the set being passed as parameter the nodes that touch any of the elements of the set. More...
 
virtual void Transforma (const TrfGeom &trf)
 Aplies the transformation to the positions of the nodes.
 
virtual void Transforma (const size_t &indice_trf)
 Applies to the set the transformation with the identifier being passed as parameter.
 
SlidingVectorsSystem3d getResistingSlidingVectorsSystem3d (const Plane &, const Pos3d &, const double &, const bool &) const
 Return the resultant of the forces over the nodes near to the plane, of the elements behind the plane. More...
 
virtual int sendSelf (CommParameters &)
 Sends object through the channel being passed as parameter.
 
virtual int recvSelf (const CommParameters &)
 Receives object through the channel being passed as parameter.
 
 ~SetMeshComp (void)
 Destructor.
 
- Public Member Functions inherited from XC::SetBase
 SetBase (const std::string &nmb="", Preprocessor *preprocessor=nullptr)
 Constructor.
 
void setColorComponents (const double &, const double &, const double &)
 Set the color of the object (red,green,blue) as integers from 0 to 255. More...
 
void setColor (const Vector &)
 Set the color of the object [red,green,blue] as integers from 0 to 255. More...
 
const VectorgetColor (void) const
 Return the color of the object [red,green,blue] as integers from 0 to 255. More...
 
virtual void genMesh (meshing_dir dm)
 Generates a finite element mesh from the set components.
 
const IDgetIdNodeTags (void) const
 Returns the tags of the nodes en un vector de enteros.
 
const IDgetIdElementTags (void) const
 Returns the tags of the elements en un vector de enteros.
 
virtual bool In (const Pnt *) const
 Returns true if the point belongs to the set.
 
virtual bool In (const Edge *) const
 Returns true if the edge belongs to the set.
 
virtual bool In (const Face *) const
 Returns true if the surface belongs to the set.
 
virtual bool In (const Body *) const
 Returns true if the body belongs to the set.
 
virtual bool In (const UniformGrid *) const
 Returns true if the «uniform grid» belongs to the set.
 
void resetTributaries (void) const
 Reset tributary areas (or lengths, or volumes) for the nodes that are connected to the set elements. More...
 
void computeTributaryLengths (bool initialGeometry=true) const
 Computes the tributary lengths that correspond to each node of the element set. More...
 
void computeTributaryAreas (bool initialGeometry=true) const
 Computes the tributary areas that correspond to each node of the element set. More...
 
void computeTributaryVolumes (bool initialGeometry=true) const
 Computes the tributary volumes that correspond to each node of the element set. More...
 
- Public Member Functions inherited from XC::EntMdlrBase
 EntMdlrBase (const std::string &nmb="", Preprocessor *preprocessor=nullptr)
 Constructor.
 
EntMdlrBaseoperator+= (const EntMdlrBase &)
 += operator.
 
EntMdlrBaseoperator-= (const EntMdlrBase &)
 -= operator.
 
EntMdlrBaseoperator*= (const EntMdlrBase &)
 *= operator (intersection).
 
const PreprocessorgetPreprocessor (void) const
 Return a pointer to the object preprocessor.
 
PreprocessorgetPreprocessor (void)
 Return a pointer to the object preprocessor.
 
size_t GetTag (void) const
 Return the object identifier in the model (tag).
 
PntBuscaPnt (const size_t &)
 Return a pointer to the point identified by the tag being passed as parameter. More...
 
const PntBuscaPnt (const size_t &) const
 Return a const pointer to the point identified by the tag being passed as parameter. More...
 
EdgeBuscaEdge (const size_t &)
 Return a pointer to the edge identified by the tag being passed as parameter. More...
 
const EdgeBuscaEdge (const size_t &) const
 Return a pointer to the edge identified by the tag being passed as parameter. More...
 
FaceBuscaFace (const size_t &)
 Return a pointer to the face identified by the tag being passed as parameter. More...
 
const FaceBuscaFace (const size_t &) const
 Returns a pointer to the face identified by the tag being passed as parameter. More...
 
- Public Member Functions inherited from XC::MovableObject
 MovableObject (int classTag, int dbTag)
 Constructor. More...
 
 MovableObject (int classTag)
 Constructor. More...
 
 MovableObject (const MovableObject &)
 Copy constructor. Doesn't copy the dbTag.
 
MovableObjectoperator= (const MovableObject &)
 Assignment operator. Doesn't copy the dbTag.
 
int getClassTag (void) const
 Return the class identifier.
 
int getDbTag (void) const
 Return the object identifier in the database.
 
int getDbTag (CommParameters &)
 Return the object identifier in the database.
 
void setDbTag (int dbTag)
 Sets the object identifier in the database.
 
void setDbTag (CommParameters &)
 Sets the object identifier in the database if not already set. More...
 
virtual int setParameter (const std::vector< std::string > &argv, Parameter &param)
 Sets the value param to the parameter argv.
 
virtual int updateParameter (int parameterID, Information &info)
 Updates the parameter identified by parameterID with info.
 
virtual int activateParameter (int parameterID)
 Activates the parameter identified by parameterID.
 
virtual int setVariable (const std::string &variable, Information &)
 Set the value of the variable idenfified by var.
 
virtual int getVariable (const std::string &variable, Information &)
 Return the value of the variable idenfified by var.
 
- Public Member Functions inherited from XC::DistributedBase
 DistributedBase (void)
 Constructor.
 
const int & getDbTagDataPos (const int &i) const
 Returns the data at the i-th position.
 
void setDbTagDataPos (const int &i, const int &v)
 Sets the data at the i-th position.
 
void inicComm (const int &dataSize) const
 Initializes communication.
 

Protected Member Functions

void numera (void)
 Assigns index to each object in the set (nodes,elements,points...) to be able to use them in VTK. More...
 
void clearAll (void)
 Clears all objects from the set.
 
DbTagDatagetDbTagData (void) const
 Returns a vector to store the dbTags of the class members. More...
 
int sendData (CommParameters &)
 Send members through the channel being passed as parameter.
 
int recvData (const CommParameters &)
 Receives members through the channel being passed as parameter.
 
void calc_resisting_force (void)
 Calcula los esfuerzos on each uno de los elements.
 
void mueve (const Vector3d &)
 Moves the nodes.
 
- Protected Member Functions inherited from XC::EntMdlrBase
bool check_preprocessor (void) const
 Check for preprocessor.
 
int sendIdsEtiquetas (const int &, const int &, CommParameters &)
 Send labels through the channel being passed as parameter.
 
int recvIdsEtiquetas (const int &, const int &, const CommParameters &)
 Receive labels through the channel being passed as parameter.
 
int sendData (CommParameters &)
 Send members through the channel being passed as parameter.
 
int recvData (const CommParameters &)
 Receive members through the channel being passed as parameter.
 

Static Protected Member Functions

template<class L >
static void numera_lista (L &l)
 Set indices to the object to allow its use in VTK.
 

Additional Inherited Members

- Protected Attributes inherited from XC::EntMdlrBase
LabelContainer labels
 Label container.
 

Detailed Description

Set of mesh components (nodes, elements and constraints).

A SetMeshComp object contains zero or more:

Member Function Documentation

§ addElement()

void XC::SetMeshComp::addElement ( Element ePtr)

Adds an element.

Adds the pointer to element being passed as parameter.

§ addNode()

void XC::SetMeshComp::addNode ( Node nPtr)

Appends a node.

Adds the pointer to node being passed as parameter.

§ appendFromGeomEntity()

void XC::SetMeshComp::appendFromGeomEntity ( const SetBase s)

Appends to this set the objects the nodes and elements from the set being passed as parameter.

§ Bnd()

BND3d XC::SetMeshComp::Bnd ( const double &  factor) const

Return the nodes current position boundary.

Parameters
factorscale factor for the current position initPos+ factor * nodDisplacement.

§ buscaConstraint() [1/2]

XC::Constraint * XC::SetMeshComp::buscaConstraint ( const int &  tag)

Returns, if it exists, a pointer to the constraint which tag is being passed as parameter.

§ buscaConstraint() [2/2]

const XC::Constraint * XC::SetMeshComp::buscaConstraint ( const int &  tag) const

Returns, if it exists, a pointer to the constraint which tag is being passed as parameter.

§ fillDownwards()

void XC::SetMeshComp::fillDownwards ( void  )

Appends to the set being passed as parameter the nodes that touch any of the elements of the set.

§ fillUpwards()

void XC::SetMeshComp::fillUpwards ( void  )

Appends to this set the objects that make reference to one or more of the objects that already are in the set.

§ findElement() [1/2]

XC::Element * XC::SetMeshComp::findElement ( const int &  tag)

Returns (if it exists) a pointer to the node identified by the tag being passed as parameter.

§ findElement() [2/2]

const XC::Element * XC::SetMeshComp::findElement ( const int &  tag) const

Returns (if it exists) a pointer to the node identified by the tag being passed as parameter.

§ findNode() [1/2]

XC::Node * XC::SetMeshComp::findNode ( const int &  tag)

Returns (if it exists) a pointer to the node which tag is being passed as parameter.

§ findNode() [2/2]

const XC::Node * XC::SetMeshComp::findNode ( const int &  tag) const

Returns (if it exists) a pointer to the node which tag is being passed as parameter.

§ getDbTagData()

XC::DbTagData & XC::SetMeshComp::getDbTagData ( void  ) const
protectedvirtual

Returns a vector to store the dbTags of the class members.

Reimplemented from XC::DistributedBase.

§ getResistingSlidingVectorsSystem3d()

SlidingVectorsSystem3d XC::SetMeshComp::getResistingSlidingVectorsSystem3d ( const Plane &  plane,
const Pos3d &  centro,
const double &  tol,
const bool &  inc_inertia 
) const

Return the resultant of the forces over the nodes near to the plane, of the elements behind the plane.

§ InNodeTag()

bool XC::SetMeshComp::InNodeTag ( const int  tag_node) const

Returns true if the node with the tag being passed as parameter, belongs to the set.

§ InNodeTags()

bool XC::SetMeshComp::InNodeTags ( const ID tag_nodes) const

Returns true if the nodes, with the tags being passed as parameter, belongs to the set.

§ numera()

void XC::SetMeshComp::numera ( void  )
protected

Assigns index to each object in the set (nodes,elements,points...) to be able to use them in VTK.

§ pickElemsInside()

XC::SetMeshComp XC::SetMeshComp::pickElemsInside ( const std::string &  newSetName,
const GeomObj3d &  geomObj,
const double &  tol = 0.0 
)

Return a new set that contains the elements that lie insiof the geometric object.

Parameters
newSetNamename for the new set.
geomObjgeometric object that must contain the elements.
toltolerance for "In" function.

§ pickElemsOfDimension()

XC::SetMeshComp XC::SetMeshComp::pickElemsOfDimension ( const std::string &  newSetName,
const size_t &  targetDim 
)

Return a new set that contains the elements of the specified dimension.

Parameters
newSetNamename for the new set.
targetDimelement dimension (point: 0, line: 1, surface: 2, volume: 3)

§ pickElemsOfMaterial()

XC::SetMeshComp XC::SetMeshComp::pickElemsOfMaterial ( const std::string &  newSetName,
const std::string &  targetName 
)

Return a new set that contains the elements who have the material being passed as parameter.

Parameters
newSetNamename for the new set.
targetNamename of the target material.

§ pickElemsOfType()

XC::SetMeshComp XC::SetMeshComp::pickElemsOfType ( const std::string &  newSetName,
const std::string &  typeName 
)

Return a new set that contains the elements that match the type.

Parameters
newSetNamename for the new set.
typeNamestring that must be contained in the class name.

§ pickNodesInside()

XC::SetMeshComp XC::SetMeshComp::pickNodesInside ( const std::string &  newSetName,
const GeomObj3d &  geomObj,
const double &  tol = 0.0 
)

Return a new set that contains the nodes that lie insiof the geometric object.

Parameters
newSetNamename for the new set.
geomObjgeometric object that must contain the nodes.
toltolerance for "In" function.

§ sel_constraints_from_list()

void XC::SetMeshComp::sel_constraints_from_list ( const ID tags)

Select the constraints identified by the tags.

Parameters
tagsidentifiers of the constraints.

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