ReadN3s::ReadN3s(int argc, char *argv[]) { char buf[255], buf1[255]; char buf2[255]; int i; char *geo_data_path; char *res_data_path; set_module_description("Generic ASCII-File Reader for N3S 3.2"); // the output port unsgridPort = addOutputPort("mesh", "coDoUnstructuredGrid", "geometry "); for (i = 0; i < MAX_PORTS_N3S; i++) { sprintf(buf, "dataport%d", i + 1); dataPort[i] = addOutputPort(buf, "coDoVec3 | coDoFloat | DO_Unstructured_V2D_Data | coDoVec2", buf); } // select the OBJ file name with a file browser geoFileParam = addFileBrowserParam("n3s geofile", "N3S geofile"); resFileParam = addFileBrowserParam("n3s result file", "N3S result file"); char *cov_path = getenv("COVISEDIR"); geo_data_path = new char[255]; res_data_path = new char[255]; if (cov_path) { sprintf(geo_data_path, "%s/data/n3s/* ", cov_path); sprintf(res_data_path, "%s/data/n3s/* ", cov_path); } else { sprintf(geo_data_path, "./* "); sprintf(res_data_path, "./* "); } cerr << "buf: " << geo_data_path << endl; geoFileParam->setValue(geo_data_path, "geom"); resFileParam->setValue(res_data_path, "post.res"); // resFileParam->setValue("post.res result", buf); return; choice_of_data[0] = new char[10]; // die gibt's immer strcpy(choice_of_data[0], "(none)\n"); for (i = 0; i < MAX_PORTS_N3S; i++) { sprintf(buf1, "data%d", i); sprintf(buf2, "select data%d", i); choiceData[i] = addChoiceParam(buf1, buf2); choiceData[i]->setValue(1, choice_of_data, 1); } }
ModifyAddPart::ModifyAddPart() { int i; // no. of attached vents to cabin numVents = 0; // no. of read directories for vent description // default nothing numVentDirs = 1; for (i = 0; i < MAX_NAMES; i++) ventdirs[i] = NULL; // init some defaults for (i = 0; i < MAX_VENTS; i++) { fileid[i] = 0; exist[i] = 0; } // declare the name of our module set_module_description("Add parts to the Cabin"); // paramter for vent directory structure p_ventDir = addStringParam("ventPath", "Path for vent descriptions"); p_ventDir->setValue("data/visit/icem/test"); ventFilePath = "data/visit/icem/test"; // get the directory structure for all vents in given path getVentDirs(); // create the COVISE parameter // user can set a subdirectory for vents createVentParam(); // what do you want to calculate p_action = addChoiceParam("Set Action", "select the action"); p_action->setValue(nAction, action, currAction); // tetin object describing the cabin inTetin = addInputPort("tetinObj", "DO_Tetin", "coTetin object"); inTetin->setRequired(1); // output objects for transfer directory and vent polygons solverText = addOutputPort("solverText", "coDoText", "Command for StarCD"); outPolygon = addOutputPort("polygon_set", "coDoPolygons", "Geometry output"); prostarData = addOutputPort("prostarData", "coDoText", "Part data for Prostar"); }
Lic::Lic() { // this info appears in the module setup window set_module_description("LIC testing device"); //parameters //resolution = addInt32Param("Resolution", "resolution"); pixImgWidth = addInt32Param("Width", "width of pixel image"); pixImgHeight = addInt32Param("Height", "height of pixel image"); pixelSize = addInt32Param("Pixel Size", "bytes per pixel"); //domainSize = addFloatParam("Domain Size", "size"); scaleQuad = addFloatParam("Scale Quad", "quad size"); //const int defaultDim = 2; //resolution->setValue(defaultDim); const int defaultWidth = 8; pixImgWidth->setValue(defaultWidth); const int defaultHeight = 8; pixImgHeight->setValue(defaultHeight); const int defaultPixelSize = 4; pixelSize->setValue(defaultPixelSize); //const float defaultSize = 1.0; //domainSize->setValue(defaultSize); const float defaultSQ = 1.1; scaleQuad->setValue(defaultSQ); // the input ports polygonInPort = addInputPort("polygonIn", "coDoPolygons", "Polygons"); //vectorInPort = addInputPort("vectorIn","coDoVec3",\ "Vector Data"); // the output ports polygonOutPort = addOutputPort("polygonOut", "coDoPolygons", "Polygons"); packageOutPort = addOutputPort("packageOut", "coDoPolygons", "2D Triangle Patch"); textureOutPort = addOutputPort("textureOut", "coDoTexture", "Lic Texture"); }
Fenfloss::Fenfloss(int argc, char *argv[]) :coSimLib(argc, argv, argv[0], "Simulation coupling") { char *pfn; ////////// set up default parameters #ifdef VERBOSE cerr << "##############################" << endl; cerr << "##### Fenfloss " << endl; cerr << "##### PID = " << getpid() << endl; cerr << "##############################" << endl; #endif #ifndef YAC set_module_description("Fenfloss Simulation"); #endif SetDebugPath(coCoviseConfig::getEntry("Module.IHS.DebPath").c_str(),getenv(ENV_IHS_DEBPATH)); /* SetDebugLevel(0); if (getenv(ENV_IHS_DEBUGLEVEL)) SetDebugLevel(atoi(getenv(ENV_IHS_DEBUGLEVEL))); */ if ((pfn = CreateFileNameParam(coCoviseConfig::getEntry("value","Module.IHS.DebPath","/tmp/").c_str(), ENV_IHS_DEBPATH, coCoviseConfig::getEntry("value","Module.IHS.DebFile","Fenfloss.deb").c_str(), CFNP_NORM)) != NULL) { dopen(pfn); free(pfn); } // Parameters std::string dataPath; #ifdef WIN32 const char *defaultDir = getenv("USERPROFILE"); #else const char *defaultDir = getenv("HOME"); #endif if(defaultDir) dataPath=coCoviseConfig::getEntry("value","Module.IHS.DataPath",defaultDir); else dataPath=coCoviseConfig::getEntry("value","Module.IHS.DataPath","/data/IHS"); dprintf(2, "Fenfloss::Fenfloss(): dp = %s\n", dataPath.c_str()); Fenfloss::CreateUserMenu(); // Input ports : yet only parallel ones allowed p_grid = addInputPort("distGrid","UnstructuredGrid","Distributed Grid"); p_boco = addInputPort("distBoco1","USR_DistFenflossBoco","Distributed Boundary Cond"); p_boco2 = addInputPort("distBoco2","USR_DistFenflossBoco","Distributed Boundary Cond"); p_boco2->setRequired(0); p_in_bcin = addInputPort("bcin","Polygons","Boundary surface of inlet(IN)"); p_in_bcin->setRequired(0); // Output ports p_velocity = addOutputPort("velocity","Vec3","Geschwindigkeit"); p_press = addOutputPort("p","Float","Druck"); p_turb = addOutputPort("turb","Float","Turbulen"); p_out_bcin = addOutputPort("out_bcin","Polygons","Boundary surface of inlet(OUT)"); // not yet started stepNo = -1; // No object yet received d_distGridName = new char [1]; d_distGridName[0] = '\0'; d_distBocoName = new char [1]; d_distBocoName[0] = '\0'; #ifdef HAVE_GLOBUS globus_module_activate(GLOBUS_COMMON_MODULE); globus_module_activate(GLOBUS_SOAP_MESSAGE_MODULE); #endif }