Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
3rd
verdict
Commits
a5eb514c
Commit
a5eb514c
authored
3 years ago
by
Spiros Tsalikis
Committed by
Mark Richardson
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
v_vector: Delete because it's not used
parent
1411f0c9
master
julin/master
1.4.2
1.4.1
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+0
-1
CMakeLists.txt
v_vector.h
+0
-126
v_vector.h
verdict_defines.hpp
+0
-45
verdict_defines.hpp
with
0 additions
and
172 deletions
+0
-172
CMakeLists.txt
View file @
a5eb514c
...
...
@@ -35,7 +35,6 @@ set( verdict_SRCS
V_QuadMetric.cpp
V_TetMetric.cpp
V_TriMetric.cpp
v_vector.h
V_WedgeMetric.cpp
verdict.h
VerdictVector.cpp
...
...
This diff is collapsed.
Click to expand it.
v_vector.h
deleted
100644 → 0
View file @
1411f0c9
/*=========================================================================
Module: v_vector.h
Copyright 2003,2006,2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains certain rights in this software.
See LICENSE for details.
=========================================================================*/
/*
*
* v_vector.h contains simple vector operations
*
* This file is part of VERDICT
*
*/
// .SECTION Thanks
// Prior to its inclusion within VTK, this code was developed by the CUBIT
// project at Sandia National Laboratories.
#ifndef VERDICT_VECTOR
#define VERDICT_VECTOR
#include "verdict.h"
#include <math.h>
#include <assert.h>
namespace
VERDICT_NAMESPACE
{
// computes the dot product of 3d vectors
//double dot_product( double vec1[], double vec2[] );
// computes the cross product
//double *cross_product( double vec1[], double vec2[], double answer[] = 0);
// computes the interior angle between 2 vectors in degrees
//double interior_angle ( double vec1[], double vec2[] );
// computes the length of a vector
//double length ( double vec[] );
//double length_squared (double vec[] );
inline
double
dot_product
(
double
vec1
[],
double
vec2
[]
)
{
double
answer
=
vec1
[
0
]
*
vec2
[
0
]
+
vec1
[
1
]
*
vec2
[
1
]
+
vec1
[
2
]
*
vec2
[
2
];
return
answer
;
}
inline
void
normalize
(
double
vec
[]
)
{
double
x
=
sqrt
(
vec
[
0
]
*
vec
[
0
]
+
vec
[
1
]
*
vec
[
1
]
+
vec
[
2
]
*
vec
[
2
]
);
vec
[
0
]
/=
x
;
vec
[
1
]
/=
x
;
vec
[
2
]
/=
x
;
}
inline
double
*
cross_product
(
double
vec1
[],
double
vec2
[],
double
answer
[]
)
{
answer
[
0
]
=
vec1
[
1
]
*
vec2
[
2
]
-
vec1
[
2
]
*
vec2
[
1
];
answer
[
1
]
=
vec1
[
2
]
*
vec2
[
0
]
-
vec1
[
0
]
*
vec2
[
2
];
answer
[
2
]
=
vec1
[
0
]
*
vec2
[
1
]
-
vec1
[
1
]
*
vec2
[
0
];
return
answer
;
}
inline
double
length
(
double
vec
[]
)
{
return
(
sqrt
(
vec
[
0
]
*
vec
[
0
]
+
vec
[
1
]
*
vec
[
1
]
+
vec
[
2
]
*
vec
[
2
]
));
}
inline
double
length_squared
(
double
vec
[]
)
{
return
(
vec
[
0
]
*
vec
[
0
]
+
vec
[
1
]
*
vec
[
1
]
+
vec
[
2
]
*
vec
[
2
]
);
}
inline
double
interior_angle
(
double
vec1
[],
double
vec2
[]
)
{
double
len1
,
len2
,
cosAngle
=
0.0
,
angleRad
=
0.0
;
if
(
((
len1
=
length
(
vec1
))
>
0
)
&&
((
len2
=
length
(
vec2
))
>
0
)
)
{
cosAngle
=
dot_product
(
vec1
,
vec2
)
/
(
len1
*
len2
);
}
else
{
assert
(
len1
>
0
);
assert
(
len2
>
0
);
}
if
((
cosAngle
>
1.0
)
&&
(
cosAngle
<
1.0001
))
{
cosAngle
=
1.0
;
angleRad
=
acos
(
cosAngle
);
}
else
if
(
cosAngle
<
-
1.0
&&
cosAngle
>
-
1.0001
)
{
cosAngle
=
-
1.0
;
angleRad
=
acos
(
cosAngle
);
}
else
if
(
cosAngle
>=
-
1.0
&&
cosAngle
<=
1.0
)
angleRad
=
acos
(
cosAngle
);
else
{
assert
(
cosAngle
<
1.0001
&&
cosAngle
>
-
1.0001
);
}
return
(
(
angleRad
*
180.
)
/
VERDICT_PI
);
}
}
// namespace verdict
#endif
This diff is collapsed.
Click to expand it.
verdict_defines.hpp
View file @
a5eb514c
...
...
@@ -20,7 +20,6 @@
#ifndef VERDICT_DEFINES
#define VERDICT_DEFINES
#include "v_vector.h"
#include "VerdictVector.hpp"
#include <cmath>
...
...
@@ -132,50 +131,6 @@ inline void inverse(VerdictVector x1,
u3
/=
detx
;
}
/*
inline void form_T(double a1[3],
double a2[3],
double a3[3],
double w1[3],
double w2[3],
double w3[3],
double t1[3],
double t2[3],
double t3[3] )
{
double x1[3], x2[3], x3[3];
double ra1[3], ra2[3], ra3[3];
x1[0] = a1[0];
x1[1] = a2[0];
x1[2] = a3[0];
x2[0] = a1[1];
x2[1] = a2[1];
x2[2] = a3[1];
x3[0] = a1[2];
x3[1] = a2[2];
x3[2] = a3[2];
inverse(w1,w2,w3,x1,x2,x3);
t1[0] = dot_product(ra1, x1);
t1[1] = dot_product(ra1, x2);
t1[2] = dot_product(ra1, x3);
t2[0] = dot_product(ra2, x1);
t2[0] = dot_product(ra2, x2);
t2[0] = dot_product(ra2, x3);
t3[0] = dot_product(ra3, x1);
t3[0] = dot_product(ra3, x2);
t3[0] = dot_product(ra3, x3);
}
*/
inline
void
form_Q
(
const
VerdictVector
&
v1
,
const
VerdictVector
&
v2
,
const
VerdictVector
&
v3
,
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help