From: Andy A. <ad...@sc...> - 2011-06-03 15:44:55
|
Hi Russel and Bartek, I agree with this. Let's add mat_idx and fc to the models that come out of the ng*models functions. Now we need to decide what to call them: How about material_idx, and boundary_numbers Russell, do you have svn commit priveledges? -- Andy Adler <ad...@sc...> +1-613-520-2600x8785 On 3 June 2011 06:27, Russell Miller <rus...@ma...> wrote: > Hi Bartek, > > This sounds good. We would also need to add fc as an output argument to any > function that calls ng_mk_fwd_model (I have actually been calling > ng_mk_gen_models to create my finite forward model). > > Best, > > Russell > > > On Friday 03 Jun 2011 11:20:57 Bartek Grychtol wrote: >> Hi All, >> >> Once we're discussing ng_mk_fwd_model it's worth having a look at the >> mat_indices too. At the moment, the signature is >> >> [fwd_mdl, mat_indices] = ng_mk_fwd_model(...); >> >> But if there is more than one material in the model, it makes sense to >> put them into fwd_mdl.mat_idx and this is what the recent mk_GREIT_model >> function does. >> I presume the original argument for not doing it this way was not to >> inflate the size of the fmdl structure unnecessary. (But what about >> conditional inclusion?) >> >> Following the same argument, we should only put the face numbers in the >> fmdl if they are useful, so I think the best way would be for >> ng_mk_fwd_model to pass 'fc' out as an output (like mat_indices is now) >> and to request and handle them as needed in the calling functions. >> >> On the other hand, mat_indices are always useful if there's more than >> one material, so I would advocate including them in the fmdl structure >> in that case, but we would probably have to keep it in the output as >> well to avoid breaking a lot of code. >> >> Best, >> >> Bartek >> >> On 03/06/2011 12:01, Russell Miller wrote: >> > Hi Andy, >> > >> > I don't think my last post was clear, sorry. As far as I am aware, >> > netgen does not have infinite elements but I have been working on some >> > code that adds them to a simple EIDORS forward model after the simple >> > model has been meshed by netgen. >> > >> > The main problem is defining which boundaries need the infinite >> > elements (i.e. for a half-space this would be all boundaries except >> > the top surface). I think the best way to define which boundaries need >> > infinite elements is to have a number for each boundary (or >> > face/surface) and then the modeller can choose which faces require >> > infinite elements (I am also in the process of writing a function that >> > builds a half-space model using netgen then automatically adds >> > infinite elements on the correct faces). >> > >> > Fortunately, I have found that netgen numbers the surfaces of a given >> > object and these are the numbers that are stored in the variable "fc" >> > in construct_fwd_model. I just need this variable fc to be assigned as >> > a field of the fwd_model structure in the mg_mk_fwd_model function so >> > that when I build my initial (finite) model using ng_mk_gen_models I >> > can then append infinite elements to the correct boundaries. >> > >> > I have made a local copy of ng_mk_fwd_model.m in which I have added to >> > the following lines (additions in bold): >> > >> > [srf,vtx,fc,bc,simp,edg,mat_ind] = ng_read_mesh(ng_vol_filename); >> > >> > ... >> > >> > fwd_mdl= construct_fwd_model(srf,vtx,simp,bc, name, ... >> > >> > stim_pattern, centres, z_contact,fc); >> > >> > ... >> > >> > mdl.nodes = vtx; >> > >> > mdl.elems = simp; >> > >> > mdl.boundary = srf; >> > >> > mdl.boundary_numbers = fc; >> > >> > mdl.gnd_node= find_centre_node(vtx); >> > >> > mdl.np_fwd_solve.perm_sym = '{n}'; >> > >> > mdl.name = name; >> > >> > ... >> > >> > My question is: can you add these same lines of code to the svn >> > version of EIDORS so that I can access the surface numbers in order to >> > append the infinite elements to the correct surfaces? Adding an extra >> > field to the fwd_model structure shouldn't cause any bugs in existing >> > code if the field has never been used before. >> > >> > Thanks, >> > >> > Russell >> > >> > Hi Russell, >> > I didn't even know that netgen does infinite elements. To start us off >> > discussing how to do it, could you send an example (ie. a netgen geo >> > file that makes infinite elements). >> > This is definitely useful stuff. We just need to figure out how to >> > do it most easily, without breaking older code. >> > Thanks >> > -- >> > Andy Adler <adler@...> +1-613-520-2600x8785 >> > On 2 June 2011 07:47, Russell Miller >> > >> > <russell.miller@...> wrote: >> > > Hi Andy, >> > > >> > > I've been working code to introduce infinite elements to solve forward >> > > problems in half-space domains. I think the best way to choose on which >> > > boundary faces I need to "append" the infinite elements is to have the >> > > face numbers (or surfnr) as they are called in the NETGEN .vol output >> > > files. I have noticed that the function ng_read_mesh.m does get these >> > > values and stores them in a variable called fc but then >> > > ng_mk_fwd_model does not pass these values to construct_fwd_model. >> > > >> > > Basically, my question is: Can we modify ng_mk_fwd_model so that the >> > > fwd_model structure has a field that store the face numbers so that >> > > they can be cross- referenced with the fwd_model.boundary field? >> > > >> > > Best regards, >> > > >> > > Russell Miller >> > >> > ------------------------------------------------------------------------- >> > ----- Simplify data backup and recovery for your virtual environment with >> > vRanger. Installation's a snap, and flexible recovery options mean your >> > data is safe, secure and there when you need it. Discover what all the >> > cheering's about. Get your free trial download today. >> > http://p.sf.net/sfu/quest-dev2dev2 >> > >> > >> > _______________________________________________ >> > eidors3d-help mailing list >> > eid...@li... >> > https://lists.sourceforge.net/lists/listinfo/eidors3d-help > > ------------------------------------------------------------------------------ > Simplify data backup and recovery for your virtual environment with vRanger. > Installation's a snap, and flexible recovery options mean your data is safe, > secure and there when you need it. Discover what all the cheering's about. > Get your free trial download today. > http://p.sf.net/sfu/quest-dev2dev2 > _______________________________________________ > eidors3d-help mailing list > eid...@li... > https://lists.sourceforge.net/lists/listinfo/eidors3d-help > |