XC Open source finite element analysis program
MapFields.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 //MapFields.h
28 //Sets container.
29 
30 #ifndef MAPFIELDS_H
31 #define MAPFIELDS_H
32 
33 #include "FieldInfo.h"
34 #include "utility/actor/actor/MovableObject.h"
35 #include <deque>
36 
37 
38 namespace XC {
39 class Preprocessor;
40 
42 //
44 class MapFields: public EntCmd, public MovableObject, public std::deque<FieldInfo>
45  {
46  public:
47  typedef std::deque<FieldInfo> dq_fields;
48  typedef dq_fields::iterator iterator;
49  typedef dq_fields::const_iterator const_iterator;
50  private:
51  Preprocessor *preprocessor;
52 
53  bool existe(const std::string &nmb) const;
54 
55 
56  friend class ProblemaEF;
57  iterator buscaField(const std::string &nmb);
58  void clearAll(void);
59 
60  protected:
61 
62  int sendData(CommParameters &);
63  int recvData(const CommParameters &);
64  friend class Preprocessor;
65  public:
66  MapFields(Preprocessor *preprocessor= nullptr);
67 
68  FieldInfo &newField(const std::string &);
69 
70  const_iterator buscaField(const std::string &nmb) const;
71 
72  int sendSelf(CommParameters &);
73  int recvSelf(const CommParameters &);
74  };
75 } // end of XC namespace
76 
77 #endif
Information about a field defined over a set.
Definition: FieldInfo.h:39
int recvData(const CommParameters &)
Receives members through the channel being passed as parameter.
Definition: MapFields.cc:87
Container of field definitions.
Definition: MapFields.h:44
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: MapFields.cc:108
Object that can move between processes.
Definition: MovableObject.h:91
MapFields(Preprocessor *preprocessor=nullptr)
Default constructor.
Definition: MapFields.cc:63
Finite element model generation tools.
Definition: Preprocessor.h:58
Finite element problem.
Definition: ProblemaEF.h:84
int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: MapFields.cc:94
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
FieldInfo & newField(const std::string &)
Defines a new field
Definition: MapFields.cc:67
int sendData(CommParameters &)
Send members through the channel being passed as parameter.
Definition: MapFields.cc:80