Arcane  4.2.1.0
Developer documentation
Loading...
Searching...
No Matches
MathReal2x2.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/* MathReal2x2.h (C) 2000-2026 */
9/* */
10/* Mathematical operations on Real2x2. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCCORE_BASE_MATHREAL2X2_H
13#define ARCCORE_BASE_MATHREAL2X2_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arccore/base/Real2x2.h"
18#include "arccore/base/MathReal2.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane::math
24{
36constexpr ARCCORE_HOST_DEVICE bool isNearlyZero(const Real2x2& v)
37{
38 return math::isNearlyZero(v.x) && math::isNearlyZero(v.y);
39}
40
41/*---------------------------------------------------------------------------*/
42/*---------------------------------------------------------------------------*/
43
44} // namespace Arcane::math
45
46/*---------------------------------------------------------------------------*/
47/*---------------------------------------------------------------------------*/
48
49namespace Arcane
50{
51
52/*---------------------------------------------------------------------------*/
53/*---------------------------------------------------------------------------*/
54
55inline constexpr ARCCORE_HOST_DEVICE bool Real2x2::
56isNearlyZero() const
57{
58 return math::isNearlyZero(*this);
59}
60
61/*---------------------------------------------------------------------------*/
62/*---------------------------------------------------------------------------*/
63
64} // namespace Arcane
65
66/*---------------------------------------------------------------------------*/
67/*---------------------------------------------------------------------------*/
68
69#endif
Class managing a 2x2 matrix of reals.
constexpr __host__ __device__ bool isNearlyZero() const
Compares the matrix with the zero matrix.
Definition MathReal2x2.h:56
Namespace for mathematical functions.
Definition MathUtils.h:36
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --