34 #include "preprocessor/multi_block_topology/entities/1d/CmbEdge.h" 50 std::set<const Body *> bodies_surf;
52 void insert_body(
Body *b);
53 Node *getNode(
const size_t &i);
54 const Node *getNode(
const size_t &i)
const;
56 typedef std::deque<PolygonalFace *> dq_holes;
57 typedef dq_holes::iterator hole_iterator;
58 typedef dq_holes::const_iterator hole_const_iterator;
81 Face(
const std::string &name,
Preprocessor *m,
const size_t &ndivI= 4,
const size_t &ndivJ= 4);
91 std::deque<std::pair<const Edge *, const Edge *> >
getOppositeEdges(
void)
const;
100 inline size_t NDivI(
void)
const 102 virtual void setNDivI(
const size_t &);
103 inline size_t NDivJ(
void)
const 105 virtual void setNDivJ(
const size_t &);
110 virtual void SetElemSize(
const double &sz,
bool mustBeEven=
true);
119 const std::deque<PolygonalFace *> &
getHoles(
void)
const;
131 bool isFlat(
const double &tol= 1e-6)
const;
132 bool isWarped(
const double &tol= 1e-6)
const;
139 {
return bodies_surf; }
143 std::deque<const Edge *>
getNDivErrors(
const size_t &)
const;
148 virtual Node *getNode(
const size_t &i1,
const size_t &j,
const size_t &k);
149 virtual const Node *getNode(
const size_t &i,
const size_t &j,
const size_t &k)
const;
150 virtual Node *getNode(
const size_t &i,
const size_t &j);
151 virtual const Node *getNode(
const size_t &i,
const size_t &j)
const;
153 std::set<SetBase *>
get_sets(
void)
const;
167 boost::python::dict
getPyDict(
void)
const;
168 void setPyDict(
const boost::python::dict &);
172 std::set<const Pnt *> getCommonVertex(
const Face &,
const Face &,
const Face &);
size_t getNumberOfEdges(void) const
Return the number of edges.
Definition: CmbEdge.h:152
virtual void setNDivI(const size_t &)
Set the number of divisions on the i axis.
Definition: Face.cc:216
int get_index_opposite_side(const int &) const
Return the index of th opposite side with respect to the one being passed as parameter.
Definition: Face.cc:87
std::set< SetBase * > get_sets(void) const
Returns the sets that contains this surface.
Definition: Face.cc:1055
dq_holes holes
holes in this surface.
Definition: Face.h:62
void setKOrientation(const Vector3d &)
Set the orientation of the face normal according to the vector argument.
Definition: Face.cc:872
void add_to_sets(std::set< SetBase *> &)
Appends the surface to each of the sets being passed as parameter.
Definition: Face.cc:1072
hole_iterator findHole(PolygonalFace *)
Return an iterator to the hole corresponding to the argument return holes.end() if not found...
Definition: Face.cc:499
virtual void setNDivJ(const size_t &)
Set the number of divisions on the j axis.
Definition: Face.cc:238
Plane polygon in a 3D space.
Definition: Polygon3d.h:35
std::string orientation(const Pos3d &) const
Return the orientation of the face.
Definition: Face.cc:976
bool isConnectedTo(const Body &b) const
Returns true if the lines touches the body (neighbor).
Definition: Face.cc:1048
Base class for one-dimensional geometry objects.
Definition: Edge.h:48
const Edge * getOppositeEdge(const Edge &) const
Return the opposite side with respect to the one being passed as parameter.
Definition: Face.cc:766
virtual void ConciliaNDivIJ(void)
Conciliate lines division numbers with those of the surface.
Definition: Face.cc:377
Polygonal face defined by an arbitrary number of vertices.
Definition: PolygonalFace.h:45
int create_elements_from_quads(const std::deque< std::vector< int > > &)
Create nodes from quad tags (i.e. [tagI, tagJ, tagK, tagL].
Definition: Face.cc:704
Finite element model generation tools.
Definition: Preprocessor.h:59
void setNDiv(const size_t &)
Sets the number of divisions for all its sides.
Definition: Face.cc:200
bool counterclockwise(const Pos3d &) const
Return true if the points are counter-clockwise ordered with respect to the element.
Definition: Face.cc:986
std::deque< std::pair< const Edge *, const Edge * > > getOppositeEdges(void) const
Return a deque of opposite edge pairs.
Definition: Face.cc:775
void set_ndiv_j(const size_t &)
Sets the number of divisions for direction J.
Definition: Face.cc:194
Polyline in a three-dimensional space.
Definition: Polyline3d.h:37
Plane in a three-dimensional space.
Definition: Plane.h:49
Face(void)
Constructor.
Definition: Face.cc:50
virtual void SetElemSizeJ(const double &sz)
Computes the number of divisions on the j axis for an element edge size equal or lesser than the size...
Definition: Face.cc:443
bool isHole(void) const
Return true if the face corresponds to a hole.
Definition: Face.cc:539
Matrix getLocalAxes(void) const
Returns a matrix with the axes of the surface as matrix rows [[x1,y1,z1],[x2,y2,z2],...·].
Definition: Face.cc:1000
int setIOrientation(const Vector3d &)
Set the orientation of the face i unit vector as close as possible to the given vector.
Definition: Face.cc:883
Plane getPlane(void) const
Return the plane containing the face.
Definition: Face.cc:913
virtual bool checkNDivs(void) const
Verifies that the number of divisions of the lines are compatible.
Definition: Face.cc:355
void setHole(const bool &)
Return true if the face corresponds to a hole.
Definition: Face.cc:543
void set_ndiv_i(const size_t &)
Sets the number of divisions for direction I.
Definition: Face.cc:190
const std::deque< PolygonalFace * > & getHoles(void) const
Return a list of the face holes.
Definition: Face.cc:565
void set_ndiv_opposite_sides(const size_t &, const size_t &)
Set the number of divisions for the edge argument and its opposite side.
Definition: Face.cc:261
virtual void SetElemSizeI(const double &sz)
Computes the number of divisions on the i axis for an element edge size equal or lesser than the size...
Definition: Face.cc:410
size_t calc_ndiv_opposite_sides(const Edge *, const size_t &) const
Computes a suitable number of divisions for the edge argument and its opposite side.
Definition: Face.cc:145
virtual void SetElemSizeIJ(const double &, const double &)
Computes the number of divisions on the i and j axis for an element edges sizes equal or lesser than ...
Definition: Face.cc:477
std::deque< const Edge * > getNDivErrors(void) const
Returns a list with the edges that have an incompatible number of divisions.
Definition: Face.cc:336
bool isFlat(const double &tol=1e-6) const
return true if the surface is flat.
Definition: Face.cc:928
int create_gmsh_loop(void) const
Create a Gmsh curve loop from the face sides.
Definition: Face.cc:582
size_t CommonEdge(const Face &other) const
Returns the index of the edge in common with the surface being passed as parameter (if it exists)...
Definition: Face.cc:795
int SenseOfEdge(const Edge *l, const Face &other) const
Returns:
Definition: Face.cc:815
int getVtkCellType(void) const
Interfaz con VTK.
Definition: Face.cc:1132
std::deque< Side * > findSides(const Pos3d &)
Return a pointer to the side at the position argument.
Definition: Face.cc:645
virtual void reverse(void)
Reverse the verrtex sequence.
Definition: Face.cc:850
bool hole
true if the face is a hole.
Definition: Face.h:60
bool isWarped(const double &tol=1e-6) const
return true if the surface is warped.
Definition: Face.cc:950
Compound line.
Definition: CmbEdge.h:46
void create_line_nodes(void)
Triggers node creation on the edges.
Definition: Face.cc:741
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: Face.cc:1190
virtual bool operator==(const Face &) const
Comparison operator.
Definition: Face.cc:69
Polyline3d getContour(void) const
Returns the contour of the face as a 3D polyline.
Definition: Face.cc:909
virtual unsigned short int GetDimension(void) const
Returns the dimension of the object.
Definition: Face.h:84
Point (KPoint).
Definition: Pnt.h:50
double getArea(void) const
Returns the face area.
Definition: Face.cc:1025
const std::set< const Body * > & getConnectedBodies(void) const
Return the bodies that touch this surface (neighbors).
Definition: Face.h:138
const std::set< const Face * > & getConnectedSurfaces(void) const
Return the surfaces that touch the line.
Definition: Edge.cc:502
virtual void SetElemSize(const double &sz, bool mustBeEven=true)
Computes the number of divisions on the i axis for an element edge size equal or lesser than the size...
Definition: Face.cc:393
Vector3d getKVector(void) const
Returns a vector in the direction of the local Z axis.
Definition: Face.cc:991
virtual const Pnt * getVertex(const size_t &i) const
Returns the i-th vertex.
Definition: Face.cc:901
void addHole(PolygonalFace *)
Add a hole to the face.
Definition: Face.cc:549
Posición en tres dimensiones.
Definition: Pos3d.h:44
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
void revolve(const int &)
Move forward or backwards the sequence of vertexes.
Definition: Face.cc:861
Matrix of floats.
Definition: Matrix.h:111
Six-faced solid.
Definition: Body.h:71
bool clockwise(const Pos3d &) const
Return true if the point list is oriented clockwise.
Definition: Face.cc:968
double getSquaredDistanceTo(const Pos3d &pt) const
Return the squared distance to the point.
Definition: Face.cc:962
size_t getNumberOfVertices(void) const
Returns the number of vertices.
Definition: Face.h:124
Polygon3d getPolygon(void) const
Return the surface contour as a polygon.
Definition: Face.cc:954
void update_topology(void)
Updates topology.
Definition: Face.cc:758
Mesh node.
Definition: Node.h:111
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: Face.cc:1167
Pos3d getCentroid(void) const
Returns the centroid of the quad surface.
Definition: Face.cc:1013
std::vector< XC::Node * > create_interior_nodes(const std::vector< Pos3d > &)
Creates interior nodes at the positions being passed as parameters.
Definition: Face.cc:677
std::vector< int > create_gmsh_loops(void) const
Create the curve loops for the outer face and the holes.
Definition: Face.cc:611
Surface.
Definition: Face.h:45
Pnt * findVertex(const Pos3d &)
Return a pointer to the vertex at the position argument.
Definition: Face.cc:660
Vector en tres dimensiones.
Definition: Vector3d.h:39
size_t ndivj
number of divisions in the j axis.
Definition: Face.h:61
int create_gmsh_surface(void) const
Ask Gmsh to create the surface corresponding to this face.
Definition: Face.cc:628
Two-dimensional reference system defined in a three-dimensional space.
Definition: Ref2d3d.h:41
Object set.
Definition: SetEntities.h:77
virtual const Edge * get_opposite_side(const Edge *l) const
Return the opposite side with respect to the one being passed as parameter.
Definition: Face.cc:107
std::vector< int > create_gmsh_loops_for_holes(void) const
Create the curve loops of the face holes.
Definition: Face.cc:600
boost::python::list getPyHoles(void) const
Return a list of the face holes.
Definition: Face.cc:569
const PolygonalFace * findHolePtr(PolygonalFace *) const
Return a pointer to the hole corresponding to the argument return nullptr if not found.
Definition: Face.cc:532