Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
AMRComputeFunction.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 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/* AMRComputeFunction.h (C) 2000-2017 */
9/* */
10/* Classe fonctor de transport de variables . */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_AMRCOMPUTEFUNCTION_H
13#define ARCANE_AMRCOMPUTEFUNCTION_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/AMRTransportFunctor.h"
18
19#include "arcane/Item.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24ARCANE_BEGIN_NAMESPACE
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29/*---------------------------------------------------------------------------*/
30/*---------------------------------------------------------------------------*/
31
32/*---------------------------------------------------------------------------*/
33/*---------------------------------------------------------------------------*/
40{
41 public:
42
43 template<typename ClassType>
44 AMRComputeFunction(ClassType* instance, void (ClassType::*func)(Array<ItemInternal*>&, AMROperationType))
45 : m_functor(new AMRTransportFunctorT<ClassType>(instance,func))
46 {
47 }
48 template<typename ClassType>
49 AMRComputeFunction(ClassType* instance, void (ClassType::*func)(Array<Cell>&, AMROperationType))
50 : m_functor(new AMRTransportFunctorT<ClassType>(instance,func))
51 {
52 }
53 virtual ~AMRComputeFunction(){ delete m_functor; }
54
55 public:
56
58 virtual void executeFunctor(Array<ItemInternal*>& cells, AMROperationType op)
59 {
60 m_functor->executeFunctor(cells,op);
61 }
63 virtual void executeFunctor(Array<Cell>& cells, AMROperationType op)
64 {
65 m_functor->executeFunctor(cells,op);
66 }
67
68 private:
69
70 IAMRTransportFunctor* m_functor;
71};
72
73/*---------------------------------------------------------------------------*/
74/*---------------------------------------------------------------------------*/
75
76ARCANE_END_NAMESPACE
77
78/*---------------------------------------------------------------------------*/
79/*---------------------------------------------------------------------------*/
80
81#endif
82
Interface de la classe fonctor de transport d'une CellVariable.
virtual void executeFunctor(Array< Cell > &cells, AMROperationType op)
Exécute la fonction de calcul.
virtual void executeFunctor(Array< ItemInternal * > &cells, AMROperationType op)
Exécute la fonction de calcul.
virtual ~AMRComputeFunction()
Libère les ressources.
Interface d'un fonctor avec argument.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120