huangxingxing 1 рік тому
батько
коміт
f03bb4017a

+ 10 - 11
src/main/java/com/miniframe/bisiness/system/D00008Service.java

@@ -1,21 +1,20 @@
 package com.miniframe.bisiness.system;
 
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.Map;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
 import com.miniframe.core.ExecProcessFlow;
 import com.miniframe.core.ext.UtilTools;
 import com.miniframe.generate.business.system.model.D00008BaseModel;
+import com.miniframe.service.impl.FileServiceImpl;
 import com.miniframe.template.TemplateGenerator;
 import com.miniframe.websocket.WebsocketEndPoint;
 import lombok.SneakyThrows;
 
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+
 /**
  * 基础系统,“灾情演练”逻辑处理(重新生成不覆盖)。
  */
@@ -46,7 +45,7 @@ public class D00008Service extends D00008BaseModel implements ExecProcessFlow {
 	//异步执行
 	@SneakyThrows
 	public void exeWater(Integer aid) throws Exception{
-		WebsocketEndPoint webs= UtilTools.getBean(WebsocketEndPoint.class);
+		WebsocketEndPoint webs =  (WebsocketEndPoint) UtilTools.getBean("websocketEndPoint");
 		CompletableFuture<Void> cf = CompletableFuture.supplyAsync(()->{
 			try {
 				Runtime runtime = Runtime.getRuntime();
@@ -71,7 +70,7 @@ public class D00008Service extends D00008BaseModel implements ExecProcessFlow {
 	//异步执行
 	@SneakyThrows
 	public void exeFire(Integer aid) throws Exception{
-		WebsocketEndPoint webs= UtilTools.getBean(WebsocketEndPoint.class);
+		WebsocketEndPoint webs =  (WebsocketEndPoint) UtilTools.getBean("websocketEndPoint");
 		CompletableFuture<Void> cf = CompletableFuture.supplyAsync(()->{
 			try {
 			Runtime runtime = Runtime.getRuntime();

+ 0 - 3
src/main/java/com/miniframe/service/mq/XIMQDynamic.java

@@ -1,15 +1,12 @@
 package com.miniframe.service.mq;
 
-import com.miniframe.core.ext.UtilTools;
 import com.miniframe.spring.mq.AbstractMFMqDynamic;
 import com.miniframe.spring.mq.IMFMqOp;
 import com.miniframe.spring.mq.MFMqConfig;
 import com.miniframe.spring.mq.MFMqInfo;
 import com.miniframe.spring.mq.MFMqListenerInfo;
-import com.miniframe.websocket.WebsocketEndPoint;
 import com.rabbitmq.client.Channel;
 import org.springframework.amqp.core.AcknowledgeMode;
-import org.springframework.amqp.support.converter.MessageConverter;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
 import org.springframework.stereotype.Component;
 

+ 0 - 53
src/main/java/com/miniframe/solverconfig/fem/FEMElement.java

@@ -1,53 +0,0 @@
-package com.miniframe.solverconfig.fem;
-
-import io.netty.util.internal.StringUtil;
-
-/**
- * FEM 元素
- */
-public class FEMElement {
-    private String key;
-    private String order;
-    private String value;
-
-    public FEMElement() {
-        super();
-    }
-
-    public FEMElement(String key, String order, String value) {
-        this.key = key;
-        this.order = order;
-        this.value = value;
-    }
-
-    public String getKey() {
-        return key;
-    }
-
-    public void setKey(String key) {
-        this.key = key;
-    }
-
-    public String getOrder() {
-        return order;
-    }
-
-    public void setOrder(String order) {
-        this.order = order;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    public String showAnalysisStr() {
-        if(!StringUtil.isNullOrEmpty(this.value)){
-            return "\""+key+"\" "+"\""+order+"\" "+"\""+value+"\"";
-        }
-        return null;
-    }
-}

+ 0 - 76
src/main/java/com/miniframe/solverconfig/fem/FEMOrder.java

@@ -1,76 +0,0 @@
-package com.miniframe.solverconfig.fem;
-
-import com.miniframe.core.exception.BusinessException;
-import com.miniframe.core.ext.UtilTools;
-import com.miniframe.model.system.AdiModeling;
-import com.miniframe.model.system.AdiSolverConfig;
-import com.miniframe.model.system.SysFile;
-import com.miniframe.model.system.dao.AdiSolverConfigMapper;
-import com.miniframe.model.system.dao.SysFileMapper;
-import com.miniframe.tools.CaeFileUtils;
-import com.miniframe.tools.XIFileUtils;
-import com.miniframe.tools.XiJsonUtil;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.List;
-
-public class FEMOrder {
-    /**
-     * 配置文件重新生成
-     * @param
-     */
-    public static void CreateAnalysisFile(AdiModeling modeling, AdiSolverConfig config) throws Exception {
-        FEMParam param= XiJsonUtil.jsonToPojo(config.getParameterObj(), FEMParam.class);
-        String  nmlFileId =config.getNmlFile();
-        String nmlFilePath;
-        if(nmlFileId==null||nmlFileId.equals("")) {
-            /**
-             * 创建一个新的配置文件
-             */
-            nmlFilePath = CaeFileUtils.createBigFilePath("fem_analysis.in");
-            nmlFileId= UtilTools.getUUid();
-            CaeFileUtils.saveFile(nmlFileId, nmlFilePath, config.getUid(), "in", "");
-            AdiSolverConfigMapper configDao = UtilTools.getBean(AdiSolverConfigMapper.class);
-            config.setNmlFile(nmlFileId);
-            configDao.updateByPrimaryKey(config);
-
-        }else{
-            SysFileMapper sysFileDAO = UtilTools.getBean(SysFileMapper.class);
-            SysFile nmlFile =  sysFileDAO.selectByPrimaryKey(nmlFileId);
-            if(nmlFile == null){
-                throw new BusinessException("EB4000001");
-            }
-            nmlFilePath = XIFileUtils.getRootPathStr()+"/"+nmlFile.getFilepath();
-        }
-        FileWriter fw =null;
-        try {
-
-            File analysisfile = new File(nmlFilePath);
-            if (analysisfile.exists()) {
-                analysisfile.delete();
-            }
-            analysisfile.createNewFile();
-            fw = new FileWriter(analysisfile,true);
-            List<String> analysislist =param.showAnalysisWindow();
-            for (String analysis: analysislist){
-                fw.write(analysis);
-                fw.write("\r\n");
-            }
-            fw.close();
-        }catch (Exception o){
-            o.printStackTrace();
-        }finally {
-            if (fw != null) {
-                try {
-                    fw.close();
-                } catch (IOException e1) {
-                    throw  e1;
-                }
-            }
-        }
-    }
-
-
-}

+ 0 - 400
src/main/java/com/miniframe/solverconfig/fem/FEMParam.java

@@ -1,400 +0,0 @@
-package com.miniframe.solverconfig.fem;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.miniframe.solverconfig.SolverParam;
-import com.miniframe.tools.XiJsonUtil;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class FEMParam  implements SolverParam {
-
-    /**
-     * 上传文件名称
-     * "mesh_inp "3" "2.2_flat_dynamicResponse-transient.bdf"
-     */
-    private FEMElement mesh_inp =new FEMElement("mesh_inp","3","fem.bdf");
-
-    /**
-     * Static(静态)
-     * "static "3" "false"/"static "3" "true"
-     */
-    private FEMElement f_static =new FEMElement("static","3","false");
-
-    /**
-     * Stiffness Matrix Output(刚度矩阵输出)
-     * "dump_stiff "1" "true"/“dump_stiff "1" "false"
-     */
-    private FEMElement dump_stiff =new FEMElement("dump_stiff","1","false");
-
-    /**
-     * Mass Matrix Output(质量矩阵输出)
-     * "dump_mass" "1" "true"/"dump_mass“ "1" "false"
-     */
-    private FEMElement dump_mass =new FEMElement("dump_mass","1","true");
-
-
-    /**
-     * Node Strains Output(节点压力输出)
-     * "strain_o "1" "true"/"strain_o "1" "false"
-     */
-    private FEMElement strain_o =new FEMElement("strain_o","1","false");
-
-    /**
-     * Modes(模式)
-     * "eigenv" "3" "true"
-     */
-    private FEMElement eigenv =new FEMElement("eigenv","3","false");
-
-    /**
-     * Num of Eigenvalue(特征值)5
-     * "num_eigv" "1" "5"
-     */
-    private FEMElement num_eigv =new FEMElement("num_eigv","1",null);
-
-    /**
-     * Method(方法)
-     * Inverse iteration(逆迭代)		"eigv_method "1" "1"
-     * Lanczos(兰索斯)		"eigv_method "1" "2"
-     */
-    private FEMElement eigv_method =new FEMElement("eigv_method","1",null);
-
-    /**
-     * Mass Coupled(质量耦合)
-     * "coupled "1" "1"/"coupled" "1" "0"
-     */
-    private FEMElement coupled =new FEMElement("coupled","1","0");
-
-    /**
-     * C=αM+βK
-     * 	α		alphad "2" "12"
-     * 	β		betad "2" "0.00001"
-     */
-    private FEMElement alphad =new FEMElement("alphad","2","0.0");
-    /**
-     * C=αM+βK
-     * 	α		alphad "2" "12"
-     * 	β		betad "2" "0.00001"
-     */
-    private FEMElement betad =new FEMElement("betad","2","0.00001");
-
-    /**
-     * Method(方法)
-     * 	HHT		transient "1" "3"
-     * 	Newmark(纽马克)		transient "1" "2"
-     * 	    δn	gam_newmark "2" "0.5"
-     * 	    αn	bet_newmark "2" "0.25"
-     *  Direct(直接)	    transient "1" "1"
-     */
-    private FEMElement f_transient =new FEMElement("transient","1","1");
-    /**
-     * Method(方法)
-     * 	HHT		transient "1" "3"
-     * 	Newmark(纽马克)		transient "1" "2"
-     * 	    δn	gam_newmark "2" "0.5"
-     * 	    αn	bet_newmark "2" "0.25"
-     *  Direct(直接)	    transient "1" "1"
-     */
-    private FEMElement gam_newmark =new FEMElement("gam_newmark","2",null);
-    /**
-     * Method(方法)
-     * 	HHT		transient "1" "3"
-     * 	Newmark(纽马克)		transient "1" "2"
-     * 	    δn	gam_newmark "2" "0.5"
-     * 	    αn	bet_newmark "2" "0.25"
-     *  Direct(直接)	    transient "1" "1"
-     */
-    private FEMElement bet_newmark =new FEMElement("bet_newmark","2",null);
-
-    /**
-     * Step Control(步控制)
-     * 	Case Num(案例数)		"SID" "1" "1"
-     */
-    private FEMElement sid =new FEMElement("SID","1","1");
-
-    /**
-     * 	Total Time Steps(总时间的步骤)	num_steps "1" "2"
-     */
-    private FEMElement num_steps =new FEMElement("num_steps","1","1");
-
-    /**
-     * 	Time Step(sencond)(时间步)		dt_str "2" "0.25"
-     */
-    private FEMElement dt_str =new FEMElement("dt_str","2","0.0");
-
-    /**
-     * 	Output Interval(输出时间间隔)		freq "1" "3"
-     */
-    private FEMElement freq =new FEMElement("freq","1","1");
-    /**
-     * 	Output Format (输出格式)
-     * 		1	sort "1" "1"
-     * 	    2	sort "1" "2"
-     */
-    private FEMElement sort =new FEMElement("sort","1","1");
-
-    /**
-     * 	Nonlinear(非线性)
-     * 		"nlgeom" "1" "0"/"nlgeom" "1" "1"
-     */
-    private FEMElement nlgeom =new FEMElement("nlgeom","1","0");
-
-    /**
-     * Solver(解算器)
-     * 	MUMPS Direct Solver(MUMPS 直接解算器)				solver "1" "0"
-     * 	PCG Iterative Solver(PCG迭代解算器)				solver "1" "1"
-     * 	LDL Direct Solver(LDL 直接解算器)				    solver "1" "2"
-     */
-    private FEMElement solver =new FEMElement("solver","1","2");
-
-    /**
-     * Result FileName(结果文件名)
-     * 	result_file "3" "2.2_flat_dynamicResponse-transient"
-     */
-    private FEMElement result_file =new FEMElement("result_file","3","fem");
-
-    /**
-     * 添加瞬态 true/false  用于页面判断 不进入求解配置
-     * @return
-     */
-    private FEMElement dynamic=new FEMElement("dynamic","3","true");
-
-    public FEMElement getDynamic() {
-        return dynamic;
-    }
-
-    public void setDynamic(FEMElement dynamic) {
-        this.dynamic = dynamic;
-    }
-
-    public FEMElement getMesh_inp() {
-        return mesh_inp;
-    }
-
-    public void setMesh_inp(FEMElement mesh_inp) {
-        this.mesh_inp = mesh_inp;
-    }
-
-    public FEMElement getF_static() {
-        return f_static;
-    }
-
-    public void setF_static(FEMElement f_static) {
-        this.f_static = f_static;
-    }
-
-    public FEMElement getDump_stiff() {
-        return dump_stiff;
-    }
-
-    public void setDump_stiff(FEMElement dump_stiff) {
-        this.dump_stiff = dump_stiff;
-    }
-
-    public FEMElement getDump_mass() {
-        return dump_mass;
-    }
-
-    public void setDump_mass(FEMElement dump_mass) {
-        this.dump_mass = dump_mass;
-    }
-
-    public FEMElement getStrain_o() {
-        return strain_o;
-    }
-
-    public void setStrain_o(FEMElement strain_o) {
-        this.strain_o = strain_o;
-    }
-
-    public FEMElement getEigenv() {
-        return eigenv;
-    }
-
-    public void setEigenv(FEMElement eigenv) {
-        this.eigenv = eigenv;
-    }
-
-    public FEMElement getNum_eigv() {
-        return num_eigv;
-    }
-
-    public void setNum_eigv(FEMElement num_eigv) {
-        this.num_eigv = num_eigv;
-    }
-
-    public FEMElement getEigv_method() {
-        return eigv_method;
-    }
-
-    public void setEigv_method(FEMElement eigv_method) {
-        this.eigv_method = eigv_method;
-    }
-
-    public FEMElement getCoupled() {
-        return coupled;
-    }
-
-    public void setCoupled(FEMElement coupled) {
-        this.coupled = coupled;
-    }
-
-    public FEMElement getAlphad() {
-        return alphad;
-    }
-
-    public void setAlphad(FEMElement alphad) {
-        this.alphad = alphad;
-    }
-
-    public FEMElement getBetad() {
-        return betad;
-    }
-
-    public void setBetad(FEMElement betad) {
-        this.betad = betad;
-    }
-
-    public FEMElement getF_transient() {
-        return f_transient;
-    }
-
-    public void setF_transient(FEMElement f_transient) {
-        this.f_transient = f_transient;
-    }
-
-    public FEMElement getGam_newmark() {
-        return gam_newmark;
-    }
-
-    public void setGam_newmark(FEMElement gam_newmark) {
-        this.gam_newmark = gam_newmark;
-    }
-
-    public FEMElement getBet_newmark() {
-        return bet_newmark;
-    }
-
-    public void setBet_newmark(FEMElement bet_newmark) {
-        this.bet_newmark = bet_newmark;
-    }
-
-    public FEMElement getSid() {
-        return sid;
-    }
-
-    public void setSID(FEMElement sid) {
-        this.sid = sid;
-    }
-
-    public FEMElement getNum_steps() {
-        return num_steps;
-    }
-
-    public void setNum_steps(FEMElement num_steps) {
-        this.num_steps = num_steps;
-    }
-
-    public FEMElement getDt_str() {
-        return dt_str;
-    }
-
-    public void setDt_str(FEMElement dt_str) {
-        this.dt_str = dt_str;
-    }
-
-    public FEMElement getFreq() {
-        return freq;
-    }
-
-    public void setFreq(FEMElement freq) {
-        this.freq = freq;
-    }
-
-    public FEMElement getSort() {
-        return sort;
-    }
-
-    public void setSort(FEMElement sort) {
-        this.sort = sort;
-    }
-
-    public FEMElement getNlgeom() {
-        return nlgeom;
-    }
-
-    public void setNlgeom(FEMElement nlgeom) {
-        this.nlgeom = nlgeom;
-    }
-
-    public FEMElement getSolver() {
-        return solver;
-    }
-
-    public void setSolver(FEMElement solver) {
-        this.solver = solver;
-    }
-
-    public FEMElement getResult_file() {
-        return result_file;
-    }
-
-    public void setResult_file(FEMElement result_file) {
-        this.result_file = result_file;
-    }
-
-    public List<String> showAnalysisWindow() {
-        List<String> analysisList=new ArrayList<>();
-        if(this.alphad.showAnalysisStr()!=null)
-            analysisList.add(this.alphad.showAnalysisStr());
-        if(this.bet_newmark.showAnalysisStr()!=null)
-            analysisList.add(this.bet_newmark.showAnalysisStr());
-        if(this.betad.showAnalysisStr()!=null)
-            analysisList.add(this.betad.showAnalysisStr());
-        if(this.coupled.showAnalysisStr()!=null)
-            analysisList.add(this.coupled.showAnalysisStr());
-        if(this.dt_str.showAnalysisStr()!=null)
-            analysisList.add(this.dt_str.showAnalysisStr());
-        if(this.dump_mass.showAnalysisStr()!=null)
-            analysisList.add(this.dump_mass.showAnalysisStr());
-        if(this.dump_stiff.showAnalysisStr()!=null)
-            analysisList.add(this.dump_stiff.showAnalysisStr());
-        if(this.eigenv.showAnalysisStr()!=null)
-            analysisList.add(this.eigenv.showAnalysisStr());
-        if(this.eigv_method.showAnalysisStr()!=null)
-            analysisList.add(this.eigv_method.showAnalysisStr());
-        if(this.f_static.showAnalysisStr()!=null)
-            analysisList.add(this.f_static.showAnalysisStr());
-        if(this.f_transient.showAnalysisStr()!=null)
-            analysisList.add(this.f_transient.showAnalysisStr());
-        if(this.freq.showAnalysisStr()!=null)
-            analysisList.add(this.freq.showAnalysisStr());
-        if(this.gam_newmark.showAnalysisStr()!=null)
-            analysisList.add(this.gam_newmark.showAnalysisStr());
-        if(this.mesh_inp.showAnalysisStr()!=null)
-            analysisList.add(this.mesh_inp.showAnalysisStr());
-        if(this.nlgeom.showAnalysisStr()!=null)
-            analysisList.add(this.nlgeom.showAnalysisStr());
-        if(this.num_eigv.showAnalysisStr()!=null)
-            analysisList.add(this.num_eigv.showAnalysisStr());
-        if(this.num_steps.showAnalysisStr()!=null)
-            analysisList.add(this.num_steps.showAnalysisStr());
-        if(this.result_file.showAnalysisStr()!=null)
-            analysisList.add(this.result_file.showAnalysisStr());
-        if(this.sid.showAnalysisStr()!=null)
-            analysisList.add(this.sid.showAnalysisStr());
-        if(this.solver.showAnalysisStr()!=null)
-            analysisList.add(this.solver.showAnalysisStr());
-        if(this.sort.showAnalysisStr()!=null)
-            analysisList.add(this.sort.showAnalysisStr());
-        if(this.strain_o.showAnalysisStr()!=null)
-            analysisList.add(this.strain_o.showAnalysisStr());
-       return analysisList;
-    }
-
-    @Override
-    public String paramJson() throws JsonProcessingException {
-        String t = XiJsonUtil.objectToJson(this);
-        return t;
-    }
-}

+ 0 - 116
src/main/java/com/miniframe/solverconfig/fem/FEMPath.java

@@ -1,116 +0,0 @@
-package com.miniframe.solverconfig.fem;
-
-import com.miniframe.constant.MFConstant;
-import com.miniframe.core.exception.BusinessException;
-import com.miniframe.core.ext.UtilTools;
-import com.miniframe.model.system.AdiModeling;
-import com.miniframe.model.system.AdiSolverConfig;
-import com.miniframe.model.system.AdiSolverJob;
-import com.miniframe.model.system.SysFile;
-import com.miniframe.model.system.dao.SysFileMapper;
-import com.miniframe.tools.XIFileUtils;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.nio.file.StandardCopyOption;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * 对执行所需要的文件进行文件夹规整已满足求解
- */
-public class FEMPath {
-
-    /**
-     *
-     * @param pid
-     * @param step  步数
-     * @return
-     */
-    public static List<File> getStepFiles(String pid , String step) throws BusinessException {
-        String jobPath = XIFileUtils.getRootPathStr()+ MFConstant.separator+pid;
-        String exePath = jobPath+ MFConstant.separator+"fem";
-        String exeOutPath = exePath+ MFConstant.separator+"data_out";
-        File exeOutDir = new File(exeOutPath);
-        if(!exeOutDir.exists()){
-            throw  new BusinessException("EB4000017");
-        }
-        List<File> fileList =new ArrayList<>();
-        File[] files =exeOutDir.listFiles();
-        for (File sonFile: files) {
-            if(sonFile.getName().indexOf("dynamicResponse-transient"+step+".vtk")>-1){
-                fileList.add(sonFile);
-            }
-        }
-        return  fileList;
-    }
-
-    public static List<Integer> femTeps(String pid) throws  BusinessException{
-        String jobPath = XIFileUtils.getRootPathStr()+ MFConstant.separator+pid;
-        String exePath = jobPath+ MFConstant.separator+"fem";
-        String exeOutPath = exePath+ 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(!"dynamicResponse-transient.vtk".equals(sonFile.getName())
-                    &&sonFile.getName().indexOf("dynamicResponse-transient")>-1){
-                String stip=sonFile.getName().replace("dynamicResponse-transient","").replace(".vtk","");
-                steps.add(Integer.valueOf(stip));
-            }
-        }
-        Collections.sort(steps);
-        return steps;
-    }
-
-    public static  void femCreatePath(AdiModeling modeling,
-                                      AdiSolverConfig config,
-                                      AdiSolverJob job ) throws IOException {
-        String jobPath = XIFileUtils.getRootPathStr()+ MFConstant.separator+job.getPid();
-        System.out.println(jobPath);
-        String exePath = jobPath+ MFConstant.separator+"fem";
-        String exeInPath = exePath+ MFConstant.separator+"data_in";
-        File exeInDir = new File(exeInPath);
-        if(!exeInDir.exists()){
-            exeInDir.mkdirs();
-        }
-        String exeOutPath = exePath+ MFConstant.separator+"data_out";
-        File exeOutDir = new File(exeOutPath);
-        if(!exeOutDir.exists()){
-            exeOutDir.mkdirs();
-        }
-        SysFileMapper fileMapper = UtilTools.getBean(SysFileMapper.class);
-        SysFile nmlFile= fileMapper.selectByPrimaryKey(config.getNmlFile());
-        fileMove(nmlFile,exePath+MFConstant.separator+"fem_analysis.in");
-//        SysFile mapbcFile= fileMapper.selectByPrimaryKey(config.getMapbcFile());
-//        fileMove(mapbcFile,exeInPath+MFConstant.separator+"fem.bdf");
-        SysFile grid= fileMapper.selectByPrimaryKey(modeling.getFemGridFile());
-        fileMove(grid,exeInPath+MFConstant.separator+"fem.bdf");
-    }
-
-    /**
-     * 文件移动
-     * @param file
-     * @param pathStr
-     * @throws IOException
-     */
-    public static void fileMove(SysFile file ,String pathStr) throws IOException {
-        Path path = Paths.get(pathStr);
-        SysFileMapper fileMapper = UtilTools.getBean(SysFileMapper.class);
-        Files.move(Paths.get( XIFileUtils.getRootPathStr()+ MFConstant.separator+file.getFilepath()),
-                path, StandardCopyOption.REPLACE_EXISTING);
-        String fielRelativePath = XIFileUtils.getRelativizePathStr(path);
-        file.setFilepath(fielRelativePath);
-        file.setFilename(path.getFileName().toString());
-        fileMapper.updateByPrimaryKey(file);
-    }
-
-
-}

+ 0 - 808
src/main/java/com/miniframe/solverconfig/fem/VTK.java

@@ -1,808 +0,0 @@
-package com.miniframe.solverconfig.fem;
-
-import com.miniframe.constant.MFConstant;
-
-import java.io.*;
-import java.lang.reflect.Array;
-import java.util.ArrayList;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class VTK {
-
-
-    public static String CreateVTKFile(File dbfFile,String uuid) {
-        if(!dbfFile.exists()){
-            return "";
-        }
-        File vtkFile =new File(dbfFile.getParent()+ MFConstant.separator+uuid+".vtk");
-        InputStreamReader reader = null;
-        FileInputStream bdfInputSteam=null;
-        BufferedReader bfreader=null;
-        FileWriter writer = null;
-
-        if(vtkFile.exists()){
-            vtkFile.delete();
-        }
-        try {
-            vtkFile.createNewFile();
-            ArrayList<ArrayList<Integer>> cells = new ArrayList<>();
-            ArrayList<Integer> cellTypes = new ArrayList<>();
-            ArrayList<ArrayList<Float>> points = new ArrayList<>();
-
-            bdfInputSteam=new FileInputStream(dbfFile);
-            reader=new InputStreamReader(bdfInputSteam,"UTF-8");
-            bfreader=new BufferedReader(reader);
-            String patCQUAD = "^CQUAD.*";
-//            String patGRID = "^GRID.*";
-            String line;
-            Integer nele =0;
-            Integer neln =0;
-            /**
-             * 最小grid
-             */
-            Integer minGIndex =1;
-
-
-            while((line=bfreader.readLine())!=null) {//包含该行内容的字符串,不包含任何行终止符,如果已到达流末尾,则返回 null
-
-                /**
-                 * CROD     1       1       1       2
-                 */
-                 if(line.indexOf("CROD")>-1){
-                    ArrayList<Integer> tmp=patInts(line);
-                    ArrayList<Integer> cellst =new ArrayList<>();
-
-                    cellst.add(tmp.get(2)-1);
-                    cellst.add(tmp.get(3)-1);
-                    cells.add(cellst);
-                    cellTypes.add(3);
-
-                    nele=nele+1;
-                    neln=neln+1+2;
-                    continue;
-                }
-                else if(line.indexOf("CBAR")>-1){
-                    ArrayList<Integer> tmp=patInts(line);
-                    ArrayList<Integer> cellst =new ArrayList<>();
-                    cellst.add(tmp.get(2)-1);
-                    cellst.add(tmp.get(3)-1);
-                    cells.add(cellst);
-                    cellTypes.add(3);
-
-                    nele=nele+1;
-                    neln=neln+1+2;
-                    continue;
-                }
-                //单元数据
-                // CQUAD4   1       1       6       7       16      15
-                // 第1列表示单元类型代号;
-                // 第2列表示单元编号;
-                // 第3列表示单元对应的材料编号(转vtk不需要此列);
-                // 第4列表示单元第1个节点的编号;
-                // 第5列表示单元第2个节点的编号;
-                // 第6列表示单元第3个节点的编号;
-                // 第7列表示单元第4个节点的编号
-                else if(line.indexOf("CQUAD4")>-1){
-                    ArrayList<Integer> tmp=patInts(line);
-                    ArrayList<Integer> cellst =new ArrayList<>();
-                    cellst.add(tmp.get(2)-1);
-                    cellst.add(tmp.get(3)-1);
-                    cellst.add(tmp.get(4)-1);
-                    cellst.add(tmp.get(5)-1);
-                    cells.add(cellst);
-                    cellTypes.add(9);
-                    nele=nele+1;
-                    neln=neln+1+4;
-                    continue;
-                }
-                // CQUAD4   1       1       6       7       16      15       16      15
-                // *        12      12
-                else if(line.indexOf("CQUAD8")>-1){
-                    ArrayList<Integer> cellst =new ArrayList<>();
-                    ArrayList<Integer> tmp=patInts(line);
-                    String line2=bfreader.readLine();
-                    ArrayList<Integer> tmp2=patInts(line2);
-                    cellst.add(tmp.get(2)-1);
-                    cellst.add(tmp.get(3)-1);
-                    cellst.add(tmp.get(4)-1);
-                    cellst.add(tmp.get(5)-1);
-                    cellst.add(tmp.get(6)-1);
-                    cellst.add(tmp.get(7)-1);
-                    cellst.add(tmp2.get(0)-1);
-                    cellst.add(tmp2.get(1)-1);
-                    cells.add(cellst);
-                    cellTypes.add(23);
-                    nele=nele+1;
-                    neln=neln+1+8;
-                    continue;
-                }
-                //CTRIA3   21      1       31      5       6       0.      0.
-                else if(line.indexOf("CTRIA3")>-1){
-                    ArrayList<Integer> cellst =new ArrayList<>();
-                    ArrayList<Integer> tmp=patInts(line);
-                    cellst.add(tmp.get(2)-1);
-                    cellst.add(tmp.get(3)-1);
-                    cellst.add(tmp.get(4)-1);
-                    cells.add(cellst);
-                    cellTypes.add(5);
-                    nele=nele+1;
-                    neln=neln+1+3;
-                    continue;
-                }
-                //CTRIA6   21      1       31      5       6       3      4      2
-                else if(line.indexOf("CTRIA3")>-1){
-                    ArrayList<Integer> cellst =new ArrayList<>();
-                    ArrayList<Integer> tmp=patInts(line);
-
-                    cellst.add(tmp.get(2)-1);
-                    cellst.add(tmp.get(3)-1);
-                    cellst.add(tmp.get(4)-1);
-                    cellst.add(tmp.get(5)-1);
-                    cellst.add(tmp.get(6)-1);
-                    cellst.add(tmp.get(7)-1);
-
-
-                    cells.add(cellst);
-                    cellTypes.add(22);
-                    nele=nele+1;
-                    neln=neln+1+6;
-                    continue;
-                }
-                //第一种
-                //CPENTA   1       1       1       2       8       29      30      36
-
-                //第二种
-                //CPENTA   1       1       1       2       8       29      30      36
-                //         1       1       1       2       8       29      30      36
-                //         1
-                else if(line.indexOf("CPENTA")>-1){
-                     bfreader.mark(2000);
-                     String cpentatype=null;
-                     if(line.indexOf("CPENTA")>-1){
-                        String line2= bfreader.readLine();
-                        String sbtmp =line2.substring(0,8);
-                         if("".equals(sbtmp.trim())){
-                             cpentatype="two";
-                         }else{
-                             cpentatype="one";
-                         }
-                     }
-                     bfreader.reset();
-                    if(cpentatype.equals("one")){
-                        ArrayList<Integer> cellst =new ArrayList<>();
-                        ArrayList<Integer> tmp=patInts(line);
-                        cellst.add(tmp.get(2)-1);
-                        cellst.add(tmp.get(3)-1);
-                        cellst.add(tmp.get(4)-1);
-                        cellst.add(tmp.get(5)-1);
-                        cellst.add(tmp.get(6)-1);
-                        cellst.add(tmp.get(7)-1);
-                        cells.add(cellst);
-                        cellTypes.add(13);
-                        nele=nele+1;
-                        neln=neln+1+6;
-                    }else {
-                        ArrayList<Integer> cellst =new ArrayList<>();
-                        ArrayList<Integer> tmp=patInts(line);
-                        cellst.add(tmp.get(2)-1);
-                        cellst.add(tmp.get(3)-1);
-                        cellst.add(tmp.get(4)-1);
-                        cellst.add(tmp.get(5)-1);
-                        cellst.add(tmp.get(6)-1);
-                        cellst.add(tmp.get(7)-1);
-                        String line2=bfreader.readLine();
-                        ArrayList<Integer> tmp2=patInts(line2);
-                        cellst.add(tmp2.get(0)-1);
-                        cellst.add(tmp2.get(1)-1);
-                        cellst.add(tmp2.get(2)-1);
-                        cellst.add(tmp2.get(3)-1);
-                        cellst.add(tmp2.get(4)-1);
-                        cellst.add(tmp2.get(5)-1);
-                        cellst.add(tmp2.get(6)-1);
-                        cellst.add(tmp2.get(7)-1);
-                        String line3=bfreader.readLine();
-                        ArrayList<Integer> tmp3=patInts(line2);
-                        cellst.add(tmp3.get(0)-1);
-                        cells.add(cellst);
-                        cellTypes.add(26);
-                        nele=nele+1;
-                        neln=neln+1+15;
-                    }
-                    continue;
-                }
-                //第一种
-                //CHEXA    320     1       163     164     173     172     244     245
-                //         254     253
-                //第二种
-                //CHEXA    320     1       163     164     173     172     244     245
-                //         254     253     163     164     173     172     244     245
-                //         254     253     163     164     173
-                else if(line.indexOf("CHEXA")>-1){
-                     bfreader.mark(2000);
-                     String chexatype=null;
-                     if(line.indexOf("CHEXA")>-1){
-                         String line2= bfreader.readLine();
-                         ArrayList<Integer> tmp=patInts(line2);
-                         if(tmp.size()>3){
-                             chexatype="two";
-                         }else{
-                             chexatype="one";
-                         }
-                     }
-                     bfreader.reset();
-                    if("one".equals(chexatype)){
-                        ArrayList<Integer> cellst =new ArrayList<>();
-                        ArrayList<Integer> tmp=patInts(line);
-                        cellst.add(tmp.get(2)-1);
-                        cellst.add(tmp.get(3)-1);
-                        cellst.add(tmp.get(4)-1);
-                        cellst.add(tmp.get(5)-1);
-                        cellst.add(tmp.get(6)-1);
-                        cellst.add(tmp.get(7)-1);
-                        String line2=bfreader.readLine();
-                        ArrayList<Integer> tmp2=patInts(line2);
-                        cellst.add(tmp2.get(0)-1);
-                        cellst.add(tmp2.get(1)-1);
-                        cells.add(cellst);
-                        cellTypes.add(12);
-                        nele=nele+1;
-                        neln=neln+1+8;
-                    }else{
-                        ArrayList<Integer> cellst =new ArrayList<>();
-                        ArrayList<Integer> tmp=patInts(line);
-                        cellst.add(tmp.get(2)-1);
-                        cellst.add(tmp.get(3)-1);
-                        cellst.add(tmp.get(4)-1);
-                        cellst.add(tmp.get(5)-1);
-                        cellst.add(tmp.get(6)-1);
-                        cellst.add(tmp.get(7)-1);
-                        String line2=bfreader.readLine();
-                        ArrayList<Integer> tmp2=patInts(line2);
-                        cellst.add(tmp2.get(0)-1);
-                        cellst.add(tmp2.get(1)-1);
-                        cellst.add(tmp2.get(2)-1);
-                        cellst.add(tmp2.get(3)-1);
-                        cellst.add(tmp2.get(4)-1);
-                        cellst.add(tmp2.get(5)-1);
-                        cellst.add(tmp2.get(6)-1);
-                        cellst.add(tmp2.get(7)-1);
-                        String line3=bfreader.readLine();
-                        ArrayList<Integer> tmp3=patInts(line3);
-                        cellst.add(tmp3.get(2)-1);
-                        cellst.add(tmp3.get(3)-1);
-                        cellst.add(tmp3.get(4)-1);
-                        cellst.add(tmp3.get(0)-1);
-                        cellst.add(tmp3.get(1)-1);
-                        cells.add(cellst);
-                        cellTypes.add(25);
-                        nele=nele+1;
-                        neln=neln+1+20;
-                    }
-
-                    continue;
-                }
-                //第一种
-                //CTETRA   1       1       1       2       8       29
-                //第二种
-                //CTETRA   320     1       163     164     173     172     244     245
-                //         254     253     163     164
-                else if(line.indexOf("CTETRA")>-1){
-
-                     bfreader.mark(2000);
-                     String ctetratype=null;
-                     if(line.indexOf("CTETRA")>-1){
-                        String line2= bfreader.readLine();
-                         String sbtmp =line2.substring(0,8);
-                         if("".equals(sbtmp.trim())){
-                             ctetratype="two";
-                         }else{
-                             ctetratype="one";
-                         }
-
-                     }
-                     bfreader.reset();
-                    if("one".equals(ctetratype)){
-                        ArrayList<Integer> cellst =new ArrayList<>();
-                        ArrayList<Integer> tmp=patInts(line);
-                        cellst.add(tmp.get(2)-1);
-                        cellst.add(tmp.get(3)-1);
-                        cellst.add(tmp.get(4)-1);
-                        cellst.add(tmp.get(5)-1);
-                        cells.add(cellst);
-                        cellTypes.add(10);
-                        nele=nele+1;
-                        neln=neln+1+4;
-                    }else{
-                        ArrayList<Integer> cellst =new ArrayList<>();
-                        ArrayList<Integer> tmp=patInts(line);
-                        cellst.add(tmp.get(2)-1);
-                        cellst.add(tmp.get(3)-1);
-                        cellst.add(tmp.get(4)-1);
-                        cellst.add(tmp.get(5)-1);
-                        cellst.add(tmp.get(6)-1);
-                        cellst.add(tmp.get(7)-1);
-                        String line2=bfreader.readLine();
-                        ArrayList<Integer> tmp2=patInts(line2);
-                        cellst.add(tmp2.get(0)-1);
-                        cellst.add(tmp2.get(1)-1);
-                        cellst.add(tmp2.get(2)-1);
-                        cellst.add(tmp2.get(3)-1);
-                        cells.add(cellst);
-                        cellTypes.add(24);
-                        nele=nele+1;
-                        neln=neln+1+10;
-                    }
-
-                    continue;
-                }
-
-                //CONM2    5       21             2500.
-                else if(line.indexOf("CONM2")>-1){
-                    ArrayList<Integer> cellst =new ArrayList<>();
-                    ArrayList<Integer> tmp=patInts(line);
-                    cellst.add(tmp.get(1)-1);
-                    cells.add(cellst);
-                    cellTypes.add(1);
-                    nele=nele+1;
-                    neln=neln+1+1;
-                    continue;
-                }
-
-                else if(line.indexOf("TSTEP")>-1||
-                        line.indexOf("TSTEPNL")>-1  ){
-
-                    continue;
-                }
-                //CBEAM   1       1       1       2
-                else  if(line.indexOf("CBEAM")>-1){
-                    ArrayList<Integer> cellst =new ArrayList<>();
-                    ArrayList<Integer> tmp=patInts(line);
-                    cellst.add(tmp.get(2)-1);
-                    cellst.add(tmp.get(3)-1);
-                    cells.add(cellst);
-                    cellTypes.add(3);
-                    nele=nele+1;
-                    neln=neln+1+2;
-                    continue;
-                }
-                //CBEAM3   1       1       1       2       2
-                else if(line.indexOf("CBEAM3")>-1){
-                    ArrayList<Integer> cellst =new ArrayList<>();
-                    ArrayList<Integer> tmp=patInts(line);
-                    cellst.add(tmp.get(2)-1);
-                    cellst.add(tmp.get(3)-1);
-                    cellst.add(tmp.get(4)-1);
-
-                    cells.add(cellst);
-                    cellTypes.add(21);
-                    nele=nele+1;
-                    neln=neln+1+3;
-                    continue;
-                }
-                //CONROD   1       1       1
-                else if(line.indexOf("CONROD")>-1){
-                    ArrayList<Integer> cellst =new ArrayList<>();
-                    ArrayList<Integer> tmp=patInts(line);
-                    cellst.add(tmp.get(1)-1);
-                    cellst.add(tmp.get(2)-1);
-                    cells.add(cellst);
-                    cellTypes.add(3);
-                    nele=nele+1;
-                    neln=neln+1+2;
-                    continue;
-                }
-                //CTUBE   1       1       1       1
-                else  if(line.indexOf("CONROD")>-1){
-                    ArrayList<Integer> cellst =new ArrayList<>();
-                    ArrayList<Integer> tmp=patInts(line);
-                    cellst.add(tmp.get(2)-1);
-                    cellst.add(tmp.get(3)-1);
-                    cells.add(cellst);
-                    cellTypes.add(3);
-                    nele=nele+1;
-                    neln=neln+1+2;
-                    continue;
-                }
-                //CSHEAR   1       1       1       1       1       1
-                else   if(line.indexOf("CONROD")>-1){
-                    ArrayList<Integer> cellst =new ArrayList<>();
-                    ArrayList<Integer> tmp=patInts(line);
-                    cellst.add(tmp.get(2)-1);
-                    cellst.add(tmp.get(3)-1);
-                    cellst.add(tmp.get(4)-1);
-                    cellst.add(tmp.get(5)-1);
-                    cells.add(cellst);
-                    cellTypes.add(9);
-                    nele=nele+1;
-                    neln=neln+1+4;
-                    continue;
-                }
-                //第一种
-                //CELAS1   2       3       4
-                //第二种
-                //CELAS1   2       3       4       5       6
-                else  if(line.indexOf("CELAS1")>-1
-                        ||line.indexOf("CELAS2")>-1
-                        ||line.indexOf("CDAMP1")>-1
-                        ||line.indexOf("CDAMP2")>-1
-                        ||line.indexOf("CMASS1")>-1
-                        ||line.indexOf("CMASS2")>-1
-                ){
-                    ArrayList<Integer> cellst =new ArrayList<>();
-                    ArrayList<Integer> tmp=patInts(line);
-                    if(tmp.size()>4){
-                        cellst.add(tmp.get(2)-1);
-                        cellst.add(tmp.get(4)-1);
-                        cells.add(cellst);
-                        cellTypes.add(3);
-                        nele=nele+1;
-                        neln=neln+1+2;
-                    }else{
-                        cellst.add(tmp.get(2)-1);
-                        cells.add(cellst);
-                        cellTypes.add(1);
-
-                        nele=nele+1;
-                        neln=neln+1+1;
-                    }
-                }
-                //第一种
-                //CTRIAX6   2       3       4               6               8
-                //第二种
-                //CTRIAX6   2       3       4       5       6       7       8       9
-                else  if(line.indexOf("CTRIAX6")>-1){
-                    ArrayList<Integer> cellst =new ArrayList<>();
-                    ArrayList<Integer> tmp=patInts(line);
-                    if(tmp.size()<=6){
-                        cellst.add(tmp.get(2)-1);
-                        cellst.add(tmp.get(3)-1);
-                        cellst.add(tmp.get(4)-1);
-
-
-                        cells.add(cellst);
-                        cellTypes.add(5);
-                        nele=nele+1;
-                        neln=neln+1+3;
-                    }else{
-                        cellst.add(tmp.get(2)-1);
-                        cellst.add(tmp.get(4)-1);
-                        cellst.add(tmp.get(6)-1);
-
-                        cellst.add(tmp.get(3)-1);
-                        cellst.add(tmp.get(5)-1);
-                        cellst.add(tmp.get(7)-1);
-                        cells.add(cellst);
-                        cellTypes.add(22);
-                        nele=nele+1;
-                        neln=neln+1+6;
-                    }
-                }
-                //第一种
-                //CBUSH   2       3       4
-                //第二种
-                //CBUSH   2       3       4       5
-                else   if(line.indexOf("CBUSH")>-1){
-                    ArrayList<Integer> cellst =new ArrayList<>();
-                    ArrayList<Integer> tmp=patInts(line);
-                    if(tmp.size()<=3){
-
-                        cellst.add(tmp.get(2)-1);
-                        cells.add(cellst);
-                        cellTypes.add(1);
-                        nele=nele+1;
-                        neln=neln+1+1;
-                    }else{
-                        cellst.add(tmp.get(2)-1);
-                        cellst.add(tmp.get(3)-1);
-                        cells.add(cellst);
-                        cellTypes.add(3);
-                        nele=nele+1;
-                        neln=neln+1+2;
-                    }
-                }
-                else  if(line.indexOf("EIGRL")>-1){
-
-                }
-                else if(line.indexOf("SOL 153")>-1){
-
-                }
-                else if(line.indexOf("SOL 159")>-1){
-
-                }
-                //节点数据
-//                GRID     175            .25     .75      0.
-//                GRID*    176                            -2.98023-8      .75
-//                        *        0.
-                // 第1列表示节点代号;
-                // 第2列表示节点编号;
-                // 第3列表示节点的X坐标;
-                // 第4列表示节点的Y坐标;
-                // 第5列表示节点的Z坐标;
-                else if(line.indexOf("GRID*")>-1){
-
-                    ArrayList<Float> pointst =new ArrayList<>();
-                    ArrayList<Float> tmp=patFloats2(line);
-                    String line2=bfreader.readLine();
-                    ArrayList<Float> tmp2=patFloats2(line2);
-
-                    pointst.add(tmp.get(1));
-                    pointst.add(tmp.get(2));
-                    pointst.add(tmp2.get(0));
-                    pointst.add(tmp.get(0));//代号
-                    points.add(pointst);
-
-                }
-                else if(line.indexOf("GRID")>-1){
-                    ArrayList<Float> pointst =new ArrayList<>();
-                    ArrayList<Float> tmp=patFloats(line);
-
-                    pointst.add(tmp.get(1));
-                    pointst.add(tmp.get(2));
-                    pointst.add(tmp.get(3));
-                    pointst.add(tmp.get(0));//代号
-                    points.add(pointst);
-                }
-
-
-            }
-            writer=new FileWriter(vtkFile,true);
-            writer.write("# vtk DataFile Version 1.0");
-            writer.write("\r\n");//换行
-            writer.write("Unstructured vtk Grid");
-            writer.write("\r\n");//换行
-            writer.write("ASCII");
-            writer.write("\r\n");//换行
-            writer.write("\r\n");//换行
-            writer.write("DATASET UNSTRUCTURED_GRID");
-            writer.write("\r\n");//换行
-            writer.write("POINTS");
-            writer.write(blanks(1));
-            writer.write(fixedString(9,String.valueOf(points.size())));
-            writer.write(blanks(1));
-            writer.write("float");
-            writer.write("\r\n");//换行
-
-            for (ArrayList<Float> point:points) {
-                for (int i = 0; i <point.size()-1 ; i++) {
-                    writer.write(blanks(5));
-                    writer.write(fixedFloat(point.get(i)));
-                }
-                writer.write("\r\n");//换行
-            }
-            writer.write("\r\n");//换行
-
-            writer.write("CELLS");
-            writer.write(blanks(1));
-            writer.write(fixedString(9,nele.toString()));
-            writer.write(blanks(1));
-            writer.write(fixedString(9,neln.toString()));
-            writer.write("\r\n");//换行
-
-            for (ArrayList<Integer> cell:cells) {
-                writer.write(fixedString(8,String.valueOf(cell.size())));
-                writer.write(blanks(2));
-                for (int i = 0; i <cell.size() ; i++) {
-                    Integer newIndex = findNewGridIndex(points, cell.get(i)+1);
-                    writer.write(fixedString(8,newIndex.toString()));
-                }
-                writer.write("\r\n");//换行
-            }
-
-            writer.write("CELL_TYPES");
-            writer.write(blanks(1));
-            writer.write(fixedString(9,String.valueOf(cells.size())));
-            writer.write("\r\n");//换行
-            for (Integer type:cellTypes) {
-                    writer.write(blanks(10));
-                    writer.write(type.toString());
-                    writer.write("\r\n");//换行
-            }
-            writer.write("\r\n");//换行
-        }catch (Exception e){
-                e.printStackTrace();
-        }finally {
-            if (writer != null) {
-                try {
-                    writer.close();
-                } catch (IOException e1) {
-                    e1.printStackTrace();
-                }
-            }
-            if (reader != null) {
-                try {
-                    reader.close();
-                } catch (IOException e1) {
-                    e1.printStackTrace();
-                }
-            }
-            if (bdfInputSteam != null) {
-                try {
-                    bdfInputSteam.close();
-                } catch (IOException e1) {
-                    e1.printStackTrace();
-                }
-            }
-            if (bfreader != null) {
-                try {
-                    bfreader.close();
-                } catch (IOException e1) {
-                    e1.printStackTrace();
-                }
-            }
-        }
-        return vtkFile.getPath();
-    }
-
-    private static Integer findNewGridIndex(ArrayList<ArrayList<Float>> points, int oldeIndex) {
-       int i=0;
-        for (ArrayList<Float> point: points) {
-            if(point.get(3)==oldeIndex){
-                return i;
-            }
-            i++;
-        }
-        return 0;
-    }
-
-
-    public static ArrayList<Integer> patInts(String line){
-        ArrayList<Integer>  cells =new ArrayList<>();
-        for (int i = 1; i <9 ; i++) {
-            int min = i*8;
-            if(min>line.length()){
-                min = line.length();
-            }
-            int max = (i+1)*8;
-            if(max>line.length()){
-                max = line.length();
-            }
-            String sbtmp =line.substring(min,max);
-            if(!"".equals(sbtmp.trim())){
-                cells.add(Integer.valueOf(sbtmp.trim().replace(".","")));
-            }
-        }
-        return cells;
-    }
-    /**
-     * -2.98023-8  转换 -2.98023E-8
-     */
-    public static String  doubeAddE(String lostEdoube){
-        if(lostEdoube.indexOf("e")>0||lostEdoube.indexOf("E")>0){
-            return lostEdoube;
-        }
-        if(lostEdoube.lastIndexOf("-")>1){
-            String addE ="";
-            addE =addE+lostEdoube.substring(0,lostEdoube.lastIndexOf("-"));
-            addE=addE+"E";
-            addE =addE+lostEdoube.substring(lostEdoube.lastIndexOf("-"));
-            return addE;
-        }
-        return lostEdoube;
-    }
-    public static ArrayList<Float> patFloats(String line){
-        ArrayList<Float>  cells =new ArrayList<>();
-        for (int i = 1; i <9 ; i++) {
-            int min = i*8;
-            if(min>line.length()){
-                min = line.length();
-            }
-            int max = (i+1)*8;
-            if(max>line.length()){
-                max = line.length();
-            }
-            String sbtmp =line.substring(min,max);
-            if(!"".equals(sbtmp.trim())){
-                cells.add(strToFloat(VTK.doubeAddE(sbtmp.trim())));
-            }
-        }
-        return cells;
-    }
-
-    /**
-     * GRID*    37                             -.04            -1.74846-9
-     * *        0.
-     * @param line
-     * @return
-     */
-
-    /**
-     *  read(10,'(A8,A16,16X,2A16)')cname,chnnod,chcood2(1:2)
-     *  read(10,'(A8,A16)')cname,chcood2(3)
-     */
-    public static ArrayList<Float> patFloats2(String line){
-        ArrayList<Float>  cells =new ArrayList<>();
-        String patFloat = "(\\-?\\d+\\.?[\\d\\-\\+E]*|\\.\\d+)";
-        Pattern r = Pattern.compile(patFloat);
-        int matcher_start = 0;
-        Matcher m = r.matcher(line);
-        while (m.find(matcher_start)){
-//            System.out.println(m.group(1));
-            cells.add(strToFloat(VTK.doubeAddE(m.group(1))));
-            matcher_start = m.end();
-        }
-        return cells;
-    }
-    public static Float strToFloat(String line){
-        String pat = "^\\..*";
-        if(Pattern.matches(pat,line)){
-            return Float.valueOf("0"+line);
-        }else{
-            return Float.valueOf(line);
-        }
-    }
-    public  static  String  fixedString(int length ,String str){
-        if(length>0)        return String.format("%"+length+"s",str);
-        return str;
-    }
-    public  static  String  fixedFloat(float fl){
-        return String.format("%25f",fl);
-    }
-    public  static  String  blanks(int length){
-        String t="";
-        if(length>0){
-            for (int i = 0; i <length ; i++) {
-                t +=" ";
-            }
-        }
-        return t;
-    }
-    public static void main(String[] args) {
-        File f =new File("D:\\FEMLab\\ADI.SimWork4.0\\FEMLab\\data\\static analysis\\1.09_geartooth-static.bdf");
-        VTK.CreateVTKFile(f,"f");
-
-//        String ling ="                4.000000000000                0.500000000000               -0.500000000000";
-//        System.out.println(ling.length());
-//        System.out.println(String.format("%25.12f",1.51597));
-//       String tmp ="CELL";
-//       int nele=12;
-//       int melo =1212;
-//        System.out.print(VTK.fixedString(0,tmp));
-//        System.out.print(VTK.fixedString(0," "));
-//        System.out.print(VTK.fixedString(9,String.valueOf(nele)));
-//        System.out.print(VTK.fixedString(0," "));
-//        System.out.print(VTK.fixedString(9,String.valueOf(melo)));
-//        System.out.println(VTK.patInts("CROD     1       1       1       2"));
-//        System.out.println(VTK.patFloats("GRID     1735           13.6682 20.9328 24."));
-
-//        String tmp="GRID     434            -33.333325.     21.6667";
-//        ArrayList<Float>  cells =new ArrayList<>();
-//        for (int i = 1; i <9 ; i++) {
-//            int min = i*8;
-//            if(min>tmp.length()){
-//                min = tmp.length();
-//            }
-//            int max = (i+1)*8;
-//            if(max>tmp.length()){
-//                max = tmp.length();
-//            }
-//            String sbtmp =tmp.substring(min,max);
-//            if(!"".equals(sbtmp.trim())){
-//                cells.add(strToFloat(VTK.doubeAddE(sbtmp.trim())));
-//            }
-//        }
-//        System.out.println(cells);
-//        System.out.println( tmp.substring(47,47));
-//        System.out.println( tmp.substring(9,17));
-//        System.out.println( tmp.substring(17,15));
-//        tmp.substring(tmp.indexOf(".")).length()
-//        String line ="CQUAD   1       1       6       7       16      15";
-//        String patCQUAD = "^CQUAD4.*";
-//        String patGRID = "^GRID/*.*";
-//        System.out.println("GRID     359            .498624 24.995  4.5".indexOf("GRID*"));
-////        System.out.println(Pattern.matches(patCQUAD,line));
-//
-//
-//        String line2 ="GRID*    176                            -2.98023-8      .75";
-//        System.out.println(Pattern.matches(patGRID,line2));
-//        System.out.println( VTK.doubeAddE(" -2.980238"));
-
-//        String line =".5";
-//        String patCQUAD = "^\\..*";
-
-//        System.out.println(Pattern.matches(patCQUAD,line));
-        File file =new File("D:\\FEMLab\\ADI.SimWork4.0\\FEMLab\\data\\transient analysis\\2.3_wing-transient.bdf");
-        VTK.CreateVTKFile(file,"tt");
-    }
-
-}

+ 0 - 58
src/main/java/com/miniframe/solverconfig/hcfd/HcfdBoundary.java

@@ -1,58 +0,0 @@
-package com.miniframe.solverconfig.hcfd;
-
-/**
- * HCFD 边界信息
- */
-public class HcfdBoundary {
-    /**
-     * 编号
-     */
-    private Integer id;
-    /**
-     * 类型code
-     * 黎曼远场边界(Farfield) 5000
-     * 自由来流边界(Freestream)5050
-     * 无粘壁面(Inviscous Wall) 3000
-     * 粘性壁面(Viscous Wall)4000
-     * X-对称平面(X-symmetry Plane)  6661
-     * Y-对称平面(Y-symmetry Plane ) 6662
-     * Z-对称平面Z-symmetry Plane) 6663
-     * 周期边界(Periodic) 6100
-     */
-    private Integer conditionsCode;
-
-    /**
-     * 边界名称
-     */
-    private String name;
-
-    public HcfdBoundary() {
-        this.id = id;
-        this.conditionsCode = conditionsCode;
-        this.name = name;
-    }
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public Integer getConditionsCode() {
-        return conditionsCode;
-    }
-
-    public void setConditionsCode(Integer conditionsCode) {
-        this.conditionsCode = conditionsCode;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-}

+ 0 - 552
src/main/java/com/miniframe/solverconfig/hcfd/HcfdExe.java

@@ -1,552 +0,0 @@
-package com.miniframe.solverconfig.hcfd;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.miniframe.core.exception.BusinessException;
-import com.miniframe.core.ext.UtilTools;
-import com.miniframe.model.system.AdiModeling;
-import com.miniframe.model.system.AdiSolverConfig;
-import com.miniframe.model.system.SysFile;
-import com.miniframe.model.system.dao.AdiSolverConfigMapper;
-import com.miniframe.model.system.dao.SysFileMapper;
-import com.miniframe.tools.CaeFileUtils;
-import com.miniframe.tools.XIFileUtils;
-import com.miniframe.tools.XiJsonUtil;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.List;
-
-/**
- * hcfd 求解
- */
-public class HcfdExe {
-
-
-
-    /**
-     * 根据配置重新创建 mpbc 文件
-     * @param
-     */
-    public static void CreateMpbcFile(AdiModeling modeling, AdiSolverConfig config) throws BusinessException, IOException {
-        HcfdParam param ;
-        try {
-             param =XiJsonUtil.jsonToPojo(config.getParameterObj(),HcfdParam.class);
-        }catch (JsonProcessingException e){
-            e.printStackTrace();
-            throw new BusinessException("EB4000006");
-        }
-        List<HcfdBoundary>  boundaries=param.getHcfdBoundarys();
-
-        String  mapbcFileId =config.getMapbcFile();
-        String mapbcFilePath;
-        if(mapbcFileId==null||mapbcFileId.equals("")) {
-            /**
-             * 创建一个新的配置文件
-             */
-            mapbcFilePath= CaeFileUtils.createBigFilePath(config.getPid()+".mapbc");
-            mapbcFileId=UtilTools.getUUid();
-            CaeFileUtils.saveFile(mapbcFileId,mapbcFilePath,config.getUid(),"mapbc","");
-
-            AdiSolverConfigMapper configDao = UtilTools.getBean(AdiSolverConfigMapper.class);
-            config.setMapbcFile(mapbcFileId);
-            configDao.updateByPrimaryKey(config);
-        }else{
-            SysFileMapper sysFileDAO = UtilTools.getBean(SysFileMapper.class);
-            SysFile mapbcFile =  sysFileDAO.selectByPrimaryKey(mapbcFileId);
-            if(mapbcFile==null){
-                throw new BusinessException("EB4000001");
-            }
-            mapbcFilePath = XIFileUtils.getRootPathStr()+"/"+mapbcFile.getFilepath();
-        }
-
-        File mapbcFile = new File(mapbcFilePath);
-        FileWriter writer =null;
-        try {
-            if (!mapbcFile.exists()) {
-                mapbcFile.createNewFile();
-            }else{
-                mapbcFile.delete();
-                mapbcFile.createNewFile();
-            }
-            writer = new FileWriter(mapbcFile,true);
-            writer.write(String.valueOf(boundaries.size())+" ");
-            writer.write("\r\n");//换行
-            for (HcfdBoundary b:boundaries) {
-                writer.write(b.getId().toString()+" ");
-                writer.write(b.getConditionsCode().toString()+" ");
-                writer.write(b.getName()+" ");
-                writer.write("\r\n");//换行
-            }
-            writer.close();
-        }catch (Exception o){
-            o.printStackTrace();
-        }finally {
-            if (writer != null) {
-                try {
-                    writer.close();
-                } catch (IOException e1) {
-                    e1.printStackTrace();
-                }
-            }
-        }
-    }
-
-    /**
-     * 根据配置重新创建 nml 文件
-     * @param
-     */
-    public static void CreateNmlFile(AdiModeling modeling, AdiSolverConfig config) throws BusinessException, IOException {
-        HcfdParam param ;
-        try {
-            param =XiJsonUtil.jsonToPojo(config.getParameterObj(),HcfdParam.class);
-        }catch (JsonProcessingException e){
-            e.printStackTrace();
-            throw new BusinessException("EB4000006");
-        }
-        String  nmlFileId =config.getNmlFile();
-        String nmlFilePath;
-        if(nmlFileId==null||nmlFileId.equals("")) {
-            /**
-             * 创建一个新的配置文件
-             */
-            nmlFilePath = CaeFileUtils.createBigFilePath( "hcfd.nml");
-            nmlFileId=UtilTools.getUUid();
-            CaeFileUtils.saveFile(nmlFileId, nmlFilePath, config.getUid(), "nml", "");
-
-            AdiSolverConfigMapper configDao = UtilTools.getBean(AdiSolverConfigMapper.class);
-            config.setNmlFile(nmlFileId);
-            configDao.updateByPrimaryKey(config);
-
-        }else{
-            SysFileMapper sysFileDAO = UtilTools.getBean(SysFileMapper.class);
-            SysFile nmlFile =  sysFileDAO.selectByPrimaryKey(nmlFileId);
-            if(nmlFile==null){
-                throw new BusinessException("EB4000001");
-            }
-            nmlFilePath = XIFileUtils.getRootPathStr()+"/"+nmlFile.getFilepath();
-        }
-
-        NmlParam np = param.getNmlParam();
-        File nmlFile = new File(nmlFilePath);
-        FileWriter fw =null;
-        try {
-            if (!nmlFile.exists()) {
-                nmlFile.createNewFile();
-            }else{
-                nmlFile.delete();
-                nmlFile.createNewFile();
-            }
-            fw = new FileWriter(nmlFile,true);
-            version_number(np, fw);
-            project(np, fw);
-            governing_equations(np, fw);
-            reference_physical_properties(np, fw);
-            force_moment_integ_properties(np, fw);
-            inviscid_flux_method(np, fw);
-            molecular_viscous_models(np, fw);
-            turbulent_diffusion_models(np, fw);
-            nonlinear_solver_parameters(np, fw);
-            linear_solver_parameters(np, fw);
-            code_run_control(np, fw);
-            special_parameters(np, fw);
-            raw_grid(np, fw);
-            elasticity_gmres(fw);
-            boundary_output_variables(np, fw);
-            volume_output_variables(np, fw);
-            //sampling_parameters// todo hxx 待定
-            sampling_parameters(np, fw);
-            fw.close();
-        }catch (Exception o){
-            o.printStackTrace();
-        }finally {
-            if (fw != null) {
-                try {
-                    fw.close();
-                } catch (IOException e1) {
-                    e1.printStackTrace();
-                }
-            }
-        }
-    }
-    private static void sampling_parameters(NmlParam np, FileWriter fw) throws IOException {
-        //elasticity_gmres//
-        fw.write("&sampling_parameters");
-        fw.write("\r\n");//换行
-        fw.write("number_of_geometries = 0");
-        fw.write("\r\n");//换行
-        fw.write("/");
-        fw.write("\r\n");//换行
-    }
-
-    private static void volume_output_variables(NmlParam np, FileWriter fw) throws IOException {
-        //volume_output_variables//
-        fw.write("&volume_output_variables");
-        fw.write("\r\n");//换行
-        fw.write("u= .");
-        fw.write(String.valueOf(np.isV_u()));
-        fw.write(".\r\n");//换行
-        fw.write("v= .");
-        fw.write(String.valueOf(np.isV_v()));
-        fw.write(".\r\n");//换行
-        fw.write("w= .");
-        fw.write(String.valueOf(np.isV_w()));
-        fw.write(".\r\n");//换行
-        fw.write("p= .");
-        fw.write(String.valueOf(np.isV_p()));
-        fw.write(".\r\n");//换行
-        fw.write("cp= .");
-        fw.write(String.valueOf(np.isV_cp()));
-        fw.write(".\r\n");//换行
-        fw.write("mach= .");
-        fw.write(String.valueOf(np.isV_mach()));
-        fw.write(".\r\n");//换行
-        fw.write("vort_mag= .");
-        fw.write(String.valueOf(np.isV_vort_mag()));
-        fw.write(".\r\n");//换行
-        fw.write("vort_x= .");
-        fw.write(String.valueOf(np.isV_vort_x()));
-        fw.write(".\r\n");//换行
-        fw.write("vort_y= .");
-        fw.write(String.valueOf(np.isV_vort_y()));
-        fw.write(".\r\n");//换行
-        fw.write("vort_z= .");
-        fw.write(String.valueOf(np.isV_vort_z()));
-        fw.write(".\r\n");//换行
-        fw.write("q_criterion= .");
-        fw.write(String.valueOf(np.isV_q_criterion()));
-        fw.write(".\r\n");//换行
-        fw.write("/");
-        fw.write("\r\n");//换行
-    }
-
-    private static void boundary_output_variables(NmlParam np, FileWriter fw) throws IOException {
-        //boundary_output_variables//
-        fw.write("&boundary_output_variables");
-        fw.write("\r\n");//换行
-
-        fw.write("u= .");
-        fw.write(String.valueOf(np.isA_u()));
-        fw.write(".\r\n");//换行
-        fw.write("v= .");
-        fw.write(String.valueOf(np.isA_v()));
-        fw.write(".\r\n");//换行
-        fw.write("w= .");
-        fw.write(String.valueOf(np.isA_w()));
-        fw.write(".\r\n");//换行
-        fw.write("p= .");
-        fw.write(String.valueOf(np.isA_p()));
-        fw.write(".\r\n");//换行
-        fw.write("cp= .");
-        fw.write(String.valueOf(np.isA_cp()));
-        fw.write(".\r\n");//换行
-        fw.write("mach= .");
-        fw.write(String.valueOf(np.isA_mach()));
-        fw.write(".\r\n");//换行
-        fw.write("vort_mag= .");
-        fw.write(String.valueOf(np.isA_vort_mag()));
-        fw.write(".\r\n");//换行
-        fw.write("vort_x= .");
-        fw.write(String.valueOf(np.isA_vort_x()));
-        fw.write(".\r\n");//换行
-        fw.write("vort_y= .");
-        fw.write(String.valueOf(np.isA_vort_y()));
-        fw.write(".\r\n");//换行
-        fw.write("vort_z= .");
-        fw.write(String.valueOf(np.isA_vort_z()));
-        fw.write(".\r\n");//换行
-        fw.write("q_criterion= .");
-        fw.write(String.valueOf(np.isA_q_criterion()));
-        fw.write(".\r\n");//换行
-        fw.write("/");
-        fw.write("\r\n");//换行
-    }
-
-    private static void elasticity_gmres(FileWriter fw) throws IOException {
-        //elasticity_gmres//
-        fw.write("&elasticity_gmres");
-        fw.write("\r\n");//换行
-        fw.write("ileft= 1");
-        fw.write("\r\n");//换行
-        fw.write("nsearch = 50");
-        fw.write("\r\n");//换行
-        fw.write("nrestarts = 10");
-        fw.write("\r\n");//换行
-        fw.write("tol = 1.e-6");
-        fw.write("\r\n");//换行
-        fw.write("show = .false.");
-        fw.write("\r\n");//换行
-        fw.write("/");
-        fw.write("\r\n");//换行
-    }
-
-    private static void raw_grid(NmlParam np, FileWriter fw) throws IOException {
-        //raw_grid//
-        fw.write("&raw_grid");
-        fw.write("\r\n");//换行
-        fw.write("grid_format= \"");
-        fw.write(np.getGrid_format().toString());
-        fw.write("\"\r\n");//换行
-        fw.write("data_format= \"");
-        fw.write(np.getData_format().toString());
-        fw.write("\"\r\n");//换行
-        fw.write("swap_yz_axes= .");
-        fw.write(String.valueOf(np.isSwap_yz_axes()));
-        fw.write(".\r\n");//换行
-        fw.write("ignore_euler_number= .");
-        fw.write(String.valueOf(np.isIgnore_euler_number()));
-        fw.write(".\r\n");//换行
-        fw.write("/");
-        fw.write("\r\n");//换行
-    }
-
-    private static void special_parameters(NmlParam np, FileWriter fw) throws IOException {
-        //special_parameters//
-        fw.write("&special_parameters");
-        fw.write("\r\n");//换行
-        fw.write("large_angle_fix = \"");
-        fw.write(np.getLarge_angle_fix().toString());
-        fw.write("\"\r\n");//换行
-        fw.write("/");
-        fw.write("\r\n");//换行
-    }
-
-    private static void code_run_control(NmlParam np, FileWriter fw) throws IOException {
-        //code_run_control//
-        fw.write("&code_run_control");
-        fw.write("\r\n");//换行
-        fw.write("steps = ");
-        fw.write(np.getSteps().toString());
-        fw.write("\r\n");//换行
-        fw.write("stopping_tolerance = ");
-        fw.write(np.getStopping_tolerance().toString());
-        fw.write("\r\n");//换行
-        fw.write("restart_write_freq = ");
-        fw.write(np.getRestart_write_freq().toString());
-        fw.write("\r\n");//换行
-        fw.write("restart_read = \"");
-        fw.write(np.getRestart_read().toString());
-        fw.write("\"\r\n");//换行
-        fw.write("jacobian_eval_freq = ");
-        fw.write(np.getJacobian_eval_freq().toString());
-        fw.write("\r\n");//换行
-        fw.write("/");
-        fw.write("\r\n");//换行
-    }
-
-    private static void linear_solver_parameters(NmlParam np, FileWriter fw) throws IOException {
-        //linear_solver_parameters//
-        fw.write("&linear_solver_parameters");
-        fw.write("\r\n");//换行
-        fw.write("meanflow_sweeps = ");
-        fw.write(np.getMeanflow_sweeps().toString());
-        fw.write("\r\n");//换行
-        fw.write("turbulence_sweeps = ");
-        fw.write(np.getTurbulence_sweeps().toString());
-        fw.write("\r\n");//换行
-        fw.write("/");
-        fw.write("\r\n");//换行
-    }
-
-    private static void nonlinear_solver_parameters(NmlParam np, FileWriter fw) throws IOException {
-        //nonlinear_solver_parameters//
-        fw.write("&nonlinear_solver_parameters");
-        fw.write("\r\n");//换行
-        fw.write("time_accuracy = \"");
-        fw.write(np.getTime_accuracy().toString());
-        fw.write("\"\r\n");//换行
-
-        fw.write("time_step_nondim = ");
-        fw.write(np.getTime_step_nondim().toString());
-        fw.write("\r\n");//换行
-
-        fw.write("pseudo_time_stepping = \"");
-        fw.write(np.getPseudo_time_stepping().toString());
-        fw.write("\"\r\n");//换行
-
-        fw.write("subiterations = ");
-        fw.write(np.getSubiterations().toString());
-        fw.write("\r\n");//换行
-
-        fw.write("schedule_number = 2");//Todo  hxx  页面没有映射
-        fw.write("\r\n");//换行
-
-        fw.write("schedule_iteration = ");
-        for (Integer i:
-                np.getSchedule_iteration()) {
-            fw.write(i.toString()+" ");
-        }
-        fw.write("\r\n");//换行
-
-        fw.write("schedule_cfl = ");
-        for (Double i:
-                np.getSchedule_cfl()) {
-            fw.write(i.toString());
-            fw.write(" ");
-        }
-        fw.write("\r\n");//换行
-
-        fw.write("schedule_cflturb = ");
-        for (Double i:
-                np.getSchedule_cflturb()) {
-            fw.write(i.toString());
-            fw.write(" ");
-        }
-        fw.write("\r\n");//换行
-        fw.write("/");
-        fw.write("\r\n");//换行
-    }
-
-    private static void turbulent_diffusion_models(NmlParam np, FileWriter fw) throws IOException {
-        //turbulent_diffusion_models//
-        fw.write("&turbulent_diffusion_models");
-        fw.write("\r\n");//换行
-        fw.write("turb_model = \"");
-        fw.write(np.getTurb_model().toString());
-        fw.write("\"\r\n");//换行
-        fw.write("/");
-        fw.write("\r\n");//换行
-    }
-
-    private static void molecular_viscous_models(NmlParam np, FileWriter fw) throws IOException {
-        //molecular_viscous_models//
-        fw.write("&molecular_viscous_models");
-        fw.write("\r\n");//换行
-
-        fw.write("prandtlnumber_molecular = ");
-        fw.write(np.getPrandtlnumber_molecular().toString());
-        fw.write("\r\n");//换行
-
-        fw.write("/");
-        fw.write("\r\n");//换行
-    }
-
-    private static void inviscid_flux_method(NmlParam np, FileWriter fw) throws IOException {
-        //inviscid_flux_method//
-        fw.write("&inviscid_flux_method");
-        fw.write("\r\n");//换行
-
-        fw.write("flux_limiter = \"");
-        fw.write(np.getFlux_limiter().toString());
-        fw.write("\"\r\n");//换行
-
-        fw.write("first_order_iterations = ");
-        fw.write(np.getFirst_order_iterations().toString());
-        fw.write("\r\n");//换行
-
-        fw.write("flux_construction = \"");
-        fw.write(np.getFlux_construction().toString());
-        fw.write("\"\r\n");//换行
-
-        fw.write("flux_construction_lhs = \"");
-        fw.write(np.getFlux_construction_lhs().toString());
-        fw.write("\"\r\n");//换行
-
-        fw.write("/");
-        fw.write("\r\n");//换行
-    }
-
-    private static void force_moment_integ_properties(NmlParam np, FileWriter fw) throws IOException {
-        //force_moment_integ_properties//
-        fw.write("&force_moment_integ_properties");
-        fw.write("\r\n");//换行
-        fw.write("area_reference = ");
-        fw.write(np.getArea_reference().toString());
-        fw.write("\r\n");//换行
-
-        fw.write("x_moment_length = ");
-        fw.write(np.getX_moment_length().toString());
-        fw.write("\r\n");//换行
-
-        fw.write("y_moment_length = ");
-        fw.write(np.getY_moment_length().toString());
-        fw.write("\r\n");//换行
-
-        fw.write("x_moment_center = ");
-        fw.write(np.getX_moment_center().toString());
-        fw.write("\r\n");//换行
-
-        fw.write("y_moment_center = ");
-        fw.write(np.getY_moment_center().toString());
-        fw.write("\r\n");//换行
-
-        fw.write("z_moment_center = ");
-        fw.write(np.getZ_moment_center().toString());
-        fw.write("\r\n");//换行
-
-        fw.write("/");
-        fw.write("\r\n");//换行
-    }
-
-    private static void reference_physical_properties(NmlParam np, FileWriter fw) throws IOException {
-        //reference_physical_properties//
-        fw.write("&reference_physical_properties");
-        fw.write("\r\n");//换行
-        fw.write("dim_input_type = \"nondimensional\"");//Todo  hxx  页面没有映射
-        fw.write("\r\n");//换行
-        fw.write("temperature_units = \"");
-        fw.write(np.getTemperature_units().toString());
-        fw.write("\"\r\n");//换行
-        fw.write("mach_number = ");
-        fw.write(np.getMach_number().toString());
-        fw.write("\r\n");//换行
-        fw.write("reynolds_number = ");
-        fw.write(np.getReynolds_number().toString());
-        fw.write("\r\n");//换行
-        fw.write("temperature = ");
-        fw.write(np.getTemperature().toString());
-        fw.write("\r\n");//换行
-        fw.write("angle_of_attack = ");
-        fw.write(np.getAngle_of_attack().toString());
-        fw.write("\r\n");//换行
-        fw.write("angle_of_yaw = ");
-        fw.write(np.getAngle_of_yaw().toString());
-        fw.write("\r\n");//换行
-        fw.write("/");
-        fw.write("\r\n");//换行
-    }
-
-    private static void governing_equations(NmlParam np, FileWriter fw) throws IOException {
-        //governing_equations//
-        fw.write("&governing_equations");
-        fw.write("\r\n");//换行
-        fw.write("eqn_type = \"");
-        fw.write(np.getEqn_type().toString());
-        fw.write("\"\r\n");//换行
-        fw.write("artificial_compress = ");
-        fw.write(np.getArtificial_compress().toString());
-        fw.write("\r\n");//换行
-        fw.write("viscous_terms = \"");
-        fw.write(np.getViscous_terms().toString());
-        fw.write("\"\r\n");//换行
-        fw.write("/");
-        fw.write("\r\n");//换行
-    }
-
-    private static void project(NmlParam np, FileWriter fw) throws IOException {
-        //project//
-        fw.write("&project");
-        fw.write("\r\n");//换行
-        fw.write("project_rootname = \"");
-        fw.write(np.getProject_rootname().toString());
-        fw.write("\"\r\n");//换行
-        fw.write("case_title = \"case_name\"");
-        fw.write("\r\n");//换行
-        fw.write("/");
-        fw.write("\r\n");//换行
-    }
-
-    private static void version_number(NmlParam np, FileWriter fw) throws IOException {
-        //version_number//
-        fw.write("&version_number");
-        fw.write("\r\n");//换行
-        fw.write("input_version = ");
-        fw.write(np.getInput_version().toString());
-        fw.write("\r\n");//换行
-        fw.write("namelist_verbosity = \"");
-        fw.write(np.getNamelist_verbosity().toString());
-        fw.write("\"\r\n");//换行
-        fw.write("/");
-        fw.write("\r\n");//换行
-    }
-
-}

+ 0 - 52
src/main/java/com/miniframe/solverconfig/hcfd/HcfdParam.java

@@ -1,52 +0,0 @@
-package com.miniframe.solverconfig.hcfd;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.miniframe.solverconfig.SolverParam;
-import com.miniframe.tools.XiJsonUtil;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * hcfd
- */
-public class HcfdParam implements SolverParam {
-    /**
-     * 配置信息
-     */
-    private NmlParam nmlParam ;
-
-
-    /**
-     * boundary 边界信息
-     * @param caeProject
-     */
-    private List<HcfdBoundary> hcfdBoundarys = new ArrayList<HcfdBoundary>();
-
-    public HcfdParam() {
-        nmlParam = new NmlParam();
-    }
-
-
-    public NmlParam getNmlParam() {
-        return nmlParam;
-    }
-
-    public void setNmlParam(NmlParam nmlParam) {
-        this.nmlParam = nmlParam;
-    }
-
-    public List<HcfdBoundary> getHcfdBoundarys() {
-        return hcfdBoundarys;
-    }
-
-    public void setHcfdBoundarys(List<HcfdBoundary> hcfdBoundarys) {
-        this.hcfdBoundarys = hcfdBoundarys;
-    }
-
-    @Override
-    public String paramJson() throws JsonProcessingException {
-        String t =XiJsonUtil.objectToJson(this);
-        return t;
-    }
-}

+ 0 - 129
src/main/java/com/miniframe/solverconfig/hcfd/HcfdPath.java

@@ -1,129 +0,0 @@
-package com.miniframe.solverconfig.hcfd;
-
-import com.miniframe.constant.MFConstant;
-import com.miniframe.core.exception.BusinessException;
-import com.miniframe.core.ext.UtilTools;
-import com.miniframe.model.system.*;
-import com.miniframe.model.system.dao.SysFileMapper;
-import com.miniframe.tools.XIDateTimeUtils;
-import com.miniframe.tools.XIFileUtils;
-
-import java.io.*;
-import java.nio.channels.FileChannel;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.nio.file.StandardCopyOption;
-import java.util.*;
-
-/**
- * 对执行所需要的文件进行文件夹规整已满足求解
- */
-public class HcfdPath {
-    /**
-     *
-     * @param pid
-     * @param isVolume 1 物面 2流场
-     * @param step  步数
-     * @return
-     */
-    public static List<File> getStepFiles(String pid ,String isVolume,String step) throws  BusinessException{
-        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<File> fileList =new ArrayList<>();
-        File[] files =exeOutDir.listFiles();
-        if(isVolume.equals("2")) {//物面数据
-            for (File sonFile: files) {
-                if(sonFile.getName().indexOf("tec_volume_timestep"+step+".dat")>-1){//物面
-                    fileList.add(sonFile);
-
-                }
-            }
-        }else{//流场数据
-            for (File sonFile: files) {
-                if(sonFile.getName().indexOf("boundary_timestep"+step+".dat")>-1){//流场
-                    fileList.add(sonFile);
-                }
-            }
-        }
-        return  fileList;
-    }
-
-    public static List<Integer> hcfdTeps(String pid) throws  BusinessException{
-        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")>-1){
-                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,
-                                      AdiSolverConfig config,
-                                      AdiSolverJob job ) throws IOException {
-        String jobPath = XIFileUtils.getRootPathStr()+ MFConstant.separator+job.getPid();
-        System.out.println(jobPath);
-        String exePath = jobPath+ MFConstant.separator+"hcfd";
-        String exeInPath = exePath+ MFConstant.separator+"data_in";
-        File exeInDir = new File(exeInPath);
-        if(!exeInDir.exists()){
-            exeInDir.mkdirs();
-        }
-        String testPath = exePath+ MFConstant.separator+"test";
-        String exeOutPath = testPath+ MFConstant.separator+"data_out";
-        File exeOutDir = new File(exeOutPath);
-        if(!exeOutDir.exists()){
-            exeOutDir.mkdirs();
-        }
-        SysFileMapper fileMapper = UtilTools.getBean(SysFileMapper.class);
-        SysFile nmlFile= fileMapper.selectByPrimaryKey(config.getNmlFile());
-        fileMove(nmlFile,testPath+MFConstant.separator+"hcfd.nml");
-        SysFile mapbcFile= fileMapper.selectByPrimaryKey(config.getMapbcFile());
-        fileMove(mapbcFile,exeInPath+MFConstant.separator+"hcfd.mapbc");
-        SysFile grid= fileMapper.selectByPrimaryKey(modeling.getGridFile());
-        fileMove(grid,exeInPath+MFConstant.separator+"hcfd.ugrid");
-    }
-
-    /**
-     * 文件移动
-     * @param file
-     * @param pathStr
-     * @throws IOException
-     */
-    public static void fileMove(SysFile file ,String pathStr) throws IOException {
-        Path path = Paths.get(pathStr);
-        SysFileMapper fileMapper = UtilTools.getBean(SysFileMapper.class);
-        Files.move(Paths.get( XIFileUtils.getRootPathStr()+ MFConstant.separator+file.getFilepath()),
-                path, StandardCopyOption.REPLACE_EXISTING);
-        String fielRelativePath = XIFileUtils.getRelativizePathStr(path);
-        file.setFilepath(fielRelativePath);
-        file.setFilename(path.getFileName().toString());
-        fileMapper.updateByPrimaryKey(file);
-    }
-
-
-    public static void main(String[] args) {
-        String stip="hcfd_tec_boundary_timestep100.dat".replace("hcfd_tec_boundary_timestep","").replace(".dat","");
-        Integer s ="hcfd_tec_boundary_timestep100.dat".indexOf("hcf2d_tec_boundary_timestep");
-        System.out.println(s);
-    }
-
-}

+ 0 - 942
src/main/java/com/miniframe/solverconfig/hcfd/NmlParam.java

@@ -1,942 +0,0 @@
-package com.miniframe.solverconfig.hcfd;
-
-
-public class NmlParam {
-    //&version_number  //
-    private Double input_version=2.2;
-    private String namelist_verbosity="off";
-    //&project  //
-    private String project_rootname="hcfd";
-    private String case_title="case_name";
-    //&raw_grid  //
-    private String grid_format = "aflr3";
-    /**
-     * 文件格式  binary;ascii
-     */
-    private String data_format = "ascii" ;
-    private boolean ignore_euler_number = false;
-    //通用设置(General) 部分存储//
-    /**
-     * 定常(Steady) 非定常(Unsteady)
-     */
-    private String Analysis_Type="Steady";
-    /**
-     * 并行类型(Parallel Optional)串行(Serial) MPI并行(MPI Parallel)
-     */
-    private String Parallel_Optional="Serial";
-    /**
-     * 处理器数(Number of Processors)默认值:2
-     *
-     */
-    private Integer Number_of_Processors=2;
-    // &governing_equations 部分存储//
-    /**
-     * 不可压理想气体( Incompressible Perfect Gas ) cal_perf_incompress
-     * 可压缩理想气体(Compressible Perfect Gas ) cal_perf_compress
-     */
-    private String eqn_type = "cal_perf_compress";
-    /**
-     * 人工压缩因子(Artifical Compressibility Factor) 默认值:15,取值范围:(1,100)
-     */
-    private Double artificial_compress = 15.0000000000000;
-    /**
-     * 粘性模型(Viscous Model)
-     * 无粘(Inviscid) inviscid
-     * 层流(Laminar)laminar
-     * 湍流(Turbulent) turbulent
-     */
-    private String  viscous_terms = "inviscid";
-
-
-    //&molecular_viscous_models//
-    /**
-     * &molecular_viscous_models
-     * 层流普朗特数(Molecular Prandtl Number)默认值:0.72,其值必须大于0
-     */
-    private Double prandtlnumber_molecular = 0.720000000000000;
-    /**
-     * &turbulent_diffusion_models
-     * SA 默认		turb_model = "sa"
-     * DES			turb_model = "des"
-     * Menter-sst	turb_model = "menter-sst"
-     * Abid-ke		turb_model = "abid-ke"
-     * Hrles		turb_model = "hrles"
-     */
-    private String turb_model = "sa";
-    /**
-     * 运动网格(Dynamic Mesh)
-     */
-    private String Dynamic_Mesh="off";
-    // &reference_physical_properties 参考条件(Reference Conditions)//
-    /**
-     * 马赫数(Mach Number)不可压流,默认设置0.2;可压流,默认设置0.5;必须是大于0的实数
-     */
-    private Double mach_number = 0.5;
-    /**
-     * 雷诺数(Reynolds Number) 必须是大于0的实数
-     */
-    private Double reynolds_number = 1000000.00000000;
-    /**
-     * 温度(Temperature) 数值(Values) 单位为开尔文,默认值273.13;兰金,默认值491.4
-     */
-    private Double temperature = 491.4;
-    /**
-     * 单位(Units)
-     * 	开尔文(Kelvin)
-     * 	兰金(Rankine)
-     */
-    private String temperature_units = "Rankine";
-    /**
-     * 攻角(Angle Of Attack)
-     * 	单位(Units) 度(degree)
-     * 	数值(Values) 默认值0
-     */
-    private Double angle_of_attack = 0.000000000000000E+000;
-    /**
-     * 侧滑角(Angle Of Yaw)
-     * 	单位(Units) 度(degree)
-     * 	数值(Values)默认值0
-     */
-    private Double angle_of_yaw = 0.000000000000000E+000;
-    //&force_moment_integ_properties//
-    /**
-     * 参考面积(Reference Area)&force_moment_integ_properties 默认值:1
-     */
-    private Double area_reference = 1.00000000000000;
-    /**
-     * Y轴力矩在X方向的力臂(Length in X  About Moment Of Y Axis) 默认值:1
-     */
-    private Double x_moment_length = 1.00000000000000;
-    /**
-     * X和Z轴力矩在Y方向的力臂(length in Y  About Moment X and Z Axis ) 默认值:1
-     */
-    private Double y_moment_length = 1.00000000000000;
-    /**
-     * 力矩中心位置(Location Of Moment Center)
-     * 	坐标X(X-Coordinate) 默认值:0
-     */
-    private Double x_moment_center = 0.000000000000000E+000;
-    /**
-     * 力矩中心位置(Location Of Moment Center)
-     * 坐标Y(Y-Coordinate) 默认值:0
-     */
-    private Double y_moment_center = 0.000000000000000E+000;
-    /**
-     * 力矩中心位置(Location Of Moment Center)
-     * 坐标Z(Z-Coordinate) 默认值:0
-     */
-    private Double z_moment_center = 0.000000000000000E+000;
-    /**
-     * 非惯性参考系(Noninertial Reference Frame)
-     */
-    private String Noninertial_Reference_Frame="off";
-
-    //&inviscid_flux_method 无粘通量方法(Inviscid Flux Method)//
-    /**
-     * 通量残差构造方法(Flux Residual Construction)
-     *     Roe				flux_construction = "roe"
-     *     vanleer			flux_construction = "vanleer"
-     *     HLLC				flux_construction = "hllc"
-     *     AUFS				flux_construction = "aufs"
-     *     Central_Diss		flux_construction = "central_diss"
-     *     LDFSS			flux_construction = "dlfss"
-     *     STVD				flux_construction = "stvd"
-     *     STVD_modified	flux_construction = "stvd_modified"
-     */
-    private String flux_construction = "roe";
-    /**
-     * 通量雅可比构造方法(Flux Jacobian Construction )
-     * 	Roe				    flux_construction_lhs = "roe"
-     * 	HLLC				flux_construction_lhs = "hllc"
-     * 	AUFS				flux_construction_lhs = "aufs"
-     * 	LDFSS				flux_construction_lhs = "ldfss"
-     */
-    private String flux_construction_lhs = "roe";
-    /**
-     * 通量限制器(Flux Limiter)
-     * 	none				flux_limiter = "none"
-     * 	barth				flux_limiter = "barth"
-     * 	venkat				flux_limiter = "venkat"
-     * 	minmod				flux_limiter = "minmod"
-     * 	vanleer				flux_limiter = "vanleer"
-     * 	vanalbada			flux_limiter = "vanalbada"
-     * 	smooth				flux_limiter = "smooth"
-     * 	hminmod				flux_limiter = "hminmod"
-     * 	hvanleer			flux_limiter = "hvanleer"
-     * 	hvanalbada			flux_limiter = "hvanalbada"
-     * 	hsmooth				flux_limiter = "hsmooth"
-     * 	hvenkat				flux_limiter = "hvenkat"
-     */
-    private String  flux_limiter = "none";
-    /**
-     * 一阶空间精度迭代步数(Number Of First Order Iterations) 默认值:0
-     */
-    private Integer first_order_iterations = 0;
-
-    // &nonlinear_solver_parameters时间推进格式(Time Advanced Scheme)//
-    /**
-     * 时间格式(Time Scheme)
-     * 	定常(Steady)				                                time_accuracy = "steady"
-     * 	1阶差分(1storder)				                        time_accuracy = "1storder"
-     * 	2阶差分(2ndorder)				                        time_accuracy = "2ndorder"
-     * 	最优2阶差分(2ndorderOPT)Unsteady 计算类型 默认				time_accuracy = "2ndorderOPT"
-     * 	3阶差分(3rdorder)				                        time_accuracy = "3rdorder"
-     * 	4阶差分(4thorderMEBDF4)				                    time_accuracy = "4thorderMEBDF4"
-     * 	4阶隐式RK(4thorderESDIRK4)				                time_accuracy = "4thorderESDIRK4"
-     */
-    private String time_accuracy = "steady";
-
-    /**
-     * 隐式时间步进(Pseudo Time Stepping)
-     * 	开(On) 默认方式				pseudo_time_stepping = "on"
-     * 	关(Off)				    pseudo_time_stepping = "off"
-     */
-    private String pseudo_time_stepping = "on";
-    /**
-     * 无量纲时间步长(Time Step Nondim) 默认值:0;取值范围:大于等于0的实数
-     */
-    private  Double time_step_nondim = 0.0;
-    /**
-     * 子迭代步数(Subiterations)默认值:15
-     */
-    private Integer subiterations = 0;
-    /**
-     * 指定CFL数的迭代数(Schedule Iteration For Ramped CFL) 默认值:(1,50),注意第一个数必须是1
-     */
-    private Integer schedule_iteration[] = {1,50};
-    /**
-     * 层流CFL数(Schedule CFL)默认值:(200,200)
-     */
-    private Double schedule_cfl[] = {200.0,200.0};
-    /**
-     * 湍流CFL数(Schedule CFL Turb)默认值:(50,50)
-     */
-    private Double schedule_cflturb [] = {50.0,50.0};
-
-    /**
-     * 线性方程组求解参数(Linear Solver Parameter)
-     * &linear_solver_parameters
-     */
-
-    /**
-     * 层流方程扫掠次数(Meanflow Sweeps)默认值:15
-     */
-    private Integer meanflow_sweeps = 15;
-    /**
-     * 湍流方程扫掠次数(Turbulence Sweeps)默认值:10
-     */
-    private Integer turbulence_sweeps = 10;
-    /**
-     * 广义共轭梯度搜索方向(GCR Search Directions)
-     * 开(On)				    line_implicit = "on"
-     * 关(Off) 默认				line_implicit = "off"
-     */
-    private String line_implicit = "off";
-    /**
-     * 运行控制(Run Control)
-     * &code_run_control
-     */
-
-    /**
-     * 迭代步数(Number  Of  Iterations)
-     * 	默认值:1500;必须是正整数
-     */
-    private  Integer steps = 100;
-    /**
-     * 终止残差(Stopping Tolerance)
-     * 	默认值:1e-5
-     */
-    private  Double stopping_tolerance = 1.0E-015;
-    /**
-     * 续算文件输出频率(Restart Write Freq)
-     * 	默认值:250
-     */
-    private Integer restart_write_freq = 250;
-    /**
-     * 雅可比计算频率(Jacobian Evaluate Freq)
-     * 	默认值:10
-     */
-    private Integer jacobian_eval_freq = 10;
-    /**
-     * 续算(Read  Restart )
-     * 	开(on)
-     * 	关(off)
-     */
-    private String restart_read = "off";
-    /**
-     * 输出控制(Output Control)
-     * 	物面输出(Boundary  Output)
-     * &boundary_output_variables
-     */
-    /**
-     * 输出频率(Output Freq) 默认值:100
-     */
-    private Integer animation_freq =100;
-    /**
-     * 输出变量(Output Variables)
-     * X方向速度分量(X-component of velocity)
-     * Y方向速度分量(Y -component of velocity)
-     * Z方向速度分量(Z-component of velocity)
-     * 压力(Press)
-     * 压力系数(Pressure coefficient)
-     * 马赫数(Mach number)
-     * 涡量幅值(Vorticity magnitude)
-     * X方向涡量分量(X-component of vorticity)
-     * Y方向涡量分量(Y -component of vorticity)
-     * Z方向涡量分量(Z-component of vorticity)
-     * Q准则(Q Criterion)
-     */
-    private boolean a_u = true;
-    private boolean a_v = true;
-    private boolean a_w = true;
-    private boolean a_p = true;
-    private boolean a_cp = true;
-    private boolean a_mach = true;
-    private boolean a_vort_mag = false;
-    private boolean a_vort_x = false;
-    private boolean a_vort_y = false;
-    private boolean a_vort_z = false;
-    private boolean a_q_criterion = false;
-    /**
-     *流场输出(Volume Output)
-     * &volume_output_variables
-     */
-    /**
-     * 输出频率(Output Freq) 默认值:100
-     */
-    private Integer volume_animation_freq=100;
-
-    /**
-     * 输出变量(Output Variables)
-     * 	X方向速度分量(X-component of velocity)			u = .true.
-     * 	Y方向速度分量(Y -component of velocity)			v= .true.
-     * 	Z方向速度分量(Z-component of velocity)			w = .true.
-     * 	压力(Press)			p = .true.
-     * 	压力系数(Pressure coefficient)			cp = .true.
-     * 	马赫数(Mach number)			mach= .true.
-     * 	涡量幅值(Vorticity magnitude)			vort_mag = .true.
-     * 	X方向涡量分量(X-component of vorticity)			vort_x = .false.
-     * 	Y方向涡量分量(Y -component of vorticity)			vort_y = .false.
-     * 	Z方向涡量分量(Z-component of vorticity)			vort_z = .false.
-     * 	Q准则(Q Criterion)			q_criterion=.true.
-     */
-    private boolean v_u = true;
-    private boolean v_v = true;
-    private boolean v_w = true;
-    private boolean v_p = true;
-    private boolean v_cp = true;
-    private boolean v_mach = true;
-    private boolean v_vort_mag = false;
-    private boolean v_vort_x = false;
-    private boolean v_vort_y = false;
-    private boolean v_vort_z = false;
-    private boolean v_q_criterion = false;
-
-    //&special_parameters//
-    /**
-     * 高级选项(Advanced Option)
-     * Special Parameters
-     */
-    private String large_angle_fix = "off";
-    //&raw_grid//
-    /**
-     *交换Y-Z轴(Swap Y-Z Axres )
-     */
-    private boolean swap_yz_axes =false;
-
-
-    public NmlParam() {
-    }
-
-    public Double getInput_version() {
-        return input_version;
-    }
-
-    public void setInput_version(Double input_version) {
-        this.input_version = input_version;
-    }
-
-    public String getNamelist_verbosity() {
-        return namelist_verbosity;
-    }
-
-    public void setNamelist_verbosity(String namelist_verbosity) {
-        this.namelist_verbosity = namelist_verbosity;
-    }
-
-    public String getProject_rootname() {
-        return project_rootname;
-    }
-
-    public void setProject_rootname(String project_rootname) {
-        this.project_rootname = project_rootname;
-    }
-
-    public String getCase_title() {
-        return case_title;
-    }
-
-    public void setCase_title(String case_title) {
-        this.case_title = case_title;
-    }
-
-    public String getGrid_format() {
-        return grid_format;
-    }
-
-    public void setGrid_format(String grid_format) {
-        this.grid_format = grid_format;
-    }
-
-    public String getData_format() {
-        return data_format;
-    }
-
-    public void setData_format(String data_format) {
-        this.data_format = data_format;
-    }
-
-    public boolean isIgnore_euler_number() {
-        return ignore_euler_number;
-    }
-
-    public void setIgnore_euler_number(boolean ignore_euler_number) {
-        this.ignore_euler_number = ignore_euler_number;
-    }
-
-    public String getAnalysis_Type() {
-        return Analysis_Type;
-    }
-
-    public void setAnalysis_Type(String analysis_Type) {
-        Analysis_Type = analysis_Type;
-    }
-
-    public String getParallel_Optional() {
-        return Parallel_Optional;
-    }
-
-    public void setParallel_Optional(String parallel_Optional) {
-        Parallel_Optional = parallel_Optional;
-    }
-
-    public Integer getNumber_of_Processors() {
-        return Number_of_Processors;
-    }
-
-    public void setNumber_of_Processors(Integer number_of_Processors) {
-        Number_of_Processors = number_of_Processors;
-    }
-
-    public String getEqn_type() {
-        return eqn_type;
-    }
-
-    public void setEqn_type(String eqn_type) {
-        this.eqn_type = eqn_type;
-    }
-
-    public Double getArtificial_compress() {
-        return artificial_compress;
-    }
-
-    public void setArtificial_compress(Double artificial_compress) {
-        this.artificial_compress = artificial_compress;
-    }
-
-    public String getViscous_terms() {
-        return viscous_terms;
-    }
-
-    public void setViscous_terms(String viscous_terms) {
-        this.viscous_terms = viscous_terms;
-    }
-
-    public Double getPrandtlnumber_molecular() {
-        return prandtlnumber_molecular;
-    }
-
-    public void setPrandtlnumber_molecular(Double prandtlnumber_molecular) {
-        this.prandtlnumber_molecular = prandtlnumber_molecular;
-    }
-
-    public String getTurb_model() {
-        return turb_model;
-    }
-
-    public void setTurb_model(String turb_model) {
-        this.turb_model = turb_model;
-    }
-
-    public String getDynamic_Mesh() {
-        return Dynamic_Mesh;
-    }
-
-    public void setDynamic_Mesh(String dynamic_Mesh) {
-        Dynamic_Mesh = dynamic_Mesh;
-    }
-
-    public Double getMach_number() {
-        return mach_number;
-    }
-
-    public void setMach_number(Double mach_number) {
-        this.mach_number = mach_number;
-    }
-
-    public Double getReynolds_number() {
-        return reynolds_number;
-    }
-
-    public void setReynolds_number(Double reynolds_number) {
-        this.reynolds_number = reynolds_number;
-    }
-
-    public Double getTemperature() {
-        return temperature;
-    }
-
-    public void setTemperature(Double temperature) {
-        this.temperature = temperature;
-    }
-
-    public String getTemperature_units() {
-        return temperature_units;
-    }
-
-    public void setTemperature_units(String temperature_units) {
-        this.temperature_units = temperature_units;
-    }
-
-    public Double getAngle_of_attack() {
-        return angle_of_attack;
-    }
-
-    public void setAngle_of_attack(Double angle_of_attack) {
-        this.angle_of_attack = angle_of_attack;
-    }
-
-    public Double getAngle_of_yaw() {
-        return angle_of_yaw;
-    }
-
-    public void setAngle_of_yaw(Double angle_of_yaw) {
-        this.angle_of_yaw = angle_of_yaw;
-    }
-
-    public Double getArea_reference() {
-        return area_reference;
-    }
-
-    public void setArea_reference(Double area_reference) {
-        this.area_reference = area_reference;
-    }
-
-    public Double getX_moment_length() {
-        return x_moment_length;
-    }
-
-    public void setX_moment_length(Double x_moment_length) {
-        this.x_moment_length = x_moment_length;
-    }
-
-    public Double getY_moment_length() {
-        return y_moment_length;
-    }
-
-    public void setY_moment_length(Double y_moment_length) {
-        this.y_moment_length = y_moment_length;
-    }
-
-    public Double getX_moment_center() {
-        return x_moment_center;
-    }
-
-    public void setX_moment_center(Double x_moment_center) {
-        this.x_moment_center = x_moment_center;
-    }
-
-    public Double getY_moment_center() {
-        return y_moment_center;
-    }
-
-    public void setY_moment_center(Double y_moment_center) {
-        this.y_moment_center = y_moment_center;
-    }
-
-    public Double getZ_moment_center() {
-        return z_moment_center;
-    }
-
-    public void setZ_moment_center(Double z_moment_center) {
-        this.z_moment_center = z_moment_center;
-    }
-
-    public String getNoninertial_Reference_Frame() {
-        return Noninertial_Reference_Frame;
-    }
-
-    public void setNoninertial_Reference_Frame(String noninertial_Reference_Frame) {
-        Noninertial_Reference_Frame = noninertial_Reference_Frame;
-    }
-
-    public String getFlux_construction() {
-        return flux_construction;
-    }
-
-    public void setFlux_construction(String flux_construction) {
-        this.flux_construction = flux_construction;
-    }
-
-    public String getFlux_construction_lhs() {
-        return flux_construction_lhs;
-    }
-
-    public void setFlux_construction_lhs(String flux_construction_lhs) {
-        this.flux_construction_lhs = flux_construction_lhs;
-    }
-
-    public String getFlux_limiter() {
-        return flux_limiter;
-    }
-
-    public void setFlux_limiter(String flux_limiter) {
-        this.flux_limiter = flux_limiter;
-    }
-
-    public Integer getFirst_order_iterations() {
-        return first_order_iterations;
-    }
-
-    public void setFirst_order_iterations(Integer first_order_iterations) {
-        this.first_order_iterations = first_order_iterations;
-    }
-
-    public String getTime_accuracy() {
-        return time_accuracy;
-    }
-
-    public void setTime_accuracy(String time_accuracy) {
-        this.time_accuracy = time_accuracy;
-    }
-
-    public String getPseudo_time_stepping() {
-        return pseudo_time_stepping;
-    }
-
-    public void setPseudo_time_stepping(String pseudo_time_stepping) {
-        this.pseudo_time_stepping = pseudo_time_stepping;
-    }
-
-    public Double getTime_step_nondim() {
-        return time_step_nondim;
-    }
-
-    public void setTime_step_nondim(Double time_step_nondim) {
-        this.time_step_nondim = time_step_nondim;
-    }
-
-    public Integer getSubiterations() {
-        return subiterations;
-    }
-
-    public void setSubiterations(Integer subiterations) {
-        this.subiterations = subiterations;
-    }
-
-    public Integer[] getSchedule_iteration() {
-        return schedule_iteration;
-    }
-
-    public void setSchedule_iteration(Integer[] schedule_iteration) {
-        this.schedule_iteration = schedule_iteration;
-    }
-
-    public Double[] getSchedule_cfl() {
-        return schedule_cfl;
-    }
-
-    public void setSchedule_cfl(Double[] schedule_cfl) {
-        this.schedule_cfl = schedule_cfl;
-    }
-
-    public Double[] getSchedule_cflturb() {
-        return schedule_cflturb;
-    }
-
-    public void setSchedule_cflturb(Double[] schedule_cflturb) {
-        this.schedule_cflturb = schedule_cflturb;
-    }
-
-    public Integer getMeanflow_sweeps() {
-        return meanflow_sweeps;
-    }
-
-    public void setMeanflow_sweeps(Integer meanflow_sweeps) {
-        this.meanflow_sweeps = meanflow_sweeps;
-    }
-
-    public Integer getTurbulence_sweeps() {
-        return turbulence_sweeps;
-    }
-
-    public void setTurbulence_sweeps(Integer turbulence_sweeps) {
-        this.turbulence_sweeps = turbulence_sweeps;
-    }
-
-    public String getLine_implicit() {
-        return line_implicit;
-    }
-
-    public void setLine_implicit(String line_implicit) {
-        this.line_implicit = line_implicit;
-    }
-
-    public Integer getSteps() {
-        return steps;
-    }
-
-    public void setSteps(Integer steps) {
-        this.steps = steps;
-    }
-
-    public Double getStopping_tolerance() {
-        return stopping_tolerance;
-    }
-
-    public void setStopping_tolerance(Double stopping_tolerance) {
-        this.stopping_tolerance = stopping_tolerance;
-    }
-
-    public Integer getRestart_write_freq() {
-        return restart_write_freq;
-    }
-
-    public void setRestart_write_freq(Integer restart_write_freq) {
-        this.restart_write_freq = restart_write_freq;
-    }
-
-    public Integer getJacobian_eval_freq() {
-        return jacobian_eval_freq;
-    }
-
-    public void setJacobian_eval_freq(Integer jacobian_eval_freq) {
-        this.jacobian_eval_freq = jacobian_eval_freq;
-    }
-
-    public String getRestart_read() {
-        return restart_read;
-    }
-
-    public void setRestart_read(String restart_read) {
-        this.restart_read = restart_read;
-    }
-
-    public Integer getAnimation_freq() {
-        return animation_freq;
-    }
-
-    public void setAnimation_freq(Integer animation_freq) {
-        this.animation_freq = animation_freq;
-    }
-
-    public boolean isA_u() {
-        return a_u;
-    }
-
-    public void setA_u(boolean a_u) {
-        this.a_u = a_u;
-    }
-
-    public boolean isA_v() {
-        return a_v;
-    }
-
-    public void setA_v(boolean a_v) {
-        this.a_v = a_v;
-    }
-
-    public boolean isA_w() {
-        return a_w;
-    }
-
-    public void setA_w(boolean a_w) {
-        this.a_w = a_w;
-    }
-
-    public boolean isA_p() {
-        return a_p;
-    }
-
-    public void setA_p(boolean a_p) {
-        this.a_p = a_p;
-    }
-
-    public boolean isA_cp() {
-        return a_cp;
-    }
-
-    public void setA_cp(boolean a_cp) {
-        this.a_cp = a_cp;
-    }
-
-    public boolean isA_mach() {
-        return a_mach;
-    }
-
-    public void setA_mach(boolean a_mach) {
-        this.a_mach = a_mach;
-    }
-
-    public boolean isA_vort_mag() {
-        return a_vort_mag;
-    }
-
-    public void setA_vort_mag(boolean a_vort_mag) {
-        this.a_vort_mag = a_vort_mag;
-    }
-
-    public boolean isA_vort_x() {
-        return a_vort_x;
-    }
-
-    public void setA_vort_x(boolean a_vort_x) {
-        this.a_vort_x = a_vort_x;
-    }
-
-    public boolean isA_vort_y() {
-        return a_vort_y;
-    }
-
-    public void setA_vort_y(boolean a_vort_y) {
-        this.a_vort_y = a_vort_y;
-    }
-
-    public boolean isA_vort_z() {
-        return a_vort_z;
-    }
-
-    public void setA_vort_z(boolean a_vort_z) {
-        this.a_vort_z = a_vort_z;
-    }
-
-    public boolean isA_q_criterion() {
-        return a_q_criterion;
-    }
-
-    public void setA_q_criterion(boolean a_q_criterion) {
-        this.a_q_criterion = a_q_criterion;
-    }
-
-    public Integer getVolume_animation_freq() {
-        return volume_animation_freq;
-    }
-
-    public void setVolume_animation_freq(Integer volume_animation_freq) {
-        this.volume_animation_freq = volume_animation_freq;
-    }
-
-    public boolean isV_u() {
-        return v_u;
-    }
-
-    public void setV_u(boolean v_u) {
-        this.v_u = v_u;
-    }
-
-    public boolean isV_v() {
-        return v_v;
-    }
-
-    public void setV_v(boolean v_v) {
-        this.v_v = v_v;
-    }
-
-    public boolean isV_w() {
-        return v_w;
-    }
-
-    public void setV_w(boolean v_w) {
-        this.v_w = v_w;
-    }
-
-    public boolean isV_p() {
-        return v_p;
-    }
-
-    public void setV_p(boolean v_p) {
-        this.v_p = v_p;
-    }
-
-    public boolean isV_cp() {
-        return v_cp;
-    }
-
-    public void setV_cp(boolean v_cp) {
-        this.v_cp = v_cp;
-    }
-
-    public boolean isV_mach() {
-        return v_mach;
-    }
-
-    public void setV_mach(boolean v_mach) {
-        this.v_mach = v_mach;
-    }
-
-    public boolean isV_vort_mag() {
-        return v_vort_mag;
-    }
-
-    public void setV_vort_mag(boolean v_vort_mag) {
-        this.v_vort_mag = v_vort_mag;
-    }
-
-    public boolean isV_vort_x() {
-        return v_vort_x;
-    }
-
-    public void setV_vort_x(boolean v_vort_x) {
-        this.v_vort_x = v_vort_x;
-    }
-
-    public boolean isV_vort_y() {
-        return v_vort_y;
-    }
-
-    public void setV_vort_y(boolean v_vort_y) {
-        this.v_vort_y = v_vort_y;
-    }
-
-    public boolean isV_vort_z() {
-        return v_vort_z;
-    }
-
-    public void setV_vort_z(boolean v_vort_z) {
-        this.v_vort_z = v_vort_z;
-    }
-
-    public boolean isV_q_criterion() {
-        return v_q_criterion;
-    }
-
-    public void setV_q_criterion(boolean v_q_criterion) {
-        this.v_q_criterion = v_q_criterion;
-    }
-
-    public String getLarge_angle_fix() {
-        return large_angle_fix;
-    }
-
-    public void setLarge_angle_fix(String large_angle_fix) {
-        this.large_angle_fix = large_angle_fix;
-    }
-
-    public boolean isSwap_yz_axes() {
-        return swap_yz_axes;
-    }
-
-    public void setSwap_yz_axes(boolean swap_yz_axes) {
-        this.swap_yz_axes = swap_yz_axes;
-    }
-}

+ 1 - 23
src/main/java/com/miniframe/tools/CaeFileUtils.java

@@ -5,7 +5,6 @@ import com.miniframe.core.exception.BusinessException;
 import com.miniframe.core.ext.UtilTools;
 import com.miniframe.model.system.SysFile;
 import com.miniframe.model.system.dao.SysFileMapper;
-import com.miniframe.solverconfig.hcfd.HcfdBoundary;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -143,28 +142,7 @@ public class CaeFileUtils {
         }
         return fileStr;
     }
-    /**
-     * mpbc line 数据封装
-     * @param mapbcStr
-     * @return
-     */
-    public static List<HcfdBoundary> readMapbcBoundary(ArrayList<String> mapbcStr){
-        List<HcfdBoundary> hcfdBoundarys = new ArrayList<HcfdBoundary>();
-        if(!mapbcStr.isEmpty()){
-            for (int i = 1; i < mapbcStr.size(); i++) {
-                String line =CaeFileUtils.stringLessDouble(mapbcStr.get(i)).trim();
-                if(line.length()>0){
-                    String[] eles =line.split(" ");
-                    HcfdBoundary hcfdBoundary =new HcfdBoundary();
-                    hcfdBoundary.setId(Integer.valueOf(eles[0]));
-                    hcfdBoundary.setConditionsCode(Integer.valueOf(eles[1]));
-                    hcfdBoundary.setName(eles[2]);
-                    hcfdBoundarys.add(hcfdBoundary);
-                }
-            }
-        }
-        return hcfdBoundarys;
-    }
+
 
     /**
      * 替换双空格

+ 1 - 5
src/main/java/com/miniframe/tools/XiJsonUtil.java

@@ -3,7 +3,6 @@ package com.miniframe.tools;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.JavaType;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import com.miniframe.solverconfig.hcfd.HcfdParam;
 
 import java.util.List;
 
@@ -50,8 +49,5 @@ public class XiJsonUtil {
             return list;
     }
 
-    public static void main(String[] args) throws JsonProcessingException {
-        String parameterObj ="{\"nmlParam\":{\"input_version\":2.2,\"namelist_verbosity\":\"off\",\"project_rootname\":null,\"case_title\":\"case_name\",\"grid_format\":\"aflr3\",\"data_format\":\"ascii\",\"ignore_euler_number\":false,\"eqn_type\":\"cal_perf_compress\",\"artificial_compress\":15.0,\"viscous_terms\":\"inviscid\",\"prandtlnumber_molecular\":0.72,\"turb_model\":\"sa\",\"mach_number\":0.5,\"reynolds_number\":1000000.0,\"temperature\":491.4,\"temperature_units\":\"Rankine\",\"angle_of_attack\":0.0,\"angle_of_yaw\":0.0,\"area_reference\":1.0,\"x_moment_length\":1.0,\"y_moment_length\":1.0,\"x_moment_center\":0.0,\"y_moment_center\":0.0,\"z_moment_center\":0.0,\"flux_construction\":\"roe\",\"flux_construction_lhs\":\"roe\",\"flux_limiter\":\"none\",\"first_order_iterations\":0,\"time_accuracy\":\"steady\",\"pseudo_time_stepping\":\"on\",\"time_step_nondim\":0.0,\"subiterations\":0,\"schedule_iteration\":[1,50],\"schedule_cfl\":[200.0,200.0],\"schedule_cflturb\":[50.0,50.0],\"meanflow_sweeps\":15,\"turbulence_sweeps\":10,\"line_implicit\":\"off\",\"steps\":100,\"stopping_tolerance\":1.0E-15,\"restart_write_freq\":250,\"jacobian_eval_freq\":10,\"restart_read\":\"off\",\"animation_freq\":100,\"a_u\":true,\"a_v\":true,\"a_w\":true,\"a_p\":true,\"a_cp\":true,\"a_mach\":true,\"a_vort_mag\":false,\"a_vort_x\":false,\"a_vort_y\":false,\"a_vort_z\":false,\"a_q_criterion\":false,\"volume_animation_freq\":100,\"v_u\":true,\"v_v\":true,\"v_w\":true,\"v_p\":true,\"v_cp\":true,\"v_mach\":true,\"v_vort_mag\":false,\"v_vort_x\":false,\"v_vort_y\":false,\"v_vort_z\":false,\"v_q_criterion\":false,\"large_angle_fix\":\"off\",\"swap_yz_axes\":false,\"parallel_Optional\":\"Serial\",\"number_of_Processors\":2,\"noninertial_Reference_Frame\":\"off\",\"analysis_Type\":\"Steady\",\"dynamic_Mesh\":\"off\"},\"hcfdBoundarys\":[]}";
-        HcfdParam param =XiJsonUtil.jsonToPojo(parameterObj,HcfdParam.class);
-    }
+
 }

+ 0 - 7
src/main/java/com/miniframe/websocket/WebsocketEndPoint.java

@@ -70,13 +70,6 @@ public class WebsocketEndPoint extends TextWebSocketHandler {
 	}
 
 	/**
-	 *
-	 *
-	 *
-	 *
-	 *
-	 *
-	 *
 	 * 客户端调用websocket.send时候,会调用该方法,进行数据通信
 	 * 
 	 * org.springframework.web.socket.WebSocketHandler#handleMessage(org.springframework.web.socket.WebSocketSession,