Hi
I am trying to copy the solution from one mesh-eqn system to another mesh
equation system.
I modified the mesh transfer example and added the introduction_ex3 example.
I use the following code in my program:
Mesh from_mesh(init.comm());
MeshTools::Generation::build_square(from_mesh, 15, 15, -1., 1., -1.,
1.,QUAD4);
from_mesh.print_info();
EquationSystems from_es(from_mesh);
from_es.add_system<LinearImplicitSystem> ("Poisson_Sin");
unsigned int from_var =
from_es.get_system("Poisson_Sin").add_variable("u",FIRST);
from_es.get_system("Poisson_Sin").attach_assemble_function (assemble_poisson);
from_es.init();
from_es.print_info();
from_es.get_system("Poisson_Sin").solve();
std::string tecplot_filename2 = "poisson1.plt";
TecplotIO (from_mesh, true).write_equation_systems (tecplot_filename2,
from_es);
Mesh to_mesh(init.comm());
MeshTools::Generation::build_square(to_mesh, 15, 15, -1., 1., -1., 1.,QUAD4);
to_mesh.print_info();
EquationSystems to_es(to_mesh);
DTKSolutionTransfer dtk_transfer(init.comm());
to_es.add_system<LinearImplicitSystem> ("Poisson_Sin");
unsigned int to_var = to_es.get_system("Poisson_Sin").add_variable("v",
FIRST);
//to_es.get_system("Poisson_Sin").attach_assemble_function (assemble_poisson);
to_es.init();
to_es.print_info();
// to_es.get_system("Poisson_Sin").solve();
dtk_transfer.transfer(from_es.get_system("Poisson_Sin").variable(from_var),
to_es.get_system("Poisson_Sin").variable(to_var));
to_es.update();
The code runs. However when I try to plot the solution in either of the meshes.
I get the attached figures. I dont know where i am going wrong.
Can someone tell me how to use DTK exactly to transfer solution between 2
meshes/ equation systems
Thank you for helping me out.
Thanks and Regards
Vegnesh
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users