|  | @@ -1,6 +1,7 @@
 | 
											
												
													
														|  |  package com.miniframe.solverconfig.hcfd;
 |  |  package com.miniframe.solverconfig.hcfd;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  import com.miniframe.constant.MFConstant;
 |  |  import com.miniframe.constant.MFConstant;
 | 
											
												
													
														|  | 
 |  | +import com.miniframe.core.exception.BusinessException;
 | 
											
												
													
														|  |  import com.miniframe.core.ext.UtilTools;
 |  |  import com.miniframe.core.ext.UtilTools;
 | 
											
												
													
														|  |  import com.miniframe.model.system.*;
 |  |  import com.miniframe.model.system.*;
 | 
											
												
													
														|  |  import com.miniframe.model.system.dao.SysFileMapper;
 |  |  import com.miniframe.model.system.dao.SysFileMapper;
 | 
											
										
											
												
													
														|  | @@ -13,12 +14,35 @@ import java.nio.file.Files;
 | 
											
												
													
														|  |  import java.nio.file.Path;
 |  |  import java.nio.file.Path;
 | 
											
												
													
														|  |  import java.nio.file.Paths;
 |  |  import java.nio.file.Paths;
 | 
											
												
													
														|  |  import java.nio.file.StandardCopyOption;
 |  |  import java.nio.file.StandardCopyOption;
 | 
											
												
													
														|  | 
 |  | +import java.util.*;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  /**
 |  |  /**
 | 
											
												
													
														|  |   * 对执行所需要的文件进行文件夹规整已满足求解
 |  |   * 对执行所需要的文件进行文件夹规整已满足求解
 | 
											
												
													
														|  |   */
 |  |   */
 | 
											
												
													
														|  |  public class HcfdPath {
 |  |  public class HcfdPath {
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +    public static List<Integer> hcfdTeps(String pid) throws  Exception{
 | 
											
												
													
														|  | 
 |  | +        String jobPath = XIFileUtils.getRootPathStr()+ MFConstant.separator+pid;
 | 
											
												
													
														|  | 
 |  | +        String exePath = jobPath+ MFConstant.separator+"hcfd";
 | 
											
												
													
														|  | 
 |  | +        String testPath = exePath+ MFConstant.separator+"test";
 | 
											
												
													
														|  | 
 |  | +        String exeOutPath = testPath+ MFConstant.separator+"data_out";
 | 
											
												
													
														|  | 
 |  | +        File exeOutDir = new File(exeOutPath);
 | 
											
												
													
														|  | 
 |  | +        if(!exeOutDir.exists()){
 | 
											
												
													
														|  | 
 |  | +            throw  new BusinessException("EB4000017");
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +        List<Integer> steps = new ArrayList<>();
 | 
											
												
													
														|  | 
 |  | +        File[] files =exeOutDir.listFiles();
 | 
											
												
													
														|  | 
 |  | +        for (File sonFile: files) {
 | 
											
												
													
														|  | 
 |  | +            if(sonFile.getName().indexOf("hcfd_tec_boundary_timestep")>0){
 | 
											
												
													
														|  | 
 |  | +                String stip=sonFile.getName().replace("hcfd_tec_boundary_timestep","").replace(".dat","");
 | 
											
												
													
														|  | 
 |  | +                steps.add(Integer.valueOf(stip));
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +        Collections.sort(steps);
 | 
											
												
													
														|  | 
 |  | +        return steps;
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |      public static  void hcfdCreatPath(AdiModeling modeling,
 |  |      public static  void hcfdCreatPath(AdiModeling modeling,
 | 
											
												
													
														|  |                                        AdiSolverConfig config,
 |  |                                        AdiSolverConfig config,
 | 
											
												
													
														|  |                                        AdiSolverJob job ) throws IOException {
 |  |                                        AdiSolverJob job ) throws IOException {
 | 
											
										
											
												
													
														|  | @@ -63,4 +87,9 @@ public class HcfdPath {
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +    public static void main(String[] args) {
 | 
											
												
													
														|  | 
 |  | +        String stip="hcfd_tec_boundary_timestep100.dat".replace("hcfd_tec_boundary_timestep","").replace(".dat","");
 | 
											
												
													
														|  | 
 |  | +        System.out.println(stip);
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  }
 |  |  }
 |