Hi,
using libmesh 0.6.2 compiled with support for second derivatives the following
program crashes:
// ======= code below ====== //
#include "libmesh.h"
#include "mesh.h"
#include "mesh_generation.h"
#include "equation_systems.h"
#include "fe.h"
#include "linear_implicit_system.h"
#include "transient_system.h"
#include "elem.h"
Number initial_values( Point const& p, Parameters const& parameters,
std::string const& sys_name, std::string const&
unknown_name )
{
return 0.0;
}
int main( int argc, char** argv )
{
libMesh::init (argc, argv);
{
Mesh mesh( 1 );
MeshTools::Generation::build_line( mesh, 100, -0.5, 0.5, EDGE3 );
EquationSystems equation_systems( mesh );
TransientLinearImplicitSystem& system
= equation_systems.add_system<TransientLinearImplicitSystem>( "test" );
// system.add_variable( "u", FIRST, LAGRANGE ); // fine
system.add_variable( "u", FIRST, XYZ ); // crash
equation_systems.init ();
system.project_solution( initial_values, 0, equation_systems.parameters );
}
return libMesh::close ();
}
// ===== end of code ======= //
The error is an invalid read attempt in fe_map.C, see below:
error: attempt to subscript container with out-of-bounds index 0, but container
only holds 0 elements.
#5 0x0000002a95abc368 in FEBase::compute_single_point_map (this=0x5697b0,
[EMAIL PROTECTED], elem=0x549d70, p=0)
at src/fe/fe_map.C:64
#6 0x0000002a95abe56c in FEBase::compute_affine_map (this=0x5697b0, [EMAIL
PROTECTED], elem=0x549d70) at src/fe/fe_map.C:424
#7 0x0000002a95abe149 in FEBase::compute_map (this=0x5697b0, [EMAIL
PROTECTED], elem=0x549d70) at src/fe/fe_map.C:481
#8 0x0000002a959e6229 in FE<1u, (libMeshEnums::FEFamily)5>::reinit
(this=0x5697b0, elem=0x549d70, pts=0x0)
at src/fe/fe.C:209
#9 0x0000002a95a3a953 in FEXYZ<1u>::reinit (this=0x5697b0, elem=0x549d70,
pts=0x0)
at /home/wenig/src/libmesh-0.6.2/include/fe/fe.h:606
#10 0x0000002a95e338f3 in System::project_vector (this=0x54e610,
fptr=0x411388 <initial_values(Point const&, Parameters const&, std::string
const&, std::string const&)>, gptr=0,
[EMAIL PROTECTED], [EMAIL PROTECTED]) at
src/solvers/system_projection.C:1057
#11 0x0000002a95e34732 in System::project_solution (this=0x54e610,
fptr=0x411388 <initial_values(Point const&, Parameters const&, std::string
const&, std::string const&)>, gptr=0,
[EMAIL PROTECTED]) at src/solvers/system_projection.C:541
#12 0x0000000000411624 in main (argc=1, argv=0x7fbfffe628) at test.C:34
Second derivatives are not supported for the XYZ family, but the program
doesn't actually use them, so maybe this should work?
How would you implement second derivatives for the XYZ family? Just
implementing the corresponding functions in fe_xyz_shape_?D.C can't be enough,
as these functions are not even called in the example above...
Regards,
Georg
_______________________________________________________________________
Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=022220
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users