1 // Copyright (C) 2008-2011 Jakob Schiotz and Center for Individual
2 // Nanoparticle Functionality, Department of Physics, Technical
3 // University of Denmark.  Email: schiotz@fysik.dtu.dk
4 //
5 // This file is part of Asap version 3.
6 // Asap is released under the GNU Lesser Public License (LGPL) version 3.
7 // However, the parts of Asap distributed within the OpenKIM project
8 // (including this file) are also released under the Common Development
9 // and Distribution License (CDDL) version 1.0.
10 //
11 // This program is free software: you can redistribute it and/or
12 // modify it under the terms of the GNU Lesser General Public License
13 // version 3 as published by the Free Software Foundation.  Permission
14 // to use other versions of the GNU Lesser General Public License may
15 // granted by Jakob Schiotz or the head of department of the
16 // Department of Physics, Technical University of Denmark, as
17 // described in section 14 of the GNU General Public License.
18 //
19 // This program 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
22 // GNU General Public License for more details.
23 //
24 // You should have received a copy of the GNU General Public License
25 // and the GNU Lesser Public License along with this program.  If not,
26 // see <http://www.gnu.org/licenses/>.
27 
28 // -*- C++ -*-
29 // Asap:  Copyright (C) 2008 CINF/CAMD and Jakob Schiotz
30 
31 // Helper functions for 3x3 matrices defined as Vec[3].
32 
33 #include "Matrix3x3.h"
34 
35 namespace ASAPSPACE {
36 
matrixMultiply3x3(Vec product[3],const Vec a[3],const Vec b[3])37 void matrixMultiply3x3(Vec product[3], const Vec a[3], const Vec b[3])
38 {
39   product[0] = a[0][0] * b[0] + a[0][1] * b[1] + a[0][2] * b[2];
40   product[1] = a[1][0] * b[0] + a[1][1] * b[1] + a[1][2] * b[2];
41   product[2] = a[2][0] * b[0] + a[2][1] * b[1] + a[2][2] * b[2];
42 }
43 
44 }
45