Nowadays, it is widely recognized that computer simulation plays a crucial role in designing oil filters used in the automotive industry. However, even a single direct simulation of the flow usually requires significant computational resources. Thus, it is obvious that solution of optimization problems is only feasible using parallel computers and algorithms.In this paper, we present a general master-slave parallel template, which was specially designed for the easy integration of direct parallel solvers into a parallel optimization tool. We show how an already existing direct solver for the 3D simulation of flow through the oil filter is integrated into our template to obtain a parallel optimization solver. Some capabilities and performance of this solver are demonstrated by solving geometry optimization problem of a filter element.