Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
dcfa26a4
Commit
dcfa26a4
authored
13 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
tentative fix for some win machines
parent
70be8138
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Numeric/cartesian.h
+24
-24
24 additions, 24 deletions
Numeric/cartesian.h
with
24 additions
and
24 deletions
Numeric/cartesian.h
+
24
−
24
View file @
dcfa26a4
...
@@ -36,7 +36,7 @@ class cartesianBox {
...
@@ -36,7 +36,7 @@ class cartesianBox {
// number of subdivisions along the xi-, eta- and zeta-axis
// number of subdivisions along the xi-, eta- and zeta-axis
int
_Nxi
,
_Neta
,
_Nzeta
;
int
_Nxi
,
_Neta
,
_Nzeta
;
// origin of the grid and spacing along xi, eta and zeta
// origin of the grid and spacing along xi, eta and zeta
double
_X
,
_Y
,
_Z
,
_dxi
,
_deta
,
_dzeta
;
double
_X
0
,
_Y
0
,
_Z
0
,
_dxi
,
_deta
,
_dzeta
;
// xi-, eta- and zeta-axis directions
// xi-, eta- and zeta-axis directions
SVector3
_xiAxis
,
_etaAxis
,
_zetaAxis
;
SVector3
_xiAxis
,
_etaAxis
,
_zetaAxis
;
// set of active cells; the value stored for cell (i,j,k) is the
// set of active cells; the value stored for cell (i,j,k) is the
...
@@ -127,10 +127,10 @@ class cartesianBox {
...
@@ -127,10 +127,10 @@ class cartesianBox {
if
(
_childBox
)
_childBox
->
_printValues
(
f
);
if
(
_childBox
)
_childBox
->
_printValues
(
f
);
}
}
public
:
public
:
cartesianBox
(
double
X
,
double
Y
,
double
Z
,
cartesianBox
(
double
X
0
,
double
Y
0
,
double
Z
0
,
const
SVector3
&
dxi
,
const
SVector3
&
deta
,
const
SVector3
&
dzeta
,
const
SVector3
&
dxi
,
const
SVector3
&
deta
,
const
SVector3
&
dzeta
,
int
Nxi
,
int
Neta
,
int
Nzeta
,
int
level
=
1
)
int
Nxi
,
int
Neta
,
int
Nzeta
,
int
level
=
1
)
:
_X
(
X
),
_Y
(
Y
),
_Z
(
Z
),
:
_X
0
(
X
0
),
_Y
0
(
Y
0
),
_Z
0
(
Z
0
),
_dxi
(
norm
(
dxi
)),
_deta
(
norm
(
deta
)),
_dzeta
(
norm
(
dzeta
)),
_dxi
(
norm
(
dxi
)),
_deta
(
norm
(
deta
)),
_dzeta
(
norm
(
dzeta
)),
_xiAxis
(
dxi
),
_etaAxis
(
deta
),
_zetaAxis
(
dzeta
),
_xiAxis
(
dxi
),
_etaAxis
(
deta
),
_zetaAxis
(
dzeta
),
_Nxi
(
Nxi
),
_Neta
(
Neta
),
_Nzeta
(
Nzeta
),
_level
(
level
),
_childBox
(
0
)
_Nxi
(
Nxi
),
_Neta
(
Neta
),
_Nzeta
(
Nzeta
),
_level
(
level
),
_childBox
(
0
)
...
@@ -139,7 +139,7 @@ class cartesianBox {
...
@@ -139,7 +139,7 @@ class cartesianBox {
_etaAxis
.
normalize
();
_etaAxis
.
normalize
();
_zetaAxis
.
normalize
();
_zetaAxis
.
normalize
();
if
(
level
>
1
)
if
(
level
>
1
)
_childBox
=
new
cartesianBox
<
scalar
>
(
X
,
Y
,
Z
,
dxi
,
deta
,
dzeta
,
_childBox
=
new
cartesianBox
<
scalar
>
(
X
0
,
Y
0
,
Z
0
,
dxi
,
deta
,
dzeta
,
2
*
Nxi
,
2
*
Neta
,
2
*
Nzeta
,
2
*
Nxi
,
2
*
Neta
,
2
*
Nzeta
,
level
-
1
);
level
-
1
);
}
}
...
@@ -176,7 +176,7 @@ class cartesianBox {
...
@@ -176,7 +176,7 @@ class cartesianBox {
double
getValueContainingPoint
(
double
x
,
double
y
,
double
z
)
double
getValueContainingPoint
(
double
x
,
double
y
,
double
z
)
{
{
SVector3
DP
(
x
-
_X
,
y
-
_Y
,
z
-
_Z
);
SVector3
DP
(
x
-
_X
0
,
y
-
_Y
0
,
z
-
_Z
0
);
double
xa
=
dot
(
DP
,
_xiAxis
);
double
xa
=
dot
(
DP
,
_xiAxis
);
double
ya
=
dot
(
DP
,
_etaAxis
);
double
ya
=
dot
(
DP
,
_etaAxis
);
double
za
=
dot
(
DP
,
_zetaAxis
);
double
za
=
dot
(
DP
,
_zetaAxis
);
...
@@ -258,7 +258,7 @@ class cartesianBox {
...
@@ -258,7 +258,7 @@ class cartesianBox {
{
{
// P = P_0 + xi * _vdx + eta * _vdy + zeta *vdz
// P = P_0 + xi * _vdx + eta * _vdy + zeta *vdz
// DP = P-P_0 * _vdx = xi
// DP = P-P_0 * _vdx = xi
SVector3
DP
(
x
-
_X
,
y
-
_Y
,
z
-
_Z
);
SVector3
DP
(
x
-
_X
0
,
y
-
_Y
0
,
z
-
_Z
0
);
double
xi
=
dot
(
DP
,
_xiAxis
);
double
xi
=
dot
(
DP
,
_xiAxis
);
double
eta
=
dot
(
DP
,
_etaAxis
);
double
eta
=
dot
(
DP
,
_etaAxis
);
double
zeta
=
dot
(
DP
,
_zetaAxis
);
double
zeta
=
dot
(
DP
,
_zetaAxis
);
...
@@ -278,7 +278,7 @@ class cartesianBox {
...
@@ -278,7 +278,7 @@ class cartesianBox {
const
double
eta
=
j
*
_deta
/
_Neta
;
const
double
eta
=
j
*
_deta
/
_Neta
;
const
double
zeta
=
k
*
_dzeta
/
_Nzeta
;
const
double
zeta
=
k
*
_dzeta
/
_Nzeta
;
SVector3
D
=
xi
*
_xiAxis
+
eta
*
_etaAxis
+
zeta
*
_zetaAxis
;
SVector3
D
=
xi
*
_xiAxis
+
eta
*
_etaAxis
+
zeta
*
_zetaAxis
;
return
SPoint3
(
_X
+
D
.
x
(),
_Y
+
D
.
y
(),
_Z
+
D
.
z
());
return
SPoint3
(
_X
0
+
D
.
x
(),
_Y
0
+
D
.
y
(),
_Z
0
+
D
.
z
());
}
}
void
insertActiveCell
(
int
t
){
_activeCells
.
insert
(
t
);
}
void
insertActiveCell
(
int
t
){
_activeCells
.
insert
(
t
);
}
void
eraseActiveCell
(
int
t
){
_activeCells
.
erase
(
t
);
}
void
eraseActiveCell
(
int
t
){
_activeCells
.
erase
(
t
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment