Arcane  v3.14.10.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
AMRCallBackMng.cc
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/* AMRCallBackMng.cc (C) 2000-2010 */
9/* */
10/* Gestionnaire des callbacks. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/utils/ArcanePrecomp.h"
15#include "arcane/utils/AMRCallBackMng.h"
16
17
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22ARCANE_BEGIN_NAMESPACE
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27// -------------------------------------------------------------------
28void AMRCallBackMng::initialize()
29{
30}
31
32// -------------------------------------------------------------------
33void AMRCallBackMng::finalize()
34{
35 m_amr_transport_functors.clear();
36}
37
38// -------------------------------------------------------------------
39void AMRCallBackMng::registerCallBack(IAMRTransportFunctor * f)
40{
41 m_amr_transport_functors.add(f);
42}
43
44// -------------------------------------------------------------------
45void AMRCallBackMng::unregisterCallBack(IAMRTransportFunctor * f)
46{
47 m_amr_transport_functors.remove(f);
48}
49// -------------------------------------------------------------------
50void AMRCallBackMng::callCallBacks(Array<ItemInternal*>& old, AMROperationType op)
51{
52 IAMRTransportFunctorList::const_iterator ib(m_amr_transport_functors.begin()), ie(m_amr_transport_functors.end());
53 for (; ib != ie; ib++) {
54 (*ib)->executeFunctor(old,op);
55 }
56}
57// -------------------------------------------------------------------
58void AMRCallBackMng::callCallBacks(Array<Cell>& old, AMROperationType op)
59{
60 IAMRTransportFunctorList::const_iterator ib(m_amr_transport_functors.begin()), ie(m_amr_transport_functors.end());
61 for (; ib != ie; ib++) {
62 (*ib)->executeFunctor(old,op);
63 }
64}
65
66/*---------------------------------------------------------------------------*/
67/*---------------------------------------------------------------------------*/
68
69ARCANE_END_NAMESPACE
70
71/*---------------------------------------------------------------------------*/
72/*---------------------------------------------------------------------------*/