Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
AMRCallBackMng.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 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/* Callback Manager. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/utils/ArcanePrecomp.h"
15#include "arcane/utils/AMRCallBackMng.h"
16
17/*---------------------------------------------------------------------------*/
18/*---------------------------------------------------------------------------*/
19
20namespace Arcane
21{
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25
26void AMRCallBackMng::
27initialize()
28{
29}
30
31/*---------------------------------------------------------------------------*/
32/*---------------------------------------------------------------------------*/
33
34void AMRCallBackMng::
35finalize()
36{
37 m_amr_transport_functors.clear();
38}
39
40/*---------------------------------------------------------------------------*/
41/*---------------------------------------------------------------------------*/
42
43void AMRCallBackMng::
44registerCallBack(IAMRTransportFunctor* f)
45{
46 m_amr_transport_functors.add(f);
47}
48
49/*---------------------------------------------------------------------------*/
50/*---------------------------------------------------------------------------*/
51
52void AMRCallBackMng::
53unregisterCallBack(IAMRTransportFunctor* f)
54{
55 m_amr_transport_functors.remove(f);
56}
57
58/*---------------------------------------------------------------------------*/
59/*---------------------------------------------------------------------------*/
60
61void AMRCallBackMng::
62callCallBacks(Array<ItemInternal*>& old, AMROperationType op)
63{
64 IAMRTransportFunctorList::const_iterator ib(m_amr_transport_functors.begin()), ie(m_amr_transport_functors.end());
65 for (; ib != ie; ib++) {
66 (*ib)->executeFunctor(old, op);
67 }
68}
69
70/*---------------------------------------------------------------------------*/
71/*---------------------------------------------------------------------------*/
72
73void AMRCallBackMng::
74callCallBacks(Array<Cell>& old, AMROperationType op)
75{
76 IAMRTransportFunctorList::const_iterator ib(m_amr_transport_functors.begin()), ie(m_amr_transport_functors.end());
77 for (; ib != ie; ib++) {
78 (*ib)->executeFunctor(old, op);
79 }
80}
81
82/*---------------------------------------------------------------------------*/
83/*---------------------------------------------------------------------------*/
84
85} // namespace Arcane
86
87/*---------------------------------------------------------------------------*/
88/*---------------------------------------------------------------------------*/
Base class for 1D data vectors.
Interface of a functor with argument.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --