Typing

equation_systems.read("./eq_output", READ, EquationSystems::READ_DATA |
EquationSystems::READ_ADDITIONAL_DATA, true)

gives me this message error

*********************************************************************

READING THE FILE "./EQ_output" 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...

*********************************************************************

Assertion `cnt < io_buffer.size()' failed.

cnt = 0

io_buffer.size() = 0

[New LWP 15756]

[Thread debugging using libthread_db enabled]

0x00002aaabc37869d in __libc_waitpid (pid=<value optimized out>,
stat_loc=<value optimized out>, options=<value optimized out>) at
../sysdeps/unix/sysv/linux/waitpid.c:41

41      int result = INLINE_SYSCALL (wait4, 4, pid, stat_loc, options,
NULL);

#0  0x00002aaabc37869d in __libc_waitpid (pid=<value optimized out>,
stat_loc=<value optimized out>, options=<value optimized out>) at
../sysdeps/unix/sysv/linux/waitpid.c:41

#1  0x00002aaabc30a609 in do_system (line=<value optimized out>) at
../sysdeps/posix/system.c:149

#2  0x00002aaabc30a940 in __libc_system (line=<value optimized out>) at
../sysdeps/posix/system.c:190

#3  0x00002aaaad083057 in (anonymous namespace)::gdb_backtrace
(out_stream=...) at src/base/print_trace.C:145

#4  0x00002aaaad082799 in libMesh::print_trace (out_stream=...) at
src/base/print_trace.C:192

#5  0x00002aaaad07db66 in libMesh::MacroFunctions::report_error
(file=0x2aaaae3cda54 "src/systems/system_io.C", line=669,
date=0x2aaaae3cd5ec "Nov  9 2015", time=0x2aaaae3cd600 "16:34:15") at
src/base/libmesh_common.C:82

#6  0x00002aaaadc349b9 in libMesh::System::read_parallel_data
(this=0x85a0c0, io=..., read_additional_data=true) at
src/systems/system_io.C:669

#7  0x00002aaaadbc000d in libMesh::EquationSystems::_read_impl(const
std::string &, enum libMesh::XdrMODE, unsigned int, bool)
(this=0x7fffffffc138, name="./EQ_output", mode=libMesh::READ,
read_flags=22, partition_agnostic=true) at
src/systems/equation_systems_io.C:359

#8  0x00002aaaadbbead8 in libMesh::EquationSystems::read(const std::string
&, enum libMesh::XdrMODE, unsigned int, bool) (this=0x7fffffffc138,
name="./EQ_output", mode=libMesh::READ, read_flags=6,
partition_agnostic=true) at src/systems/equation_systems_io.C:123

#9  0x00000000004c9228 in libMesh::EquationSystems::read
(this=0x7fffffffc138, name="./EQ_output", mode=libMesh::READ, read_flags=6,
partition_agnostic=true) at
/g/g92/miguel/code/libmesh_install_miguel/include/libmesh/equation_systems.h:339

#10 0x00000000004a7c28 in main (argc=7, argv=0x7fffffffd7f8) at
vector_fe_ex1.C:783

I definitely don't have infinite elements. My systems are

// Build an auxiliary explicit system for the densities

    ExplicitSystem & densities =
equation_systems.add_system<ExplicitSystem> ("Densities");

    // Add a zeroth order monomial variable that will represent the
densities

    densities.add_variable("rho", CONSTANT, MONOMIAL);

    // Declare the Elasticity system and its variables.

    TopOptSystem& system = equation_systems.add_system<TopOptSystem>
("Elasticity");

    // VonMises system to calculate the von mises stress at the very end

    ExplicitSystem & vonmises_system =
equation_systems.add_system<ExplicitSystem> ("VonMises");

    vonmises_system.add_variable("vonmises", CONSTANT, MONOMIAL);

TopOptSystem is a class derived from FEMSystem with a one LAGRANGE_VEC
variable..

Thanks
Miguel

On Mon, 16 Nov 2015, Miguel Angel Salazar de Troya wrote:

My idea is to output an EquationSystems after a simulation in which I might
> have refined/coarsened the mesh and calculated the solutions of the
> System's. I would like to have the option to read that output and restart
> the simulation where I left it off. So far what I've done is simply this
>
> equation_systems.write("eq_output ")
>
> And then to read it
>
> equation_systems.read("eq_output ")
>
> But for some reason, the dofs of my Systems are doubled. I was thinking it
> might be because I create all the Systems, init() them and then I make a
> check to see if I want to read "eq_output" . That could the reason, but I
> don't want to include all the calls to add_system() inside of a huge
> conditional. Is there any way to do this in a cleaner way? Maybe an
> overwrite flag to pass to EquationSystems::read()
>

I believe you'll want something like

libMesh::EquationSystems::READ_DATA |
libMesh::EquationSystems::READ_ADDITIONAL_DATA

for the flags.  Leaving off READ_HEADER tells the read() method that
you've already set up the systems yourself and it shouldn't try to do
so from the restart file headers.
---
Roy
------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to