~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to intern/smoke/intern/LU_HELPER.h

  • Committer: Bazaar Package Importer
  • Author(s): Kevin Roy
  • Date: 2011-02-08 22:20:54 UTC
  • mfrom: (1.4.2 upstream)
  • mto: (14.2.6 sid) (1.5.1)
  • mto: This revision was merged to the branch mainline in revision 27.
  • Revision ID: james.westby@ubuntu.com-20110208222054-kk0gwa4bu8h5lyq4
Tags: upstream-2.56.1-beta-svn34076
ImportĀ upstreamĀ versionĀ 2.56.1-beta-svn34076

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//////////////////////////////////////////////////////////////////////
 
2
// This file is part of Wavelet Turbulence.
 
3
// 
 
4
// Wavelet Turbulence is free software: you can redistribute it and/or modify
 
5
// it under the terms of the GNU General Public License as published by
 
6
// the Free Software Foundation, either version 3 of the License, or
 
7
// (at your option) any later version.
 
8
// 
 
9
// Wavelet Turbulence is distributed in the hope that it will be useful,
 
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
// GNU General Public License for more details.
 
13
// 
 
14
// You should have received a copy of the GNU General Public License
 
15
// along with Wavelet Turbulence.  If not, see <http://www.gnu.org/licenses/>.
 
16
// 
 
17
// Copyright 2008 Theodore Kim and Nils Thuerey
 
18
// 
 
19
//////////////////////////////////////////////////////////////////////
 
20
// Modified to not require TNT matrix library anymore. It was very slow
 
21
// when being run in parallel. Required TNT JAMA:LU libraries were
 
22
// converted into independent functions.
 
23
//              - MiikaH
 
24
//////////////////////////////////////////////////////////////////////
 
25
 
 
26
#ifndef LU_HELPER_H
 
27
#define LU_HELPER_H
 
28
 
 
29
#include <cmath>
 
30
#include <algorithm>
 
31
 
 
32
using namespace std;
 
33
 
 
34
//////////////////////////////////////////////////////////////////////
 
35
// Helper function, compute eigenvalues of 3x3 matrix
 
36
//////////////////////////////////////////////////////////////////////
 
37
 
 
38
struct sLU
 
39
{
 
40
        float values[3][3];
 
41
        int pivsign;
 
42
        int piv[3];
 
43
};
 
44
 
 
45
 
 
46
int isNonsingular (sLU LU_);
 
47
sLU computeLU( float a[3][3]);
 
48
void solveLU3x3(sLU& A, float x[3], float b[3]);
 
49
 
 
50
 
 
51
#endif