OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
problemcomm.h
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 #ifndef problemcomm_h
36 #define problemcomm_h
37 
38 #include "communicator.h"
39 #include "error.h"
40 
41 namespace oofem {
42 class EngngModel;
43 
50 class OOFEM_EXPORT ProblemCommunicator : public Communicator
51 {
52 protected:
54 
55 public:
63  ProblemCommunicator(EngngModel * emodel, CommunicatorBuff * b, int rank, int size);
65  virtual ~ProblemCommunicator();
66 
74  virtual void setUpCommunicationMaps(EngngModel *emodel, bool excludeSelfCommFlag, bool forceReinit = false) = 0;
84  virtual int setProcessCommunicatorToSendArry(ProcessCommunicator *processComm, IntArray &map) = 0;
94  virtual int setProcessCommunicatorToRecvArry(ProcessCommunicator *processComm, IntArray &map) = 0;
95 
96 protected:
105  void sortCommMap( IntArray &map, int ( ProblemCommunicator :: *cmp )( int, int ) );
107  void quickSortCommMap( IntArray &map, int l, int r, int ( ProblemCommunicator :: *cmp )( int, int ) );
109  int quickSortPartition( IntArray &map, int l, int r, int ( ProblemCommunicator :: *cmp )( int, int ) );
110 
111 public:
113  int DofManCmp(int, int);
115  int ElemCmp(int, int);
116 };
117 
118 class OOFEM_EXPORT NodeCommunicator : public ProblemCommunicator
119 {
120 public:
121  NodeCommunicator(EngngModel * emodel, CommunicatorBuff * b, int rank, int size);
122  virtual ~NodeCommunicator() {}
123 
124  virtual void setUpCommunicationMaps(EngngModel *emodel, bool excludeSelfCommFlag, bool forceReinit = false);
125  virtual int setProcessCommunicatorToSendArry(ProcessCommunicator *processComm, IntArray &map);
126  virtual int setProcessCommunicatorToRecvArry(ProcessCommunicator *processComm, IntArray &map);
127 };
128 
129 class OOFEM_EXPORT ElementCommunicator : public ProblemCommunicator
130 {
131 public:
132  ElementCommunicator(EngngModel * emodel, CommunicatorBuff * b, int rank, int size);
133  virtual ~ElementCommunicator() {}
134 
135  virtual void setUpCommunicationMaps(EngngModel *emodel, bool excludeSelfCommFlag, bool forceReinit = false);
136  virtual int setProcessCommunicatorToSendArry(ProcessCommunicator *processComm, IntArray &map);
137  virtual int setProcessCommunicatorToRecvArry(ProcessCommunicator *processComm, IntArray &map);
138 };
139 
140 } // end namespace oofem
141 
142 #endif // problemcomm_h
Class representing communicator for engng model.
Definition: problemcomm.h:50
Class implementing an array of integers.
Definition: intarray.h:61
Class representing process communicator for engineering model.
Definition: processcomm.h:176
int quickSortPartition(IntArray &arry, int l, int r, operation op)
Definition: intarray.h:365
Class representing communicator.
Definition: communicator.h:105
The Communicator and corresponding buffers (represented by this class) are separated in order to allo...
Definition: communicator.h:60
Abstract base class representing the "problem" under consideration.
Definition: engngm.h:181
the oofem namespace is to define a context or scope in which all oofem names are defined.

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:30 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011