Hi all,

Sorry to bring this up again.

Since writing/reading restarting file should be a routine job for
libmesh-0.9.3, so what is the typical way to do it, if some systems have to
be attached with dirichlet_boundary info?

1) Is it possible that system's dirichlet BC info. can also be put in the
restarting file? if so, how to write this info. into restarting files?

2) Could I let the system be associated with dirichlet bc *after* the
equation-systems finishes reading the restarting file?

Thanks,

Walter


On Tue, Aug 19, 2014 at 2:10 PM, walter kou <[email protected]> wrote:

> Dear all,
>
>  I need to read restarting file into equations_systems and also
> associating dirichlet bc_id to one system. I tried two ways for libmesh
> 0.9.3 and failed (strangely, the first way works for libmesh0.8.0).
>
> *Does anyone can help me with the fix? My two ways are as follow:*
>
> *1) The first way: deal with bc_id first and then read restart_file. (This
> works for libmesh 0.8.0)*
>
> EquationSystems equation_systems(mesh);
>
> // >> begin to attach dirichlet_bc
>  TransientLinearImplicitSystem & system
> =equation_systems.add_system<TransientLinearImplicitSystem> ("Elasticity");
> //.... define bc_id, variables
>
> system.get_dof_map().add_dirichlet_boundary(dirichlet_bc);
> equation_systems.init();
>
> // >> begin read restart_file
> equation_systems.read(file_name.str(), libMeshEnums::READ);
> equation_systems.update();
>
> // end
>
> The error is:
> READING THE FILE "restart_0002.xda" FAILED.
> It is possible this file contains infinite element information,
> but the version string does not contain " with infinite elements"
> Let's try this again, but looking for infinite element information...
>
>  [5] ./include/libmesh/dof_object.h, line 938, compiled May 23 2014 at
> 18:37:33
> ERROR: Unknown system type:
> [5] src/systems/equation_systems.C, line 411, compiled May 23 2014 at
> 18:38:45
>
> *2) The second way: read restart_file first and then deal with bc_id*
>
> equation_systems.read(file_name.str(), libMeshEnums::READ);
> equation_systems.update();
>
> // then get system, get variable, add bc
>
> TransientLinearImplicitSystem & system =
>         equation_systems.get_system<TransientLinearImplicitSystem>
> ("Elasticity");
> unsigned int u_var = system.variable_number("u");
> system.get_dof_map().add_dirichlet_boundary(dirichlet_bc);
> equation_systems.update();
>
> // Error:
>   The solver does not converge, as the dirichlet boundary does not take
> effect in system.
>
>
> Thanks,
>
> Walter
>
>
>
>
>
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to