Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mavt-cse
Cubism
Commits
96614980
Commit
96614980
authored
Oct 24, 2018
by
fabianw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding spacing methods to BlockInfo.h (similar to pos)
parent
47a00442
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
source/BlockInfo.h
source/BlockInfo.h
+26
-0
No files found.
source/BlockInfo.h
View file @
96614980
...
...
@@ -67,6 +67,32 @@ struct BlockInfo
p
[
j
]
=
origin
[
j
]
+
delta
;
}
}
template
<
typename
T
>
inline
void
spacing
(
T
h
[
2
],
int
ix
,
int
iy
)
const
{
const
int
I
[
2
]
=
{
ix
,
iy
};
for
(
int
i
=
0
;
i
<
2
;
++
i
)
{
if
(
bUniform
[
i
])
h
[
i
]
=
uniform_grid_spacing
[
i
];
else
h
[
i
]
=
ptr_grid_spacing
[
i
][
I
[
i
]];
}
}
template
<
typename
T
>
inline
void
spacing
(
T
h
[
3
],
int
ix
,
int
iy
,
int
iz
)
const
{
const
int
I
[
3
]
=
{
ix
,
iy
,
iz
};
for
(
int
i
=
0
;
i
<
3
;
++
i
)
{
if
(
bUniform
[
i
])
h
[
i
]
=
uniform_grid_spacing
[
i
];
else
h
[
i
]
=
ptr_grid_spacing
[
i
][
I
[
i
]];
}
}
///////////////////////////////////////////////////////////////////////////////
BlockInfo
(
long
long
ID
,
const
int
idx
[
3
],
const
double
_pos
[
3
],
const
double
spacing
,
double
h_gridpoint_
,
void
*
ptr
=
NULL
,
const
bool
_special
=
false
)
:
...
...
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