![]() ![]() In general ARCGIS does not overides existing shapefiles and produce an error if the shapefile already exists. The process generates intermediate shapefiles. In all three cases we must provide the full paths This methods takes 3 arguments: i) a list of non point shapefiles, ii) a list of point shapefiles and iii) a temporary name. A small value will result in frequent allocations and will slow down the processes test_arc=CSGobj_v2(2,20,200,500,1) %Dim, Npoly, Nline, Npoints, usertol Since this is expected to be used for complex geometries we should provide a resonable estimation for allocating space for the various features. Next comes the initialization of the CSG object. We have to make sure that the shapefile that describes the domain is the first in the list. Next we create a list of the non point feature shapefiles (e.g. Read the shapefiles streams = shaperead() Īdd the required fileds for i = 1:size(streams,1)Īnd write the shapefiles: shapewrite(streams, ) As in the previous example we will define a minimum size element around the wells/streams equal to 5/30 m and linear increase to 200/200 m after 250/250 m distance respectively. We want to define a refinement for the streams and wells. To do so we need to read the shapefiles, add the required fields, and write the shapefiles. If we want to instruct gmsh to refine the mesh around the features we have to define 4 fields for each feature in the same manner as it was done in a previous example. In this folder there are 4 shapefile, which a are self explainatory You need of course to change the msim_root with your mSim path. ![]() The data for the domain are in the folder msim_root = 'e:\mSim_code\' ĭata_path = In this example we will generate a mesh for following domain: Therefore you need to edit the msim_python.m file ans specify the path: arcpy_path = 'c:\Python27\ArcGIS10.2\' In our example this was the folder 'c:\Python27\ArcGIS10.2\'. To be able to run Arcpy commands one has to define inside the script the executable of Arcpy. This function is used to execute python scripts from Matlab. In the folder mUtil there is a function named msim_python. Note that the script is called from Matlab. ![]() To use the ARCGIS we have written a small python script that executes a series of ARCGIS commands. ARCGIS has its own GUI, nevertheless all its functionalities can be scripted in several languages (python, C , VBA etc.). Assuming that the complex domain is descibed by shapefiiles (this was our case) we use the functions of ARCGIS to create quite fast a CSG object. Because we have dealt with this situation, where the class CGSobj_v2 takes very long to create the CGS object, we use ARCGIS to overcome this. However for very complex problems it becomes very inefficient and time consuming. For problems with features on the order of several thousands the class CGSobj_v2 is quite fast. However the methods of this class perform many checks every time a new line or point is added to the geometry. ![]() In the previous example we explained how to create the Gmsh input file using the mSim Matlab class CGSobj_v2. DS(font: Helv 12.0pt font-stretch:Normal text-align:left color:#000000 ) ![]()
0 Comments
Leave a Reply. |