[Insight-users] ITK::fem vnl_vector dimensions do not match

Jorge jballesteros at motivando.me
Wed Jul 15 07:09:18 EDT 2009


Hi All!!

I've been trying to use the itk::fem package to perform a 2D Mesh
Deformation using Element2DC0LinearTriangularStrain elements. The mesh
is a 10x10 square, containing 121 points and 200 triangle cells.

Based on the FEMTruss.cxx example (Insight Applications), i have applied
the boundary Conditions and External Forces taking care of the
dimensions of the values. Once i have finished the initialization
process, i execute the Solve() method of the Solver and i get the
following error on the AssembleK() method:

vnl_error_vector_dimension:vnl_matrix::set_row: Dimensions [3] and [2]
do not match.

#0  0xb7f1e430 in __kernel_vsyscall ()
#1  0xb69af6d0 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb69b1098 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb6f6e94d in vnl_error_vector_dimension ()
   from /usr/local/lib/InsightToolkit/libitkvnl.so.3.14
#4  0xb7039e40 in vnl_matrix<double>::set_row ()
   from /usr/local/lib/InsightToolkit/libitkvnl.so.3.14
#5  0xb7c17348 in itk::fem::Element::Jacobian ()
   from /usr/local/lib/InsightToolkit/libITKFEM.so.3.14
#6  0xb7c184e4 in itk::fem::Element::GetStiffnessMatrix ()
   from /usr/local/lib/InsightToolkit/libITKFEM.so.3.14
#7  0xb7c58d59 in itk::fem::Solver::AssembleElementMatrix ()
   from /usr/local/lib/InsightToolkit/libITKFEM.so.3.14
#8  0xb7c57515 in itk::fem::Solver::AssembleK ()

I've already checked the dimensions of the forces and boundary
conditions applied. I can't figure it out what i am missing.

PD: I attached the code, including the mesh generator (from vtk), the
itkfem class, and the test file.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkFEMMesh.cxx
Type: text/x-c++src
Size: 4283 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090715/1829294d/attachment.cxx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkPolyDataToFEMMesh.cxx
Type: text/x-c++src
Size: 5080 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090715/1829294d/attachment-0001.cxx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkFEMMeshTest.cxx
Type: text/x-c++src
Size: 2923 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090715/1829294d/attachment-0002.cxx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkPolyDataToFEMMesh.h
Type: text/x-chdr
Size: 3253 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090715/1829294d/attachment.h>


More information about the Insight-users mailing list