| 1 |
// ------------------------------------------------------------------------ |
| 2 |
// |
| 3 |
// SPDX-License-Identifier: LGPL-2.1-or-later |
| 4 |
// Copyright (C) 2007 - 2020 by the deal.II authors |
| 5 |
// |
| 6 |
// This file is part of the deal.II library. |
| 7 |
// |
| 8 |
// Part of the source code is dual licensed under Apache-2.0 WITH |
| 9 |
// LLVM-exception OR LGPL-2.1-or-later. Detailed license information |
| 10 |
// governing the source code and code contributions can be found in |
| 11 |
// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II. |
| 12 |
// |
| 13 |
// ------------------------------------------------------------------------ |
| 14 |
|
| 15 |
#ifndef dealii_data_component_interpretation_h |
| 16 |
#define dealii_data_component_interpretation_h |
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
#include <deal.II/base/config.h> |
| 21 |
|
| 22 |
DEAL_II_NAMESPACE_OPEN |
| 23 |
|
| 24 |
/** |
| 25 |
* A namespace solely for the declaration of the |
| 26 |
* DataComponentInterpretation::DataComponentInterpretation enum. |
| 27 |
*/ |
| 28 |
namespace DataComponentInterpretation |
| 29 |
{ |
| 30 |
/** |
| 31 |
* The members of this enum are used to describe the logical interpretation |
| 32 |
* of what the various components of a vector-valued data set mean. For |
| 33 |
* example, if one has a finite element for the Stokes equations in 2d, |
| 34 |
* representing components $(u,v,p)$, one would like to indicate that the |
| 35 |
* first two, $u$ and $v$, represent a logical vector so that later on when |
| 36 |
* we generate graphical output we can hand them off to a visualization |
| 37 |
* program that will automatically know to render them as a vector field, |
| 38 |
* rather than as two separate and independent scalar fields. |
| 39 |
* |
| 40 |
* By passing a set of enums of the current kind to the |
| 41 |
* DataOut_DoFData::add_data_vector functions, this can be achieved. |
| 42 |
* |
| 43 |
* See the step-22 tutorial program for an example on how this information |
| 44 |
* can be used in practice. |
| 45 |
*/ |
| 46 |
enum DataComponentInterpretation |
| 47 |
{ |
| 48 |
/** |
| 49 |
* Indicates that a component of a data set corresponds to a scalar field |
| 50 |
* independent of the others. |
| 51 |
*/ |
| 52 |
component_is_scalar, |
| 53 |
|
| 54 |
/** |
| 55 |
* Indicates that a component of a data set is part of a vector-valued |
| 56 |
* quantity. |
| 57 |
*/ |
| 58 |
component_is_part_of_vector, |
| 59 |
|
| 60 |
/** |
| 61 |
* Indicates that a component of a data set is part of a tensor-valued |
| 62 |
* (2nd order) quantity. |
| 63 |
*/ |
| 64 |
component_is_part_of_tensor |
| 65 |
}; |
| 66 |
} // namespace DataComponentInterpretation |
| 67 |
|
| 68 |
|
| 69 |
DEAL_II_NAMESPACE_CLOSE |
| 70 |
|
| 71 |
#endif |