Documentation 6b54b78464
Loading...
Searching...
No Matches
task_definition.inl
Go to the documentation of this file.
1/*!
2 * \file task_definition.inl
3 * \brief In-Line subroutines of the <i>task_definition.hpp</i> file.
4 * \author E. van der Weide, T. Economon
5 * \version 8.5.0 "Harrier"
6 *
7 * SU2 Project Website: https://su2code.github.io
8 *
9 * The SU2 Project is maintained by the SU2 Foundation
10 * (http://su2foundation.org)
11 *
12 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
13 *
14 * SU2 is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; either
17 * version 2.1 of the License, or (at your option) any later version.
18 *
19 * SU2 is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
26 */
27
28#pragma once
29
31 task = NO_TASK;
32 timeLevel = 0;
34 for(int i=0; i<5; ++i) indMustBeCompleted[i] = -1;
35
36 intPointADER = 0;
38}
39
41 unsigned short val_timeLevel,
42 int val_ind0MustBeCompleted,
43 int val_ind1MustBeCompleted,
44 int val_ind2MustBeCompleted,
45 int val_ind3MustBeCompleted,
46 int val_ind4MustBeCompleted) {
47
48 /* Copy the data from the arguments. */
49 task = val_task;
50 timeLevel = val_timeLevel;
51 indMustBeCompleted[0] = val_ind0MustBeCompleted;
52 indMustBeCompleted[1] = val_ind1MustBeCompleted;
53 indMustBeCompleted[2] = val_ind2MustBeCompleted;
54 indMustBeCompleted[3] = val_ind3MustBeCompleted;
55 indMustBeCompleted[4] = val_ind4MustBeCompleted;
56
57 /* Make sure that the -1 values are numbered last. */
58 sort(indMustBeCompleted, indMustBeCompleted+5, greater<int>());
59
60 /* Determine the actual number of tasks that must be completed. */
63 }
64
65 /* Initialize the other member variables to their default values. */
66 intPointADER = 0;
68}
69
71
72inline CTaskDefinition::CTaskDefinition(const CTaskDefinition &other){Copy(other);}
73
74inline CTaskDefinition& CTaskDefinition::operator=(const CTaskDefinition &other){Copy(other); return (*this);}
75
76inline void CTaskDefinition::Copy(const CTaskDefinition &other) {
77 task = other.task;
78 timeLevel = other.timeLevel;
82
83 for(int i=0; i<5; ++i)
85}
Class for defining a task to be carried out.
Definition task_definition.hpp:42
~CTaskDefinition(void)
Destructor of the class.
Definition task_definition.inl:70
CTaskDefinition & operator=(const CTaskDefinition &other)
Assignment operator.
Definition task_definition.inl:74
unsigned short intPointADER
Time integration point for ADER, if relevant for the task.
Definition task_definition.hpp:76
SOLVER_TASK task
Task to be carried out.
Definition task_definition.hpp:74
SOLVER_TASK
Enumerated type, which defines the tasks to be carried out.
Definition task_definition.hpp:49
@ NO_TASK
Default value used for checking.
Definition task_definition.hpp:50
unsigned short timeLevel
Time level of the task to be carried out.
Definition task_definition.hpp:75
bool secondPartTimeIntADER
Whether or not this is the second part of the time interval for elements adjacent to a lower time lev...
Definition task_definition.hpp:77
int indMustBeCompleted[5]
Indices in the list of tasks that must be completed before this task can be carried out.
Definition task_definition.hpp:80
CTaskDefinition(void)
Constructor of the class.
Definition task_definition.inl:30
unsigned short nIndMustBeCompleted
Number of relevant indices in indMustBeCompleted.
Definition task_definition.hpp:79