Dear Roy,
Here are the output of configure.  The screen copy is in configure.out

My configuration of machine is as follows,

HP 820 G1 laptop
Ubuntu 14.10
libpetsc3.4.2-dev
openmpi 1.6.5-8

The script for configure is

export PETSC_DIR=/usr/lib/petsc
export VTK_DIR=/usr/lib/vtk-5.8
export VTK_INCLUDE=/usr/include/vtk-5.8
export HDF5_DIR=/usr/lib/x86_64-linux-gnu

./configure --prefix=/home/zhenyu/deps/libmesh \
    --enable-everything \
    --enable-parmesh \
    --enable-ifem --enable-nodeconstraint \
    --enable-perflog \
    --enable-blocked-storage \
    --with-fparser=release \
    2>&1 | tee configure.out


Zhenyu

------------------ Original ------------------
From:  "Roy Stogner";<[email protected]>;
Date:  Mar 31, 2015
To:  "grandrabbit"<[email protected]>; 

Subject:  Re: [Libmesh-users] How to properly call ParsedFunction




On Tue, 31 Mar 2015, grandrabbit wrote:

> I tried to build the git clone of libmesh, but errors poped up as follows, it 
> seems due to incompatibility
> between new Libmesh 1.0.0 and my current petsc 3.4.2.
> 
> src/base/libmesh.C: In constructor 'libMesh::LibMeshInit::LibMeshInit(int, 
> const char* const*)':
> src/base/libmesh.C:498:24: error: invalid conversion from 'int' to 'MPI_Comm 
> {aka ompi_communicator_t*}' [-fpermissive]
>        PETSC_COMM_WORLD = libMesh::GLOBAL_COMM_WORLD;

It looks like you've somehow managed to configure libMesh with PETSc
but without MPI?  libMesh definitely works with PETSc 3.4.2, but I'm
not sure why the PETSc MPI autodetection wouldn't work.

If you want to help us track that down then go ahead and send me (and
copy libmesh-users) your config log.  If you're not using FEMSystem,
though, then it's probably quite reasonable to just stick to libMesh
0.9.4.

> With your explaination, I think you misunderstood the source of
> problem.

No, I have not.

> Errors never pop up with ConstFunction (bcfunctype= "const"
> in applyDirichlet_test_1), no matter there are more than two
> ConstFunction instances or not.

With ConstFunction, the const value is returned no matter what
component is asked for.  It doesn't support multi-component functions
with different values in each component, but it implicitly supports
multi-component functions with the same value in each component.

With ParsedFunction, true multicomponent functions are possible.  The
price is that multicomponent values require a definition for each
component requested.  The index of the component requested will be the
index of that variable component in your system.

> But this is not true for ParsedFunction. I mean, once I assign two
> ParsedFunction, each for one component of velocity with the same 
> boundary_id (1 here for inlet) and specific variable index (0 for
> u_var and 1 for v_var), then the assertation check failed.

This is correct.  You define a ParsedFunction with one component, then
you tell the system to ask it for its second component, since v is
your second variable.  It doesn't have a second component, so this
fails.

> So may I say, for a boundary with multi-component conditions, if I want to 
> use ParsedFunction, I  have to bound all component into a single
> ParsedFunction?

That is one option but not the only option.  You could also insert
"dummy" components, as I suggested in my previous email:

> > But for less general operation it would be a sufficient workaround to
> > just manually create a multi-component ParsedFunction with the
> > function you want assigned to the correct component, e.g.
> > "{0}{0}{sin(x)}" if you want to set your third variable component
> > value to sin(x) on some boundary.

> May I suggest show more examples about ParsedFunction in the future
> release version of libmesh.tar.gz? This would be quite helpful for
> understanding the usage.

I agree.  I don't have time to cook up something myself in the near
future, though.  If you have any suggestions we'd love a PR.
---
Roy
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to