Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
AlephInterface.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2024 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* AlephInterface.h (C) 2000-2024 */
9/* */
10/* */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_ALEPH_ALEPHINTERFACE_H
13#define ARCANE_ALEPH_ALEPHINTERFACE_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/TraceAccessor.h"
18#include "arcane/aleph/AlephKernel.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29class AlephKernel;
30class IAlephVector;
31class AlephVector;
32
33/******************************************************************************
34 * IAlephTopology
35 *****************************************************************************/
37: public TraceAccessor
38{
39 public:
40
42 AlephKernel* kernel,
43 Integer index,
44 Integer nb_row_size)
46 , m_index(index)
47 , m_kernel(kernel)
48 , m_participating_in_solver(kernel->subParallelMng(index) != NULL)
49 {
50 ARCANE_UNUSED(nb_row_size);
51 debug() << "\33[1;34m\t\t[IAlephTopology] NEW IAlephTopology"
52 << "\33[0m";
53 debug() << "\33[1;34m\t\t[IAlephTopology] m_participating_in_solver="
54 << m_participating_in_solver << "\33[0m";
55 }
57 {
58 debug() << "\33[1;5;34m\t\t[~IAlephTopology]"
59 << "\33[0m";
60 }
61
62 public:
63
64 virtual void backupAndInitialize() = 0;
65 virtual void restore() = 0;
66
67 protected:
68
69 Integer m_index;
70 AlephKernel* m_kernel;
71 bool m_participating_in_solver;
72};
73
74/******************************************************************************
75 * IAlephVector
76 *****************************************************************************/
78: public TraceAccessor
79{
80 public:
81
83 AlephKernel* kernel,
84 Integer index)
86 , m_index(index)
87 , m_kernel(kernel)
88 {
89 debug() << "\33[1;34m\t\t[IAlephVector] NEW IAlephVector"
90 << "\33[0m";
91 }
93 {
94 debug() << "\33[1;5;34m\t\t[~IAlephVector]"
95 << "\33[0m";
96 }
97
98 public:
99
100 virtual void AlephVectorCreate(void) = 0;
101 virtual void AlephVectorSet(const double*, const AlephInt*, Integer) = 0;
102 virtual int AlephVectorAssemble(void) = 0;
103 virtual void AlephVectorGet(double*, const AlephInt*, Integer) = 0;
104 virtual void writeToFile(const String) = 0;
105
106 protected:
107
108 Integer m_index;
109 AlephKernel* m_kernel;
110};
111
112/******************************************************************************
113 * IAlephMatrix
114 *****************************************************************************/
116: public TraceAccessor
117{
118 public:
119
121 AlephKernel* kernel,
122 Integer index)
124 , m_index(index)
125 , m_kernel(kernel)
126 {
127 debug() << "\33[1;34m\t\t[IAlephMatrix] NEW IAlephMatrix"
128 << "\33[0m";
129 }
131 {
132 debug() << "\33[1;5;34m\t\t[~IAlephMatrix]"
133 << "\33[0m";
134 }
135
136 public:
137
138 virtual void AlephMatrixCreate(void) = 0;
139 virtual void AlephMatrixSetFilled(bool) = 0;
140 virtual int AlephMatrixAssemble(void) = 0;
141 virtual void AlephMatrixFill(int, AlephInt*, AlephInt*, double*) = 0;
142 virtual int AlephMatrixSolve(AlephVector*,
145 Integer&,
146 Real*,
147 AlephParams*) = 0;
148 virtual void writeToFile(const String) = 0;
149
150 protected:
151
152 Integer m_index;
153 AlephKernel* m_kernel;
154};
155
156/*---------------------------------------------------------------------------*/
157/*---------------------------------------------------------------------------*/
158
160: public TraceAccessor
161{
162 public:
163
164 explicit IAlephFactory(ITraceMng* tm)
166 {
167 debug() << "\33[1;34m[IAlephFactory] NEW IAlephFactory"
168 << "\33[0m";
169 }
171 {
172 debug() << "\33[1;5;34m[~IAlephFactory]"
173 << "\33[0m";
174 }
175 virtual IAlephTopology* GetTopology(AlephKernel*, Integer, Integer) = 0;
176 virtual IAlephVector* GetVector(AlephKernel*, Integer) = 0;
177 virtual IAlephMatrix* GetMatrix(AlephKernel*, Integer) = 0;
178};
179
180/*---------------------------------------------------------------------------*/
181/*---------------------------------------------------------------------------*/
189{
190 public:
191
192 virtual ~IAlephFactoryImpl() {}
193 virtual void initialize() = 0;
194 virtual IAlephTopology* createTopology(ITraceMng*, AlephKernel*, Integer, Integer) = 0;
195 virtual IAlephVector* createVector(ITraceMng*, AlephKernel*, Integer) = 0;
196 virtual IAlephMatrix* createMatrix(ITraceMng*, AlephKernel*, Integer) = 0;
197};
198
199/*---------------------------------------------------------------------------*/
200/*---------------------------------------------------------------------------*/
201
202} // namespace Arcane
203
204/*---------------------------------------------------------------------------*/
205/*---------------------------------------------------------------------------*/
206
207#endif // _I_ALEPH_INTERFACE_H_
Paramètres d'un système linéraire.
Definition AlephParams.h:34
Vecteur d'un système linéaire.
Definition AlephVector.h:33
Interface d'une fabrique d'implémentation pour Aleph.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
Interface du gestionnaire de traces.
Chaîne de caractères unicode.
TraceMessageDbg debug(Trace::eDebugLevel=Trace::Medium) const
Flot pour un message de debug.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
int AlephInt
Type par défaut pour indexer les lignes et les colonnes des matrices et vecteurs.
Definition AlephGlobal.h:50