Ejemplo n.º 1
0
 public BoraToUnvConvert(String unvFile, BSubMesh submesh) {
   this.unvWriter = new UNVGenericWriter(unvFile);
   for (Constraint cons : submesh.getConstraints()) {
     BCADGraphCell cell = cons.getGraphCell();
     BDiscretization d = cell.getDiscretizationSubMesh(submesh);
     mapDiscretizations.put(d.getId(), d);
   }
 }
Ejemplo n.º 2
0
 private static Map<String, Collection<BDiscretization>> buildMeshData(String xmlBoraDir)
     throws SAXException, IOException {
   BModel bModel = BModelReader.readObject(xmlBoraDir);
   Map<String, Collection<BDiscretization>> meshData =
       new HashMap<String, Collection<BDiscretization>>();
   for (BSubMesh subMesh : bModel.getSubMeshes()) {
     for (Constraint cons : subMesh.getConstraints()) {
       BDiscretization discr = cons.getGraphCell().getDiscretizationSubMesh(subMesh);
       if (discr == null) continue;
       String group = cons.getGroup();
       if (group == null) group = "DEFAULT_GROUP";
       Collection<BDiscretization> gDiscr = meshData.get(group);
       if (gDiscr == null) {
         gDiscr = new ArrayList<BDiscretization>();
         meshData.put(group, gDiscr);
       }
       gDiscr.add(discr);
     }
   }
   return meshData;
 }