Hi Roy, Thanks for your response!
I think my goal is really to first assign discrete data to a FE mesh, and then pass it to an interface for arbitrary x,y,z points. To achieve this, I can pass the data to a System object and initialize it with project_vector. But I "guess" that MeshFunction might serve the purpose as good which, as you pointed out, takes data on finite element mesh and gives an interface for data at x,y,z points. But I have no idea how MeshFunction is initialized given discrete data. Do we have member functions similar to project_solution or project_vector work for MeshFunction? Xinzeng On Thu, Nov 17, 2016 at 10:06 AM, Roy Stogner <[email protected]> wrote: > > On Wed, 16 Nov 2016, Xinzeng Feng wrote: > > I'm a new user of libMesh. I am trying to incorporate patient-specific MRI >> data with a finite element model. For this purpose, I want to define a >> field map with nodal values assigned based on the images. The field then >> needs to be integrated to assemble the stiffness matrix. >> >> I've noticed that the MeshFunction class provides function-like objects >> for >> data distributed over a mesh, which might serve the need. But I'm not sure >> how to correctly use it. >> > > I think MeshFunction is actually the converse of what you want. > MeshFunction takes data on a finite element mesh and gives you an > interface for data at x,y,z points. You want to take data defined at > x,y,z points and assign it to finite element degrees of freedom on a > mesh. > > For that latter problem, what you'll want to do is define your own > function subclass, then pass it to System::project_solution() or > System::project_vector(). We do this in several of the example codes; > transient_ex1 (where we project initial conditions from an exact_value > function pointer) might be the clearest. > --- > Roy > -- Xinzeng Feng, Ph.D. Institute for Computational Engineering and Sciences, Postdoctoral Fellow University of Texas, Austin ------------------------------------------------------------------------------ _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
