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
------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users