|
From: Andy A. <ad...@sc...> - 2014-07-31 20:09:35
|
I have two bits of advice to start.
First, can you find a smaller piece of code that shows the error.
Next, that code is really old, can you try:
fmdl= ng_mk_cyl_models(1,[],[]);
What does that give?
--
Andy Adler <ad...@sc...> +1-613-520-2600x8785
On 31 July 2014 11:35, 李日辉 <li...@ma...> wrote:
> Hi everyone,
>
> I'm trying to run the"Build Single Plane Models with Netgen"in my PC with
> a 64 bit version of windows and netgen 5.0 installed. The version of EIDORS
> is 3.6 and the Matlab is R2009b. The code is as follow:
>
> % Build model
>
> % $Id: build_single_plane01.m,v 1.4 2007/09/21 19:07:47 aadler Exp $
>
>
>
> % Choose Parameters
>
> electrodes_per_plane= 16;
>
> number_of_planes= 1;
>
> refine_electrodes= 10;
>
> tank_radius= 15;
>
> tank_height= 10;
>
> electrode_width = 0.5;
>
> electrode_height= 0.5;
>
> rect_or_circ_electrode= 'C';
>
>
>
>
>
> fname ='tank_mdl';
>
>
>
> first_plane_starts= tank_height/(number_of_planes+1);
>
> height_between_centres = first_plane_starts;
>
>
>
> [fmdl,centres] = create_tank_mesh_ng( ...
>
> tank_radius, tank_height, ...
>
> rect_or_circ_electrode, ...
>
> log2(electrodes_per_plane), ...
>
> number_of_planes, ...
>
> first_plane_starts, ...
>
> height_between_centres, ...
>
> electrode_width, electrode_height, ...
>
> fname, refine_electrodes );
>
>
>
> % The msz file was created here can be reused later
>
> msz_file= [fname, '.msz'];
>
> stim_pat= mk_stim_patterns(electrodes_per_plane, number_of_planes, ...
>
> '{ad}','{ad}',{'meas_current'});
>
>
>
> % control mesh refinement: options are '-veryfine'; '-fine'; '';
>
> for finemodels= 0:2
>
> if finemodels==0; finelevel= '';
>
> elseif finemodels==1; finelevel= '-fine';
>
> elseif finemodels==2; finelevel= '-veryfine';
>
> end
>
>
>
> if ~isempty(finelevel);
>
> call_netgen([fname,'.geo'],[fname,'.vol'],msz_file, finelevel);
>
> end
>
>
>
> [fmdl,mat_idxs]= ng_mk_fwd_model( [fname,'.vol'], centres, [], stim_pat);
>
>
>
> if finemodels==0; ng_mdl_16x1_coarse= fmdl;
>
> elseif finemodels==1; ng_mdl_16x1_fine = fmdl;
>
> elseif finemodels==2; ng_mdl_16x1_vfine = fmdl;
>
> end
>
>
>
> subplot(311);
>
> show_fem( fmdl); view(0,14);
>
>
>
> subplot(312);
>
> show_fem( fmdl); view(0,0);
>
> crop_model(gca, inline('y>0','x','y','z'))
>
>
>
> subplot(313);
>
> show_fem( fmdl); view(0,0);
>
> crop_model(gca, inline('y>-10','x','y','z'))
>
> set(gca,'Xlim',[-2,2],'Zlim',[-1,1]+first_plane_starts);
>
>
>
> print('-r100','-dpng', ...
>
> sprintf('build_single_plane01%c.png',96+finemodels));
>
> end
>
> save ng_mdl_16x1_coarse.mat ng_mdl_16x1_coarse
>
> save ng_mdl_16x1_fine.mat ng_mdl_16x1_fine
>
> save ng_mdl_16x1_vfine.mat ng_mdl_16x1_vfine
>
>
>
> However,when I started to run the code,there always got an error message.
> The error information shows as follows:
>
> ??? Error using ==> ng_mk_fwd_model>construct_fwd_model at 65
>
> Failed to find all the electrodes
>
>
> Error in ==> ng_mk_fwd_model at 39
>
> fwd_mdl= construct_fwd_model(srf,vtx,simp,bc, name, ...
>
>
> Error in ==> create_tank_mesh_ng at 210
>
> tank_mdl= ng_mk_fwd_model( meshfn, centres, ...
>
>
> Error in ==> Netgen_2D at 20
>
> [fmdl,centres] = create_tank_mesh_ng( ...
>
>
> Is something wrong with the EIDORS or the code? I am looking forward to
> your reply.
>
> Thank you for your help!
>
> Best regards,
> Eric
>
>
>
> ------------------------------------------------------------------------------
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls.
> Build a bridge from your legacy apps to the future.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
> _______________________________________________
> eidors3d-help mailing list
> eid...@li...
> https://lists.sourceforge.net/lists/listinfo/eidors3d-help
>
>
|