On Thu, Apr 28, 2011 at 4:52 AM, Robert <[email protected]> wrote:
> Hello,
>
> when trying to build against VTK I had to modify the libmesh-Makefiles
> to make it work:
>
> Index: m4/vtk.m4
> ===================================================================
> --- m4/vtk.m4 (Revision 4437)
> +++ m4/vtk.m4 (Arbeitskopie)
> @@ -111,7 +111,7 @@
> dnl If both the header file and the required libs were found, continue.
> if (test $enablevtk = yes); then
> VTK_INCLUDE="-I$VTK_INC"
> - VTK_LIBRARY="\$(libmesh_RPATHFLAG)$VTK_LIB -L$VTK_LIB -lvtkIO
> -lvtkCommon -lvtkFiltering"
> + VTK_LIBRARY="\$(libmesh_RPATHFLAG)$VTK_LIB -L$VTK_LIB -lvtkIO
> -lvtkFiltering -lvtkCommon -lvtkzlib -lvtkexpat -lvtksys "
> AC_DEFINE(HAVE_VTK, 1, [Flag indicating whether the library will be
> compiled with VTK support])
> AC_MSG_RESULT(<<< Configuring library with VTK support >>>)
> fi
>
> I compiled VTK 5.4.2 from the sources and installed it into ~/opt/. For
> libmesh
> I use the following configure-line:
>
>> ./configure --enable-mpi --enable-shared --enable-exceptions
>> --enable-unordered-containers \
>> --enable-periodic --enable-ghosted --enable-second --enable-petsc
>> --enable-slepc \
>> --enable-laspack --enable-gzstreams --enable-bzip2 --enable-vtk
>> --enable-tecplot \
>> --enable-exodus --with-vtk-include=~/opt/include/vtk-5.4 \
>> --with-vtk-lib=~/opt/lib/vtk-5.4
This is good information, but I'm hesitant to make the change exactly
as-is, since I'm not sure older versions of VTK also have these
libraries? The right solution here seems to be calling some sort of
"vtk-config --libs" script. Doesn't appear we've tried to do that in
the m4 file, does anyone know if there is such a script in VTK?
> When trying to build against vtk 5.6 I get the following error:
>
>> /usr/bin/ld: bin/grid2grid-opt: hidden symbol `vtkUnstructuredGrid::New()'
>> in ~/opt/lib/vtk-5.6/libvtkFiltering.a(vtkUnstructuredGrid.cxx.o) is
>> referenced by DSO
>> /usr/bin/ld: final link failed: Nonrepresentable section on output
>
> As I have noticed this with libmesh 0.7.0.3 and 0.7.1, I am wondering, if
> there
> is something wrong with the way I am building against vtk.
It looks like you have a statically linked VTK library? Would it be
possible to try building a dynamic one? Or building a static libmesh?
> Additionally there is an issue within VTKIO when having a variable of a
> MONOMIAL family
> in a system. As I currently not need these variables in the output, I just
> skip them:
>
> ===================================================================
> --- src/mesh/vtk_io.C (Revision 4437)
> +++ src/mesh/vtk_io.C (Arbeitskopie)
> @@ -312,6 +312,10 @@
> for(unsigned int j=0;j<n_vars;++j){
>
> std::string name = sys.variable_name(j);
> + if (sys.variable_type(j).family == MONOMIAL) {
> + err << "Ignoring variable " << name
> << " due to incompatible FEFamily" << std::endl;
> + continue;
> + }
>
> vtkDoubleArray *data = vtkDoubleArray::New();
This is probably a reasonable workaround for now until someone needs
to write discontinuous solutions. Presumably there is some facility
within VTK for writing "cell" data?
> And finally I have some trouble using BoundaryInfo: When using
> MeshTools::Generation::
> the boundary sides are numbered zero-based, but when reading a mesh from a
> ExodusII-file
> the boundary sides are numbered starting at one. The ExodusII-file was
> created using
> cubit and sidesets. The smallest id which cubit allowes me to assign is 1.
> So how do I get the boundary sides starting by zero from cubit into libmesh?
I don't know of a way to do this directly, it seems to be a limitation
of the Exodus format that you can't have boundary (or block) IDs of 0.
If you really want to have boundary IDs starting from zero in libmesh
from cubit files, you could always loop over the boundary elements in
the mesh, and call remove_side/add_side with the new ID.
On a related note, for exodus files written from libmesh, we map 0 IDs
to max values for the appropriate integral type, but when we read them
back in, it does not appear we currently reverse this mapping. That
might be worth looking into...
--
John
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users