OOFEM 3.0
Loading...
Searching...
No Matches
parallelordering.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 parallelordering_h
36#define parallelordering_h
37
38#include "oofemenv.h"
39#include "intarray.h"
40#include "dofmanager.h"
41
42#include <map>
43
44namespace oofem {
45class EngngModel;
46class IntArray;
48
50{
51public:
53 virtual ~ParallelOrdering() { }
54
56 bool isLocal(DofManager *dman);
58 bool isShared(DofManager *dman);
59
65 virtual void init(EngngModel *em, int di, const UnknownNumberingScheme &u) = 0;
66
73 virtual int giveNumberOfLocalEqs() { return 0; }
77 virtual int giveNumberOfGlobalEqs() { return 0; }
78
84 virtual int giveNewEq(int leq) = 0;
90 virtual int giveOldEq(int eq) = 0;
91
92 virtual void map2New(IntArray &answer, const IntArray &src, int baseOffset = 0) = 0;
93 virtual void map2Old(IntArray &answer, const IntArray &src, int baseOffset = 0) = 0;
94};
95
101{
102protected:
106 std :: map< int, int >globLocMap;
107
110
111public:
114
115 void init(EngngModel *, int di, const UnknownNumberingScheme &n) override;
116
117 int giveNewEq(int leq) override;
118 int giveOldEq(int eq) override;
119
120 void map2New(IntArray &answer, const IntArray &src, int baseOffset = 0) override;
121 void map2Old(IntArray &answer, const IntArray &src, int baseOffset = 0) override;
122
123 int giveNumberOfLocalEqs() override { return l_neqs; }
124 int giveNumberOfGlobalEqs() override { return g_neqs; }
125
127};
128
134{
135protected:
138
139public:
142
143 void init(EngngModel *, int di, const UnknownNumberingScheme &n) override;
144
145 int giveNewEq(int leq) override;
146 int giveOldEq(int eq) override;
147
148 void map2New(IntArray &answer, const IntArray &src, int baseOffset = 0) override;
149 void map2Old(IntArray &answer, const IntArray &src, int baseOffset = 0) override;
150
151 IntArray *giveN2Lmap() { return & n2l; }
152};
153} // end namespace oofem
154
155#endif // parallelordering_h
IntArray locGlobMap
Old to new mapping; uses 0-based global eq ordering; 1-based local ordering.
std ::map< int, int > globLocMap
New to old mapping.
int l_neqs
Number of local and global eqs.
IntArray n2l
Natural to local.
virtual void map2New(IntArray &answer, const IntArray &src, int baseOffset=0)=0
virtual int giveNewEq(int leq)=0
virtual int giveNumberOfGlobalEqs()
virtual int giveOldEq(int eq)=0
virtual void map2Old(IntArray &answer, const IntArray &src, int baseOffset=0)=0
virtual int giveNumberOfLocalEqs()
virtual void init(EngngModel *em, int di, const UnknownNumberingScheme &u)=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