OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
fetisolver.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 fetisolver_h
36 #define fetisolver_h
37 
38 #include "../sm/FETISolver/feticommunicator.h"
39 #include "sparselinsystemnm.h"
40 #include "sparsemtrx.h"
41 #include "floatarray.h"
42 #include "floatmatrix.h"
43 #include "processcomm.h"
44 
46 
47 #define _IFT_FETISolver_Name "feti"
48 #define _IFT_FETISolver_maxiter "maxiter"
49 #define _IFT_FETISolver_maxerr "maxerr"
50 #define _IFT_FETISolver_limit "limit"
51 #define _IFT_FETISolver_energynormflag "energynormflag"
52 
53 
54 namespace oofem {
55 class Domain;
56 class EngngModel;
57 
58 
59  #define FETISOLVER_MAX_RBM 6
60  #define FETISOLVER_ZERONUM 1.e-40
62 
68 {
69 private:
70  int nse;
72  int ni;
74  double err;
76  double limit;
87  //
89  //
101 public:
102  FETISolver(Domain * d, EngngModel * m);
103  virtual ~FETISolver();
104 
114  virtual NM_Status solve(SparseMtrx &A, FloatArray &b, FloatArray &x);
115 
116  int estimateMaxPackSize(IntArray &, DataStream &, int &);
118  void setUpCommunicationMaps();
119 
121 
122  // identification
123  virtual const char *giveClassName() const { return "FETISolver"; }
124  virtual LinSystSolverType giveLinSystSolverType() const { return ST_Feti; }
125 
126  void projection(FloatArray &v, FloatMatrix &l, FloatMatrix &l1);
127 
128  int packRBM(ProcessCommunicator &processComm);
129  int masterUnpackRBM(ProcessCommunicator &processComm);
130  int packQQProducts(ProcessCommunicator &processComm);
131  int masterUnpackQQProduct(ProcessCommunicator &processComm);
132  int packSolution(ProcessCommunicator &processComm);
133  int unpackSolution(ProcessCommunicator &processComm);
134  int packResiduals(ProcessCommunicator &processComm);
135  int unpackResiduals(ProcessCommunicator &processComm);
136  int packDirectionVector(ProcessCommunicator &processComm);
137  int unpackDirectionVector(ProcessCommunicator &processComm);
138  int packPPVector(ProcessCommunicator &processComm);
139  int unpackPPVector(ProcessCommunicator &processComm);
140  int packGammas(ProcessCommunicator &processComm);
141  int unpackGammas(ProcessCommunicator &processComm);
142 
143  int masterMapRBM();
144  int masterMapQQProduct();
145  int masterMapSolution();
146  int masterMapResiduals();
148  int masterMapPPVector();
149  int masterMapGammas();
150 
152  virtual SparseMtrxType giveRecommendedMatrix(bool symmetric) const { return symmetric ? SMT_Skyline : SMT_SkylineU; }
153 };
154 } // end namespace oofem
155 
156 #endif // fetisolver_h
LinSystSolverType
The values of this type should be related not to specific solvers, but more to specific packages that...
FloatMatrix l
Rigid body motions of all partitions. On master only.
Definition: fetisolver.h:80
FloatArray d
Definition: fetisolver.h:88
Class and object Domain.
Definition: domain.h:115
FloatArray qq
Definition: fetisolver.h:88
Base class for all matrices stored in sparse format.
Definition: sparsemtrx.h:60
ProcessCommunicatorBuff pcbuff
Definition: fetisolver.h:92
int packGammas(ProcessCommunicator &processComm)
Definition: fetisolver.C:1005
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
int masterUnpackRBM(ProcessCommunicator &processComm)
Definition: fetisolver.C:281
This base class is an abstraction for all numerical methods solving sparse linear system of equations...
ProcessCommunicator processCommunicator
Definition: fetisolver.h:93
int packQQProducts(ProcessCommunicator &processComm)
Definition: fetisolver.C:395
int packResiduals(ProcessCommunicator &processComm)
Definition: fetisolver.C:589
int estimateMaxPackSize(IntArray &, DataStream &, int &)
Definition: fetisolver.C:67
IntArray se
Indices of singular equations.
Definition: fetisolver.h:82
int unpackGammas(ProcessCommunicator &processComm)
Definition: fetisolver.C:1022
int unpackSolution(ProcessCommunicator &processComm)
Definition: fetisolver.C:495
virtual ~FETISolver()
Definition: fetisolver.C:57
IntArray masterCommMap
List of local nodes (at master) participating in communication (list of boundary dof managers)...
Definition: fetisolver.h:98
The ProcessCommunicator and corresponding buffers (represented by this class) are separated in order ...
Definition: processcomm.h:64
unsigned long NM_Status
Mask defining NumMetod Status; which can be asked after finishing computation by Numerical Method...
Definition: nmstatus.h:44
Class implementing an array of integers.
Definition: intarray.h:61
virtual const char * giveClassName() const
Definition: fetisolver.h:123
FloatArray q
Definition: fetisolver.h:88
int unpackPPVector(ProcessCommunicator &processComm)
Definition: fetisolver.C:895
IntArray rbmAddr
Addresses of initial partition contribution to rbm matrix.
Definition: fetisolver.h:84
int masterUnpackQQProduct(ProcessCommunicator &processComm)
Definition: fetisolver.C:410
This class implements the class NumericalMethod instance FETI linear algebraic equation parallel solv...
Definition: fetisolver.h:67
void setUpCommunicationMaps()
Sets up the communication maps.
Definition: fetisolver.C:118
int ni
Max number of iterations.
Definition: fetisolver.h:72
int packDirectionVector(ProcessCommunicator &processComm)
Definition: fetisolver.C:729
FETICommunicator * masterCommunicator
Definition: fetisolver.h:96
int packPPVector(ProcessCommunicator &processComm)
Definition: fetisolver.C:867
SparseMtrxType
Enumerative type used to identify the sparse matrix type.
int unpackResiduals(ProcessCommunicator &processComm)
Definition: fetisolver.C:617
int masterMapDirectionVector()
Definition: fetisolver.C:808
int masterMapQQProduct()
Definition: fetisolver.C:432
Class representing process communicator for engineering model.
Definition: processcomm.h:176
FloatMatrix rbm
Rigid body motions.
Definition: fetisolver.h:78
double limit
Linear dep./indep. trigger.
Definition: fetisolver.h:76
virtual IRResultType initializeFrom(InputRecord *ir)
Definition: fetisolver.C:93
virtual LinSystSolverType giveLinSystSolverType() const
Definition: fetisolver.h:124
FloatArray p
Definition: fetisolver.h:88
virtual NM_Status solve(SparseMtrx &A, FloatArray &b, FloatArray &x)
Solves the given linear system by LDL^T factorization.
Definition: fetisolver.C:1052
Class representing vector of real numbers.
Definition: floatarray.h:82
int masterMapSolution()
Definition: fetisolver.C:529
int energyNorm_comput_flag
Flag indicating computation of energy norm.
Definition: fetisolver.h:100
int unpackDirectionVector(ProcessCommunicator &processComm)
Definition: fetisolver.C:779
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
FloatArray dd
Definition: fetisolver.h:88
FloatArray g
Definition: fetisolver.h:88
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
int packSolution(ProcessCommunicator &processComm)
Definition: fetisolver.C:446
FETISolver(Domain *d, EngngModel *m)
Definition: fetisolver.C:49
Class representing communicator for FETI solver.
Class representing the general Input Record.
Definition: inputrecord.h:101
FloatArray pp
Definition: fetisolver.h:88
virtual SparseMtrxType giveRecommendedMatrix(bool symmetric) const
Returns the recommended sparse matrix type for this solver.
Definition: fetisolver.h:152
int masterMapResiduals()
Definition: fetisolver.C:666
int masterMapPPVector()
Definition: fetisolver.C:944
int packRBM(ProcessCommunicator &processComm)
Definition: fetisolver.C:249
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
FloatArray localGammas
Definition: fetisolver.h:88
the oofem namespace is to define a context or scope in which all oofem names are defined.
Symmetric skyline.
double err
Max allowed error.
Definition: fetisolver.h:74
void projection(FloatArray &v, FloatMatrix &l, FloatMatrix &l1)
Definition: fetisolver.C:221
Unsymmetric skyline.
FloatArray w
Primary unknowns.
Definition: fetisolver.h:86
CommunicatorBuff * commBuff
Common Communicator buffer.
Definition: fetisolver.h:95
FloatArray gamma
Definition: fetisolver.h:88

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:28 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011