Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IDirectExecution.h
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/* IDirectExecution.h (C) 2000-2025 */
9/* */
10/* Interface of a direct execution service. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IDIRECTEXECUTION_H
13#define ARCANE_CORE_IDIRECTEXECUTION_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28class IMesh;
29class IParallelMng;
30
31/*---------------------------------------------------------------------------*/
32/*---------------------------------------------------------------------------*/
33
34/*!
35 * \brief Interface of a direct execution service.
36 *
37 * A direct execution service is a service that executes a single operation
38 * instead of a time loop, generally to perform internal tests within Arcane.
39 *
40 * Once the operation is finished, the code stops.
41 *
42 * This service can be associated with an application, and in this
43 * case it does not have a subdomain or a mesh, and the parallelism manager must be positioned
44 * before execution.
45 */
46class ARCANE_CORE_EXPORT IDirectExecution
47{
48 public:
49
50 virtual ~IDirectExecution() {} //!< Frees resources.
51
52 public:
53
54 virtual void build() = 0;
55
56 public:
57
58 //! Executes the service operation
59 virtual void execute() = 0;
60
61 //! True if the service is active
62 virtual bool isActive() const = 0;
63
64 /*!
65 * \internal.
66 * \brief Positions the associated parallelism manager.
67 * This method must be called before execute()
68 */
69 virtual void setParallelMng(IParallelMng* pm) = 0;
70};
71
72/*---------------------------------------------------------------------------*/
73/*---------------------------------------------------------------------------*/
74
75} // End namespace Arcane
76
77/*---------------------------------------------------------------------------*/
78/*---------------------------------------------------------------------------*/
79
80#endif
Declarations of Arcane's general types.
Interface of a direct execution service.
virtual bool isActive() const =0
True if the service is active.
virtual void execute()=0
Executes the service operation.
virtual ~IDirectExecution()
Frees resources.
Interface of the parallelism manager for a subdomain.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --