OOFEM 3.0
Loading...
Searching...
No Matches
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 - 2025 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
41namespace oofem {
42class EngngModel;
43
51{
52protected:
54
55public:
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;
95
96protected:
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
111public:
113 int DofManCmp(int, int);
115 int ElemCmp(int, int);
116};
117
119{
120public:
121 NodeCommunicator(EngngModel * emodel, CommunicatorBuff * b, int rank, int size);
122 virtual ~NodeCommunicator() {}
123
124 void setUpCommunicationMaps(EngngModel *emodel, bool excludeSelfCommFlag, bool forceReinit = false) override;
125 int setProcessCommunicatorToSendArry(ProcessCommunicator *processComm, IntArray &map) override;
126 int setProcessCommunicatorToRecvArry(ProcessCommunicator *processComm, IntArray &map) override;
127};
128
130{
131public:
132 ElementCommunicator(EngngModel * emodel, CommunicatorBuff * b, int rank, int size);
134
135 void setUpCommunicationMaps(EngngModel *emodel, bool excludeSelfCommFlag, bool forceReinit = false) override;
136 int setProcessCommunicatorToSendArry(ProcessCommunicator *processComm, IntArray &map) override;
137 int setProcessCommunicatorToRecvArry(ProcessCommunicator *processComm, IntArray &map) override;
138};
139
140} // end namespace oofem
141
142#endif // problemcomm_h
int rank
Rank of process.
Communicator(EngngModel *emodel, CommunicatorBuff *buff, int rank, int size, CommunicatorMode mode=CommMode_Static)
ElementCommunicator(EngngModel *emodel, CommunicatorBuff *b, int rank, int size)
Definition problemcomm.C:64
NodeCommunicator(EngngModel *emodel, CommunicatorBuff *b, int rank, int size)
Definition problemcomm.C:60
int quickSortPartition(IntArray &map, int l, int r, int(ProblemCommunicator ::*cmp)(int, int))
Partitioning used in quicksort.
void sortCommMap(IntArray &map, int(ProblemCommunicator ::*cmp)(int, int))
void quickSortCommMap(IntArray &map, int l, int r, int(ProblemCommunicator ::*cmp)(int, int))
Implementation of quicksort algorithm.
virtual int setProcessCommunicatorToRecvArry(ProcessCommunicator *processComm, IntArray &map)=0
int DofManCmp(int, int)
Global dofManager number comparison function.
virtual int setProcessCommunicatorToSendArry(ProcessCommunicator *processComm, IntArray &map)=0
int ElemCmp(int, int)
Global element comparison function.
ProblemCommunicator(EngngModel *emodel, CommunicatorBuff *b, int rank, int size)
Definition problemcomm.C:49
virtual void setUpCommunicationMaps(EngngModel *emodel, bool excludeSelfCommFlag, bool forceReinit=false)=0
#define OOFEM_EXPORT
Definition oofemcfg.h:7

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011