G+S
mo
24.08.0
Geometry + Simulation Modules
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
gsALMHelper.h
1
14
#pragma once
15
16
#include <typeinfo>
17
18
using namespace
gismo;
19
20
// Miscelaneous functions
22
template
<
class
T>
23
index_t
sign(T val)
24
{
25
return
(T(0) < val) - (val < T(0));
26
}
27
29
template
<
class
T>
30
index_t
countNegatives(
gsVector<T>
vec)
31
{
32
index_t
count = 0;
33
index_t
N = vec.cols();
34
index_t
M = vec.rows();
35
for
(
index_t
i = 0; i < M; i++)
36
for
(
index_t
j = 0; j < N; j++)
37
{
38
if
( vec(i,j) < 0 )
39
count += 1;
40
}
41
return
count;
42
}
index_t
#define index_t
Definition:
gsConfig.h:32
gismo::gsVector< T >
gismo
optional
gsStructuralAnalysis
src
gsALMSolvers
gsALMHelper.h
Generated on Mon Nov 4 2024 15:56:23 for G+Smo by Doxygen v1.8.5