My Project
Loading...
Searching...
No Matches
VectorOps.hpp
1/*
2
3 Copyright 2024 Equinor ASA.
4
5 This file is part of the Open Porous Media project (OPM).
6
7 OPM is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 OPM is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with OPM. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#ifndef OPM_VECTOROPS_HPP
22#define OPM_VECTOROPS_HPP
23namespace Opm{
24
25template<typename T>
26void cross(const std::array<T,3>& x, const std::array<T,3>& y,
27 std::array<T,3>& z)
28{
29 z[0] = x[1]*y[2] - x[2]*y[1];
30 z[1] = x[2]*y[0] - x[0]*y[2];
31 z[2] = x[0]*y[1] - x[1]*y[0];
32}
33} // end namespace Opm
34#endif
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30