xc
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
XC::SetEntities Class Reference

Object set. More...

#include <SetEntities.h>

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

Public Types

typedef DqPtrsEntities< Pntlst_ptr_points
 Point set.
 
typedef lst_ptr_points::iterator pnt_iterator
 point set iterator.
 
typedef lst_ptr_points::const_iterator pnt_const_iterator
 point set const iterator.
 
typedef DqPtrsEntities< Edgelst_line_pointers
 Line set.
 
typedef lst_line_pointers::iterator lin_iterator
 Line set iterator.
 
typedef lst_line_pointers::const_iterator lin_const_iterator
 Line set const iterator.
 
typedef DqPtrsFaces lst_surface_ptrs
 surface set.
 
typedef lst_surface_ptrs::iterator sup_iterator
 surface set iterator.
 
typedef lst_surface_ptrs::const_iterator sup_const_iterator
 surface set const iterator.
 
typedef DqPtrsEntities< Bodylst_body_pointers
 body set.
 
typedef lst_body_pointers::iterator body_iterator
 body set iterator.
 
typedef lst_body_pointers::const_iterator body_const_iterator
 body set const iterator.
 
typedef DqPtrsEntities< UniformGridlst_ptr_uniform_grids
 Unifrom grid set.
 
typedef lst_ptr_uniform_grids::iterator ugrid_iterator
 Uniform grid iterator.
 
typedef lst_ptr_uniform_grids::const_iterator ugrid_const_iterator
 Uniform grid const iterator.
 
- Public Types inherited from EntityWithProperties
typedef std::map< std::string, boost::python::object > PythonDict
 

Public Member Functions

 SetEntities (Preprocessor *preprocessor=nullptr)
 Constructor.
 
 SetEntities (const SetEntities &)
 Copy constructor.
 
SetEntitiesoperator= (const SetEntities &)
 Assignment operator.
 
 ~SetEntities (void)
 Destructor.
 
void clear (void)
 Clears the set.
 
bool empty (void) const
 Return true if the set is empty.
 
virtual const lst_ptr_pointsgetPoints (void) const
 Returns a const reference to the point container.
 
virtual lst_ptr_pointsgetPoints (void)
 Return a reference to the the point container.
 
void setPoints (const lst_ptr_points &pts)
 Assigns the points set.
 
void sel_points_from_list (const ID &)
 Select the points identified by the tags in the parameter. More...
 
void selPointsFromListPy (const boost::python::list &)
 Select the points identified by the given tags. More...
 
bool In (const Pnt *) const
 Returns true if the point belongs to the set.
 
SetEntities pickPointsInside (const GeomObj3d &, const double &tol=0.0) const
 Return a new set that contains the points that lie insiof the geometric object. More...
 
PntgetNearestPoint (const Pos3d &)
 Return the point closest to the position argument.
 
const PntgetNearestPoint (const Pos3d &) const
 Return the point closest to the position argument.
 
virtual const lst_line_pointersgetLines (void) const
 Return a const reference to the line container.
 
virtual lst_line_pointersgetLines (void)
 Return a reference to the line container.
 
void setLines (const lst_line_pointers &lns)
 Assigns the edge set.
 
void sel_lines_from_list (const ID &)
 Select the lines identified by the tags in the parameter. More...
 
void selLinesFromListPy (const boost::python::list &)
 Select the points identified by the given tags. More...
 
bool In (const Edge *) const
 Returns true if the edge belongs to the set.
 
SetEntities pickLinesInside (const GeomObj3d &, const double &tol=0.0) const
 Return a new set that contains the lines that lie inside of the geometric object. More...
 
edge_intersection_pairs getLineIntersections (const double &tol=1e-6) const
 Return the intersections between the lines of the model.
 
void splitLinesAtIntersections (const double &tol=1e-6)
 Split the lines of the set at its intersection points.
 
EdgegetNearestLine (const Pos3d &)
 Return the edge closest to the given point.
 
const EdgegetNearestLine (const Pos3d &) const
 Return the edge closest to the given point.
 
virtual const lst_surface_ptrsgetSurfaces (void) const
 Returns a const reference to the surface container.
 
virtual lst_surface_ptrsgetSurfaces (void)
 Returns a reference to the surface container.
 
void setSurfaces (const lst_surface_ptrs &sfs)
 Assigns the surface set.
 
void sel_surfaces_from_list (const ID &)
 Selects the surfaces with the identifiers being passed as parameter. More...
 
void selSurfacesFromListPy (const boost::python::list &)
 Select the surfaces identified by the given tags. More...
 
bool In (const Face *) const
 Returns true if the surface belongs to the set.
 
