Step 2: determining the pressure/density correction

In the second step the pressure is determined for liquids and the density for gases. For liquids this involves the solution of a regular system of equations, the LHS of which has been LU-decomposed. This can be performed in a parallel way if the user has activated the multithreading option for the linear equation solver, e.g. the option -DUSE_MT for SPOOLES in the Makefile and specified the number of cpus by means of the environment variable NUM_CPU_SOLVE. For gases a lumped system is solved leading to the density correction. In both cases the corrections are stored on a nodal basis in resultsp.f (in field v(4,*)). Finally, for fluids the pressure boundary conditions are applied in routine applybounp.f. For gases this has to wait till later, since the gas pressure is not known at this point.