FEAT
3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
component_invert_generic.hpp
1
// FEAT3: Finite Element Analysis Toolbox, Version 3
2
// Copyright (C) 2010 by Stefan Turek & the FEAT group
3
// FEAT3 is released under the GNU General Public License version 3,
4
// see the file 'copyright.txt' in the top level directory for details.
5
6
#pragma once
7
#ifndef KERNEL_LAFEM_ARCH_COMPONENT_INVERT_GENERIC_HPP
8
#define KERNEL_LAFEM_ARCH_COMPONENT_INVERT_GENERIC_HPP 1
9
10
#ifndef KERNEL_LAFEM_ARCH_COMPONENT_INVERT_HPP
11
#error "Do not include this implementation-only header file directly!"
12
#endif
13
14
namespace
FEAT
15
{
16
namespace
LAFEM
17
{
18
namespace
Arch
19
{
20
template
<
typename
DT_>
21
void
ComponentInvert::value_generic(DT_* r,
const
DT_*
const
x,
const
DT_ s,
const
Index
size)
22
{
23
if
(r == x)
24
{
25
FEAT_PRAGMA_OMP(parallel
for
)
26
for
(
Index
i = 0; i < size; ++i)
27
{
28
r[i] = s / r[i];
29
}
30
}
31
else
32
{
33
FEAT_PRAGMA_OMP(parallel
for
)
34
for
(
Index
i = 0; i < size; ++i)
35
{
36
r[i] = s / x[i];
37
}
38
}
39
}
40
}
// namespace Arch
41
}
// namespace LAFEM
42
}
// namespace FEAT
43
44
#endif
// KERNEL_LAFEM_ARCH_COMPONENT_INVERT_HPP
FEAT
FEAT namespace.
Definition:
adjactor.hpp:12
FEAT::Index
std::uint64_t Index
Index data type.
Definition:
base_header.hpp:122
kernel
lafem
arch
component_invert_generic.hpp
Generated by
1.9.5