SetEntities pickSurfacesInside (const GeomObj3d &, const double &tol=0.0) const
 Return a new set that contains the surfaces that lie insiof the geometric object. More...
 
virtual const lst_body_pointersgetBodies (void) const
 Return a const reference to the body container.
 
virtual lst_body_pointersgetBodies (void)
 Return a reference to the body container.
 
void setBodies (const lst_body_pointers &bds)
 Assigns the bodies set.
 
void sel_bodies_from_list (const ID &)
 Selects the bodies with the identifiers being passed as parameter. More...
 
void selBodiesFromListPy (const boost::python::list &)
 Select the bodies identified by the given tags. More...
 
bool In (const Body *) const
 Returns true if the body belongs to the set.
 
SetEntities pickBodiesInside (const GeomObj3d &, const double &tol=0.0) const
 Return a new set that contains the bodies that lie insiof the geometric object. More...
 
virtual const lst_ptr_uniform_gridsgetUniformGrids (void) const
 Return a const reference to the UniformGrids container.
 
virtual lst_ptr_uniform_gridsgetUniformGrids (void)
 Return a reference to the UniformGrids container.
 
void sel_ugrids_from_list (const ID &)
 Selects the uniform grids with the identifiers being passed as parameter. More...
 
void selUgridsFromListPy (const boost::python::list &)
 Select the bodies identified by the given tags. More...
 
bool In (const UniformGrid *) const
 Returns true if the «uniform grid» belongs to the set.
 
BND3d Bnd (void) const
 Return the entities current position boundary.
 
double getAverageSize (void) const
 Return the average size of the geometric entities.
 
SetEntities pickEntitiesInside (const GeomObj3d &, const double &tol=0.0) const
 Return a new set that contains the bodies that lie insiof the geometric object. More...
 
double getMaxElementSize (void) const
 Return the maximum element size according to the number of divisions of the lines. More...
 
double getMinElementSize (void) const
 Return the minimum element size according to the number of divisions of the lines. More...
 
double getAverageElementSize (void) const
 Return the minimum element size according to the number of divisions of the lines. More...
 
void fillUpwards (const SetMeshComp &)
 Appends to this set the objects that make reference to one or more of the objects that already make part of the set. More...
 
void fillDownwards (void)
 Appends to the set being passed as parameter the elements that intervene on the definition of those entities that are already in the set. More...
 
void fillDownwards (SetMeshComp &)
 Appends to the set being passed as parameter the elements that intervene on the definition of those entities that are already in the set. More...
 
void Transform (const TrfGeom &trf)
 Applies the transformation to the elements of the set.
 
void conciliaNDivs (void)
 Conciliate number of divisions of the lines shared by faces. More...
 
void setUseGmsh (const bool &)
 Set the value of the useGmsh member.
 
bool getUseGmsh (void) const
 Get the value of the useGmsh member.
 
void genMesh (const std::string &, meshing_dir dm)
 Triggers mesh generation from set components. More...
 
virtual int sendSelf (Communicator &)
 Sends object through the communicator argument.
 
virtual int recvSelf (const Communicator &)
 Receives object through the communicator argument.
 
void extend (const lst_ptr_points &)
 Extend this set with the points of the argument.
 
void extend (const lst_line_pointers &)
 Extend this set with the lines of the argument.
 
void extend (const lst_surface_ptrs &)
 Extend this set with the surfaces of the argument.
 
void extend (const lst_body_pointers &)
 Extend this set with the bodies of the argument.
 
void extend (const lst_ptr_uniform_grids &)
 Extend this set with the uniform grids of the argument.
 
SetEntitiesoperator+= (const SetEntities &)
 Addition assignment operator. More...
 
SetEntitiesoperator-= (const SetEntities &)
 -= operator.
 
SetEntitiesoperator*= (const SetEntities &)
 *= operator (intersection).
 
SetEntities operator+ (const SetEntities &) const
 Addition (union) operator. More...
 
SetEntities operator- (const SetEntities &) const
 Difference operator. More...
 
SetEntities operator* (const SetEntities &) const
 Intersection operator. More...
 
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 XC::PreprocessorContainer
 PreprocessorContainer (Preprocessor *owr)
 Default constructor.
 
const DomaingetDomain (void) const
 Returns the domain.
 
DomaingetDomain (void)
 Returns the domain.
 
PreprocessorgetPreprocessor (void)
 Returns a pointer to the object preprocessor.
 
const PreprocessorgetPreprocessor (void) const
 Returns a pointer to the object preprocessor.
 
void checkPreprocessor (void)
 
- 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.
 
boost::python::dict getPyDict (void) const
 Return a Python dictionary containing 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 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
 
- 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 (Communicator &)
 Return the object identifier in the database.
 
