Define a problem using a TPD file
masterA ToPy Problem Definition (TPD) file is a simple text file containing keywords that define the optimization constraints, grid, and parameters. The file must have the .tpd extension.
To use a TPD file in Python, load it into a Topology instance using load_tpd_file().
Minimal required parameters include:
PROB_TYPE: Problem type (e.g.,compfor compliance/stiffness).PROB_NAME: Name of the problem.ETA: Parameter value.DOF_PN: Degrees of freedom.VOL_FRAC: Volume fraction.FILT_RAD: Filter radius.P_FAC: Power factor.ELEM_K: Element type (e.g.,Q4).NUM_ELEM_X,NUM_ELEM_Y,NUM_ELEM_Z: Grid dimensions.NUM_ITER: Number of iterations.FXTR_NODE_X,FXTR_NODE_Y: Fixation node coordinates.LOAD_NODE_Y: Load node coordinate.LOAD_VALU_Y: Load value.
from topy import Topology
topology = Topology()
topology.load_tpd_file('file.tpd')