Hello,
I'm working on a program where I would like to find values and gradients
for variables that are specified on a mesh. I was hoping to do this using
libmesh. I've gone through the documentation but it is a lot to take in. I
would really appreciate it if someone could point me in the right direction.
Here is a quick test case I put together:
----
/* create mesh */
libMesh::Mesh mesh(init.comm());
mesh.set_spatial_dimension(2);
libMesh::Node* n0 = new libMesh::Node(0, 0);
libMesh::Node* n1 = new libMesh::Node(1, 0);
libMesh::Node* n2 = new libMesh::Node(0, 1);
mesh.add_node(n0);
mesh.add_node(n1);
mesh.add_node(n2);
libMesh::Tri3* e1 = new libMesh::Tri3();
e1->set_node(0) = n0;
e1->set_node(1) = n1;
e1->set_node(2) = n2;
mesh.add_elem(e1);
mesh.prepare_for_use();
/* create system */
libMesh::EquationSystems eq_sys(mesh);
libMesh::ExplicitSystem& sys =
eq_sys.add_system<libMesh::ExplicitSystem>("Interp System");
sys.add_variable("u", libMesh::FIRST, libMesh::LAGRANGE);
----
But I couldn't figure out what to do next. How would I set the type of the
vector, for example a vector? How do I assign values to the variable? How
do I evaluate the variables at specific points? I saw the "point_value"
function in the System class, but when I use that I receive an error that
it is deprecated. What should I do instead?
Thanks in advance for your help.
-Jim
--
James Strother, Ph.D.
Dept. of Integrative Biology
Oregon State University
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users