void setDbTag (int dbTag)
 Sets the object identifier in the database.
 
void setDbTag (Communicator &)
 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.
 
virtual ~DistributedBase (void)
 Destructor.
 
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 clearAll (void)
 Clears all the objects of the set.
 
void copy_lists (const SetEntities &)
 Copy the object lists of the set s. More...
 
SetEntities create_copy (const std::string &, const Vector3d &v)
 Creates a copy of the entities of the set and put them in another set with the name is being passed as parameter. More...
 
void extend_lists (const SetEntities &)
 Extend this set with the objects of the set being passed as parameter. More...
 
void substract_lists (const SetEntities &)
 Removes from this set the objects that belongs also to the argument. More...
 
void intersect_lists (const SetEntities &)
 Removes from this set the objects that belongs also to the argument. More...
 
DbTagDatagetDbTagData (void) const
 Returns a vector to store the dbTags of the class members. More...
 
int sendData (Communicator &)
 Send members through the communicator argument.
 
int recvData (const Communicator &)
 Receives members through the communicator argument.
 
void create_gmsh_points (void) const
 Create Gmsh points from the points of this object.
 
void point_meshing (meshing_dir dm)
 Create nodes and, where appropriate, elements on set points.
 
void create_gmsh_lines (void) const
 Create a gmsh lines from the edges.
 
void line_meshing (meshing_dir dm)
 Create nodes and, where appropriate, elements on set lines.
 
void create_gmsh_loops (void) const
 Create a gmsh lines from the edges.
 
std::vector< int > create_gmsh_surfaces (void) const
 Create a gmsh lines from the edges.
 
void surface_meshing (meshing_dir dm)
 Create nodes and, where appropriate, elements on surfaces.
 
void body_meshing (meshing_dir dm)
 Create nodes and, where appropriate, elements on set bodies.
 
void uniform_grid_meshing (meshing_dir dm)
 Creates nodes and, eventually, elements on the points of the set.
 
std::map< int, const Node * > create_nodes_from_gmsh (void)
 Create the nodes from the positions computed by Gmsh.
 
int create_elements_from_gmsh (const std::map< int, const Node *> &)
 Create the elements from the mesh computed by Gmsh.
 
void gen_mesh_gmsh (const std::string &modelName)
 Asks Gmsh to create the mesh. More...
 
void move (const Vector3d &)
 Moves the objects of the set.
 
- Protected Member Functions inherited from CommandEntity
template<class T >
void string_to (T &, const std::string &) const
 

Protected Attributes

lst_ptr_points points
 point set.
 
lst_line_pointers lines
 line set.
 
lst_surface_ptrs surfaces
 surface set.
 
lst_body_pointers bodies
 body set.
 
lst_ptr_uniform_grids uniform_grids
 Uniform mesh set.
 
bool useGmsh
 if true use Gmsh for mesh generation.
 

Friends

class Set
 

Additional Inherited Members

- 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

Object set.

A set object contains 0 or more:

Member Function Documentation

◆ conciliaNDivs()

void XC::SetEntities::conciliaNDivs ( void  )

Conciliate number of divisions of the lines shared by faces.

◆ copy_lists()

void XC::SetEntities::copy_lists ( const SetEntities other)
protected

Copy the object lists of the set s.

Append to this object the lists of objects from the argument.

◆ create_copy()

XC::SetEntities XC::SetEntities::create_copy ( const std::string &  name,
const Vector3d v = Vector3d() 
)
protected

Creates a copy of the entities of the set and put them in another set with the name is being passed as parameter.

The coordinates of the new points will be obtained by adding to the original coordinates those of the vector being passed as parameter.

◆ extend_lists()

void XC::SetEntities::extend_lists ( const SetEntities other)
protected

Extend this set with the objects of the set being passed as parameter.

◆ fillDownwards() [1/2]

void XC::SetEntities::fillDownwards ( void  )

Appends to the set being passed as parameter the elements that intervene on the definition of those entities that are already in the set.

◆ fillDownwards() [2/2]

void XC::SetEntities::fillDownwards ( SetMeshComp mc)

Appends to the set being passed as parameter the elements that intervene on the definition of those entities that are already in the set.

◆ fillUpwards()

void XC::SetEntities::fillUpwards ( const SetMeshComp mc)

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

◆ gen_mesh_gmsh()

void XC::SetEntities::gen_mesh_gmsh ( const std::string &  modelName)
protected

Asks Gmsh to create the mesh.

Parameters
modelNamestring identifier for the gmsh model.

◆ genMesh()

void XC::SetEntities::genMesh ( const std::string &  setName,
meshing_dir  dm 
)

Triggers mesh generation from set components.

Parameters
dmMeshing direction.

