xc
EntMdlrBase.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 //EntMdlrBase.h
29 
30 #ifndef ENTMDLRBASE_H
31 #define ENTMDLRBASE_H
32 
33 #include "utility/kernel/NamedEntity.h"
34 #include "utility/utils/text/LabelContainer.h"
35 #include "utility/actor/actor/MovableObject.h"
36 
37 namespace XC {
38 class Preprocessor;
39 class Pnt;
40 class Edge;
41 class Face;
42 
46 class EntMdlrBase: public NamedEntity, public MovableObject
47  {
48  protected:
50 
51  bool check_preprocessor(void) const;
52  int sendIdsLabels(const int &,const int &, Communicator &);
53  int recvIdsLabels(const int &,const int &, const Communicator &);
54  int sendData(Communicator &);
55  int recvData(const Communicator &);
56  public:
57  EntMdlrBase(const std::string &nmb="",Preprocessor *preprocessor= nullptr);
61  virtual bool operator==(const EntMdlrBase &) const;
62  const Preprocessor *getPreprocessor(void) const;
64  inline const LabelContainer &getLabels(void) const
65  { return labels; }
66 
67  size_t getTag(void) const;
68 
69  Pnt *BuscaPnt(const size_t &);
70  const Pnt *BuscaPnt(const size_t &) const;
71  Edge *BuscaEdge(const size_t &);
72  const Edge *BuscaEdge(const size_t &) const;
73  Face *BuscaFace(const size_t &);
74  const Face *BuscaFace(const size_t &) const;
75  virtual int sendSelf(Communicator &);
76  virtual int recvSelf(const Communicator &);
77 
78  boost::python::dict getPyDict(void) const;
79  void setPyDict(const boost::python::dict &);
80  };
81 
84 EntMdlrBase operator*(const EntMdlrBase &,const EntMdlrBase &);
85 std::ostream &operator<<(std::ostream &os, const EntMdlrBase &e);
86 
87 } //end of XC namespace
88 #endif
EntMdlrBase & operator+=(const EntMdlrBase &)
+= operator.
Definition: EntMdlrBase.cc:68
Pnt * BuscaPnt(const size_t &)
Return a pointer to the point identified by the tag being passed as parameter.
Definition: EntMdlrBase.cc:126
EntMdlrBase & operator*=(const EntMdlrBase &)
*= operator (intersection).
Definition: EntMdlrBase.cc:84
Base class for one-dimensional geometry objects.
Definition: Edge.h:48
virtual bool operator==(const EntMdlrBase &) const
Comparison operator.
Definition: EntMdlrBase.cc:53
Communication parameters between processes.
Definition: Communicator.h:66
bool check_preprocessor(void) const
Check for preprocessor.
Definition: EntMdlrBase.cc:110
virtual int sendSelf(Communicator &)
Send objects through the communicator argument.
Definition: EntMdlrBase.cc:277
Finite element model generation tools.
Definition: Preprocessor.h:59
Object that can move between processes.
Definition: MovableObject.h:100
Label container.
Definition: LabelContainer.h:58
Base class of the preprocessor objects.
Definition: EntMdlrBase.h:46
size_t getTag(void) const
Return the object identifier in the model (tag).
Definition: EntMdlrBase.cc:92
FiberSet operator+(const FiberSet &, const FiberSet &)
Return the union of both containers.
Definition: FiberSet.cc:65
EntMdlrBase(const std::string &nmb="", Preprocessor *preprocessor=nullptr)
Constructor.
Definition: EntMdlrBase.cc:49
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: EntMdlrBase.cc:260
Face * BuscaFace(const size_t &)
Return a pointer to the face identified by the tag being passed as parameter.
Definition: EntMdlrBase.cc:178
int recvIdsLabels(const int &, const int &, const Communicator &)
Receive labels through the communicator argument.
Definition: EntMdlrBase.cc:224
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: EntMdlrBase.cc:268
int sendData(Communicator &)
Send members through the communicator argument.
Definition: EntMdlrBase.cc:242
Point (KPoint).
Definition: Pnt.h:50
EntMdlrBase & operator-=(const EntMdlrBase &)
-= operator.
Definition: EntMdlrBase.cc:76
virtual int recvSelf(const Communicator &)
Receive objects through the communicator argument.
Definition: EntMdlrBase.cc:292
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
FiberSet operator-(const FiberSet &, const FiberSet &)
Return the fibers in a that are not in b.
Definition: FiberSet.cc:73
LabelContainer labels
Label container.
Definition: EntMdlrBase.h:49
Object identified by a name.
Definition: NamedEntity.h:37
Edge * BuscaEdge(const size_t &)
Return a pointer to the edge identified by the tag being passed as parameter.
Definition: EntMdlrBase.cc:152
const Preprocessor * getPreprocessor(void) const
Return a pointer to the object preprocessor.
Definition: EntMdlrBase.cc:41
Surface.
Definition: Face.h:45
int sendIdsLabels(const int &, const int &, Communicator &)
Send labels through the communicator argument.
Definition: EntMdlrBase.cc:203
int recvData(const Communicator &)
Receive members through the communicator argument.
Definition: EntMdlrBase.cc:250