Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
ScalFMM
Commits
b1c9ed76
Commit
b1c9ed76
authored
Aug 21, 2012
by
BRAMAS Berenger
Browse files
Update the kernel to use dynamic memory for precomputed intermediate values
parent
4221e17f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Src/Kernels/Rotation/FRotationKernel.hpp
View file @
b1c9ed76
...
...
@@ -264,7 +264,15 @@ class FRotationKernel : public FAbstractKernels<ParticleClass,CellClass,Containe
// We will compute only a part of the since we compute the inclinaison
// angle. inclinaison(+/-x,+/-y,z) = inclinaison(+/-y,+/-x,z)
// we put the negative (-theta) with a negative x
FReal
dlmkMatrix
[
7
][
4
][
7
][
P
+
1
][
P2
+
1
][
P2
+
1
];
typedef
FReal
(
*
pMatrixDlmk
)
/*[P+1]*/
[
P2
+
1
][
P2
+
1
];
pMatrixDlmk
dlmkMatrix
[
7
][
4
][
7
];
// Allocate matrix
for
(
int
idxX
=
0
;
idxX
<
7
;
++
idxX
)
for
(
int
idxY
=
0
;
idxY
<
4
;
++
idxY
)
for
(
int
idxZ
=
0
;
idxZ
<
7
;
++
idxZ
)
{
dlmkMatrix
[
idxX
][
idxY
][
idxZ
]
=
new
FReal
[
P
+
1
][
P2
+
1
][
P2
+
1
];
}
// First we compute special vectors:
DlmkBuild0
(
dlmkMatrix
[
0
+
3
][
0
][
1
+
3
]);
// theta = 0
DlmkBuildPi
(
dlmkMatrix
[
0
+
3
][
0
][
-
1
+
3
]);
// theta = Pi
...
...
@@ -492,6 +500,12 @@ class FRotationKernel : public FAbstractKernels<ParticleClass,CellClass,Containe
}
}
}
// Deallocate matrix
for
(
int
idxX
=
0
;
idxX
<
7
;
++
idxX
)
for
(
int
idxY
=
0
;
idxY
<
4
;
++
idxY
)
for
(
int
idxZ
=
0
;
idxZ
<
7
;
++
idxZ
)
{
delete
[]
dlmkMatrix
[
idxX
][
idxY
][
idxZ
];
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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