Am Montag, den 15.08.2011, 08:03 -0600 schrieb John Peterson:
> On Fri, Aug 12, 2011 at 4:21 AM, robert <robert.bod...@unil.ch> wrote:
> > Hello,
> >
> > again, I have a question as far as reading meshes with tetgen is
> > concered.
> > I read a mesh by
> >
> > Mesh new_mesh;
> > EquationSystems new_equation_systems (new_mesh);
> > TetGenIO TETGEN(new_mesh);
> >
> > OStringStream inmesh;
> > inmesh<<"geometry_wings/export_pov/out/"<<ReadMesh[actual_pulse]<<"_box.1.ele";
> > TETGEN.read(inmesh.str().c_str());
> >
> > Afterwards, if I look at the equation system I get n_dofs() = 0;
> 
> This makes sense, you haven't added any Systems to your
> EquationSystems object.  All the n_dofs() function does is loop over
> the Systems stored in the EquationSystems object and add up the dofs
> of each...
> 




But even if I add a system I get the same: 

Mesh new_mesh;
TetGenIO TETGEN(new_mesh);
                  
{  // read TETGEN file
        OStringStream inmesh; 
        inmesh<<"geometry_wings/export_pov/out/"<<
                ReadMesh[actual_pulse]<<"_box.1.ele";
        TETGEN.read(inmesh.str().c_str());
          }  /// ---
         
EquationSystems new_equation_systems (new_mesh);

//  set_processor_id(new_mesh,0);  // manually set the processor_id


new_mesh.print_info();
      

          TransientLinearImplicitSystem & T_system =
new_equation_systems.add_system<TransientLinearImplicitSystem>("Diffusion");
          
        
T_system.add_variable ("T", FIRST);
        
          
T_system.attach_assemble_function (assemble_cd);
          
T_system.attach_init_function (init_geothermal_gradient);
          
new_equation_systems.init ();

new_equation_systems.print_info();


In addition to the sample code above I have added two more systems which
are explicit.
With new_equation_systems.print_info() I get the following output for
the System Diffusion : 

System "Diffusion"
    Type "TransientLinearImplicit"
    Variables="T" 
    Finite Element Types="LAGRANGE" 
    Approximation Orders="FIRST" 
    n_dofs()=0
    n_local_dofs()=0
    n_constrained_dofs()=0
    n_vectors()=3
    DofMap Sparsity
      Average  On-Processor Bandwidth = 0
      Average Off-Processor Bandwidth = 0
      Maximum  On-Processor Bandwidth = 0
      Maximum Off-Processor Bandwidth = 0
    DofMap Constraints
      Number of Constraints = 0


> 
> > Up to now I have looped through the nodes and
> >
> >  MeshBase::node_iterator               nd              = mesh.nodes_begin();
> >  const MeshBase::node_iterator end_nd  = mesh.nodes_end();
> >
> > int proc = 0;
> >  for ( ; nd != end_nd; ++nd){
> >          Node* NOD = *nd;
> >          NOD->processor_id() = proc;
> >
> >  }
> >
> > My question now is, if the code still works in parallel?
> 
> Probably, but the real question is why you'd want to do this.  If you
> are running in parallel it will almost certainly screw up the domain
> decomposition which has been determined by the Partitioner classes...
> 
Well, because if I do it then I get the following: 

System "Diffusion"
    Type "TransientLinearImplicit"
    Variables="T" 
    Finite Element Types="LAGRANGE" 
    Approximation Orders="FIRST" 
    n_dofs()=91976
    n_local_dofs()=91976
    n_constrained_dofs()=0
    n_vectors()=3
    DofMap Sparsity
      Average  On-Processor Bandwidth = 14.8131
      Average Off-Processor Bandwidth = 0
      Maximum  On-Processor Bandwidth = 206
      Maximum Off-Processor Bandwidth = 0
    DofMap Constraints
      Number of Constraints = 0




Furthermore, I have another question. I recently discussed with the
responsible person for the 'blue gene/p' computer which we have here at
university. He told me that for libraries like Petsc they often have
problems to get it work on multiple clusters. Do you have any experience
with this kind of supercomputer and libmesh? The responsible professor
doesn't know libmesh and this was one of the first questions he asked. 


Thanks a lot, 
Robert 


------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to