◆ getAverageElementSize()

double XC::SetEntities::getAverageElementSize ( void  ) const

Return the minimum element size according to the number of divisions of the lines.

◆ getDbTagData()

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

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

Reimplemented from XC::DistributedBase.

◆ getMaxElementSize()

double XC::SetEntities::getMaxElementSize ( void  ) const

Return the maximum element size according to the number of divisions of the lines.

◆ getMinElementSize()

double XC::SetEntities::getMinElementSize ( void  ) const

Return the minimum element size according to the number of divisions of the lines.

◆ intersect_lists()

void XC::SetEntities::intersect_lists ( const SetEntities other)
protected

Removes from this set the objects that belongs also to the argument.

◆ operator*()

XC::SetEntities XC::SetEntities::operator* ( const SetEntities b) const

Intersection operator.

Return the set intersection.

◆ operator+()

XC::SetEntities XC::SetEntities::operator+ ( const SetEntities b) const

Addition (union) operator.

Extend the lists of the first set with the objects from the argument.

◆ operator+=()

XC::SetEntities & XC::SetEntities::operator+= ( const SetEntities other)

Addition assignment operator.

Extend the lists with the objects from the argument.

◆ operator-()

XC::SetEntities XC::SetEntities::operator- ( const SetEntities b) const

Difference operator.

Removes the objects that belong also to the argument.

◆ pickBodiesInside()

XC::SetEntities XC::SetEntities::pickBodiesInside ( const GeomObj3d geomObj,
const double &  tol = 0.0 
) const

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

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

◆ pickEntitiesInside()

XC::SetEntities XC::SetEntities::pickEntitiesInside ( const GeomObj3d geomObj,
const double &  tol = 0.0 
) const

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

Parameters
geomObjgeometric object that must contain the entities.
toltolerance for "In" function.

◆ pickLinesInside()

XC::SetEntities XC::SetEntities::pickLinesInside ( const GeomObj3d geomObj,
const double &  tol = 0.0 
) const

Return a new set that contains the lines that lie inside of the geometric object.

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

◆ pickPointsInside()

XC::SetEntities XC::SetEntities::pickPointsInside ( const GeomObj3d geomObj,
const double &  tol = 0.0 
) const

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

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

◆ pickSurfacesInside()

XC::SetEntities XC::SetEntities::pickSurfacesInside ( const GeomObj3d geomObj,
const double &  tol = 0.0 
) const

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

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

◆ sel_bodies_from_list()

void XC::SetEntities::sel_bodies_from_list ( const ID tags)

Selects the bodies with the identifiers being passed as parameter.

Parameters
tagsidentifiers of the points to select.

◆ sel_lines_from_list()

void XC::SetEntities::sel_lines_from_list ( const ID tags)

Select the lines identified by the tags in the parameter.

Parameters
tagsidentifiers of the points to select.

◆ sel_points_from_list()

void XC::SetEntities::sel_points_from_list ( const ID tags)

Select the points identified by the tags in the parameter.

Parameters
tagsidentifiers of the points to select.

◆ sel_surfaces_from_list()

void XC::SetEntities::sel_surfaces_from_list ( const ID tags)

Selects the surfaces with the identifiers being passed as parameter.

Parameters
tagsidentifiers of the points to select.

◆ sel_ugrids_from_list()

void XC::SetEntities::sel_ugrids_from_list ( const ID tags)

Selects the uniform grids with the identifiers being passed as parameter.

Parameters
tagsidentifiers of the points to select.

◆ selBodiesFromListPy()

void XC::SetEntities::selBodiesFromListPy ( const boost::python::list &  tags)

Select the bodies identified by the given tags.

Parameters
tagsidentifiers of the points to select.

◆ selLinesFromListPy()

void XC::SetEntities::selLinesFromListPy ( const boost::python::list &  tags)

Select the points identified by the given tags.

Parameters
tagsidentifiers of the points to select.

◆ selPointsFromListPy()

void XC::SetEntities::selPointsFromListPy ( const boost::python::list &  tags)

Select the points identified by the given tags.

Parameters
tagsidentifiers of the points to select.

◆ selSurfacesFromListPy()

void XC::SetEntities::selSurfacesFromListPy ( const boost::python::list &  tags)

Select the surfaces identified by the given tags.

Parameters
tagsidentifiers of the points to select.

◆ selUgridsFromListPy()

void XC::SetEntities::selUgridsFromListPy ( const boost::python::list &  tags)

Select the bodies identified by the given tags.

Parameters
tagsidentifiers of the points to select.

◆ substract_lists()

void XC::SetEntities::substract_lists ( const SetEntities other)
protected

Removes from this set the objects that belongs also to the argument.


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