Skip to content

Commit 6220781

Browse files
committed
enable Double64 for mpr, change nepsType and tol_rel for mpr
1 parent 308aa5a commit 6220781

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Basics/constantsAndFunctions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Epsilon and sign
1010
const neps = sqrt( eps() )
1111

12-
nepsType(::Type{T}) where {T} = sqrt( eps(T) ) # mpr and bounding box calculation use this
12+
nepsType(::Type{T}) where {T} = 100.0 * eps(T) # mpr and bounding box calculation use this
1313

1414
function sign_eps(value::T) where {T}
1515
seps::T = 100.0*nepsType(T)

src/Composition/scene.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ mutable struct Scene <: Modia3D.AbstractScene
421421
function Scene(;gravityField = UniformGravityField(),
422422
useOptimizedStructure = true,
423423
enableContactDetection = true,
424-
mpr_tol_rel = 1.0e-7,
424+
mpr_tol_rel = 1.0e-20,
425425
elasticContactReductionFactor = 1.0,
426426
gap = 0.001,
427427
enableVisualization = true,

src/Modia3D.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ convertAndStripUnit(TargetType, requiredUnit, value) =
9696
convert(TargetType, ustrip.( uconvert.(requiredUnit, value))) : convert(TargetType, value)
9797

9898
# MPRFloatType is used to change betweeen Double64 and Float64 for mpr calculations
99-
# using DoubleFloats
100-
const MPRFloatType = Float64
99+
using DoubleFloats
100+
const MPRFloatType = Double64
101101

102102
# Include sub-modules
103103
include(joinpath("Frames" , "_module.jl"))

0 commit comments

Comments
 (0)