xc
ElemPtrArray3d.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // XC program; finite element analysis code
4 // for structural analysis and design.
5 //
6 // Copyright (C) Luis C. Pérez Tato
7 //
8 // This program derives from OpenSees <http://opensees.berkeley.edu>
9 // developed by the «Pacific earthquake engineering research center».
10 //
11 // Except for the restrictions that may arise from the copyright
12 // of the original program (see copyright_opensees.txt)
13 // XC is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // This software is distributed in the hope that it will be useful, but
19 // WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program.
26 // If not, see <http://www.gnu.org/licenses/>.
27 //----------------------------------------------------------------------------
28 //ElemPtrArray3d.h
29 //Pointers to element in an array of matrices
30 
31 #ifndef ELEMPTRARRAY3d_H
32 #define ELEMPTRARRAY3d_H
33 
34 #include "utility/kernel/CommandEntity.h"
35 #include "ElemPtrArray.h"
36 #include "PtrArray3dBase.h"
37 
38 
39 namespace XC{
40 
41 class Vector;
42 class Element1D;
43 
47 class ElemPtrArray3d: public PtrArray3dBase<ElemPtrArray>
48  {
49  Element1D *get_nearest_element_1d(const Vector &, const std::string &);
50  public:
51  ElemPtrArray3d(const size_t n_layers= 0,const ElemPtrArray &m= ElemPtrArray());
52  ElemPtrArray3d(const size_t ,const size_t ,const size_t );
53 
54  Element *findElement(const int &);
55  const Element *findElement(const int &) const;
56  Element *getNearestElement(const Pos3d &p);
57  const Element *getNearestElement(const Pos3d &p) const;
58  boost::python::list getPyElementList(void) const;
59  bool removeElement(Element *);
60  bool removeElement(const int &);
61 
62  // Loads on elements.
63  void vector2dPointLoadGlobal(const Vector &,const Vector &);
64  void vector2dPointLoadLocal(const Vector &,const Vector &);
65  void vector3dPointLoadGlobal(const Vector &,const Vector &);
66  void vector3dPointLoadLocal(const Vector &,const Vector &);
67 
68  std::set<const Element *> getConnectedElements(const Node *) const;
69  std::set<Element *> getConnectedElements(const Node *);
70  boost::python::list getConnectedElementsPy(const Node *);
71  };
72 
73 } //end of XC namespace.
74 
75 #endif
Float vector abstraction.
Definition: Vector.h:94
Element * getNearestElement(const Pos3d &p)
Returns the element closest to the given point.
Definition: ElemPtrArray3d.cc:103
Matrix of pointers to elements.
Definition: ElemPtrArray.h:52
void vector3dPointLoadGlobal(const Vector &, const Vector &)
Define an elemental concentrated load at position p with value v expressed in global coordinates...
Definition: ElemPtrArray3d.cc:207
void vector2dPointLoadGlobal(const Vector &, const Vector &)
Define an elemental concentrated load at position p with value v expressed in global coordinates...
Definition: ElemPtrArray3d.cc:177
Three-dimensional array of pointers to elements.
Definition: ElemPtrArray3d.h:47
Base class for the finite elements.
Definition: Element.h:112
std::set< const Element * > getConnectedElements(const Node *) const
Return the elements connected to the node being passed as parameter.
Definition: ElemPtrArray3d.cc:253
Base class for one-dimensional elements (beam,truss,...)
Definition: Element1D.h:52
ElemPtrArray3d(const size_t n_layers=0, const ElemPtrArray &m=ElemPtrArray())
Default constructor.
Definition: ElemPtrArray3d.cc:36
bool removeElement(Element *)
Remove the given element from the array.
Definition: ElemPtrArray3d.cc:63
Element * findElement(const int &)
Returns (if it exists) a pointer to the element identified by the tag being passed as parameter...
Definition: ElemPtrArray3d.cc:48
boost::python::list getPyElementList(void) const
Returns a Python list containing the elements of this array.
Definition: ElemPtrArray3d.cc:234
void vector3dPointLoadLocal(const Vector &, const Vector &)
Define an elemental concentrated load at position p with value v expressed in local (element) coordin...
Definition: ElemPtrArray3d.cc:222
Posición en tres dimensiones.
Definition: Pos3d.h:44
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
void vector2dPointLoadLocal(const Vector &, const Vector &)
Define an elemental concentrated load at position p with value v expressed in local (element) coordin...
Definition: ElemPtrArray3d.cc:192
Mesh node.
Definition: Node.h:111
Three-dimensional array of object pointers.
Definition: PtrArray3dBase.h:43
boost::python::list getConnectedElementsPy(const Node *)
Return the elements connected to the node being passed as parameter.
Definition: ElemPtrArray3d.cc:276