Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
VTK
VTK
Commits
bd1e4bfd
Commit
bd1e4bfd
authored
Jul 17, 1995
by
Will Schroeder
Browse files
ENH: Code around singularity.
parent
0bdaaa2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/PtLoad.cc
View file @
bd1e4bfd
...
...
@@ -144,6 +144,22 @@ void vtkPointLoad::Execute()
x
=
this
->
Origin
[
0
]
+
k
*
this
->
AspectRatio
[
0
];
rho
=
sqrt
((
x
-
xP
[
0
])
*
(
x
-
xP
[
0
])
+
(
y
-
xP
[
1
])
*
(
y
-
xP
[
1
])
+
(
z
-
xP
[
2
])
*
(
z
-
xP
[
2
]));
if
(
rho
<
1.0e-10
)
{
vtkWarningMacro
(
<<
"Attempting to set singularity, resetting"
);
tensor
.
SetComponent
(
0
,
0
,
LARGE_FLOAT
);
tensor
.
SetComponent
(
1
,
1
,
LARGE_FLOAT
);
tensor
.
SetComponent
(
2
,
2
,
LARGE_FLOAT
);
tensor
.
SetComponent
(
0
,
1
,
0.0
);
tensor
.
SetComponent
(
0
,
2
,
0.0
);
tensor
.
SetComponent
(
1
,
0
,
0.0
);
tensor
.
SetComponent
(
1
,
2
,
0.0
);
tensor
.
SetComponent
(
2
,
0
,
0.0
);
tensor
.
SetComponent
(
2
,
1
,
0.0
);
newTensors
->
InsertNextTensor
(
tensor
);
continue
;
}
rho2
=
rho
*
rho
;
rho3
=
rho2
*
rho
;
rho5
=
rho2
*
rho3
;
...
...
Write
Preview
Supports
Markdown
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