# directory where everything lives
path = ./data/tooth/

###############################################################################
# input to objToGmsh
# DONE
###############################################################################
obj filename = tooth.obj
msh filename = tooth.msh

# normalized version of the OBJ that will also be output, just so we have
# a mesh to match the *.msh file to
normalized obj = tooth.obj.normalized.obj

# padding used on the unit cube when normalizing the size of the input OBJ
padding = 0.125

###############################################################################
# input to sdfGen
# DONE
###############################################################################

# should use "normalized obj"
# should use "distance field"
distance field = tooth.obj.normalized.distance.field3D
res = 97

###############################################################################
# input to BEM solver (tutorial_dirichlet)
###############################################################################

# should use "msh filename"
# should use "res"
potential field = tooth.potential.field3d 

###############################################################################
# input to poissonDisk
# DONE
###############################################################################

# should use "normalized obj"
poisson output = points.ply

# how many samples should we generate?
#poisson samples = 1000000
poisson samples = 100000

###############################################################################
# input to sourceSimulationPlacer3D
# DONE
###############################################################################

# should use "distance field"
# should use "potential field", but it calls it "color field"
# should use "poisson disk"

#relative error threshold = 0.03
#source simulation filename = sourceSim_0.03.o3d

#relative error threshold = 0.02
#source simulation filename = sourceSim_0.02.o3d

relative error threshold = 0.04
source simulation filename = sourceSim_0.04.o3d

#relative error threshold = 0.1
#source simulation filename = sourceSim_0.1.o3d

potential offset = 5

###############################################################################
# input to rootOptimizerTAO3D
###############################################################################

# the model *will* be re-centered to the origin, so all roots will  get += (-0.5, -0.5, -0.5).
# what radius to then make the fractal?
fractal radius = 4

# should use "source simulation filename"
#max TAO iterations = 1000
max TAO iterations = 100000
optimization res = 25

# what to multiply all the powers by initially?

# this one is reliable...
#initial bulk scalar amplitude = 50

# seems to do the best job
#initial bulk scalar amplitude = 2000 

# bombs early, so fine for debugging
#initial bulk scalar amplitude = 2125

# 29% match after scalar pass
initial bulk scalar amplitude = 3000

# better than 3000 after the scalar pass, but converges much slower
#initial bulk scalar amplitude = 4000

# ears are sparse at 100 iterations
#initial bulk scalar amplitude = 2500

# 50 res dies right away, 97 appears to as well
#initial bulk scalar amplitude = 3500

# where is the final output filename?
#optimization output filename = sourceSim_0.04.optimized.o3d
optimization output filename = sourceSim_0.04.optimized.o3d_res_97.o3d
#optimization output filename = dummy.o3d

###############################################################################
# input to reweightedOptimizerTao3D
###############################################################################
# should use "optimization output filename"

max reweighted TAO iterations = 100000

# output of reweighted optimization
reweighted output = sourceSim_0.04.reweighted.o3d
#reweighted output = dummy.o3d

###############################################################################
# override previous values if we're doing another pass on an existing 
# optimization result
###############################################################################

#max reoptimization TAO iterations = 100000
#reoptimization res = 97
#reoptimization input filename = sourceSim_0.04.reweighted.o3d
#reoptimization output filename = sourceSim_0.04.optimized.97.o3d
