Dear all,

I am trying to use functions from the MeshFunction class in a test file 
I have adapted from example 3. In particular, I would like to calculate 
the gradient at a given point. I'm having trouble figuring out what 
variables are needed for the constructor:

So here are the constructor declarations from mesh_function.h:

  /**
   * Constructor for mesh based functions with vectors
   * as return value.  Optionally takes a master function.
   * If the MeshFunction is to be evaluated outside of the
   * local partition of the mesh, then both the mesh in
   * \p eqn_systems and the coefficient vector \p vec
   * should be serialized.
   */
  MeshFunction (const EquationSystems& eqn_systems,
        const NumericVector<Number>& vec,
        const DofMap& dof_map,
        const std::vector<unsigned int>& vars,
        const FunctionBase* master=NULL);

  /**
   * Constructor for mesh based functions with a number
   * as return value.  Optionally takes a master function.
   * If the MeshFunction is to be evaluated outside of the
   * local partition of the mesh, then both the mesh in
   * \p eqn_systems and the coefficient vector \p vec
   * should be serialized.
   */
  MeshFunction (const EquationSystems& eqn_systems,
        const NumericVector<Number>& vec,
        const DofMap& dof_map,
        const unsigned int var,
        const FunctionBase* master=NULL);

eqn_systems and dof_map are clear.

It says that vec (internally,  _vector) holds the data to be 
interpolated. I thought this was part of eqn_system .

I appears to me that var/vars is supposed to be the number of the 
attached variables (in this case, just "u").  Since I have only one 
field, should this be '0'?

Finally, I'm not completely sure what FunctionBase does (am I okay 
leaving it blank).



Sorry for all my n00b questions, and thanks for your help.


-Brent

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to