I will look into this example. Many thanks, Vikram! Xinzeng
On Thu, Nov 17, 2016 at 5:37 PM, Vikram Garg <[email protected]> wrote: > Hello Xinzeng, > You can find one use of MeshFunction in this > regression test for a libMesh based library (GRINS): https://github.com/gr > insfem/grins/blob/master/test/regression/test_turbulent_channel.C > > Here, we are creating a MeshFunction (turbulent_bc_values) to map a 1-d > turbulent boundary layer solve on an extremely fine mesh, into the inlet > boundary of a 2-d channel with a coarser mesh. > > The input data (data-1d) is read in from an xda file: > https://github.com/grinsfem/grins/blob/master/test/ > test_data/turbulent_channel_Re944_grid.xda > > Thanks. > > > On Thu, Nov 17, 2016 at 4:28 PM, Xinzeng Feng <[email protected]> > wrote: > >> 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 >> > > > > -- > Vikram Garg > Postdoctoral Associate > The University of Texas at Austin > > http://vikramvgarg.wordpress.com/ > http://www.runforindia.org/runners/vikramg > -- 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
