Re: [petsc-dev] Need mechanism to set LocalToGlobal mapping in a DMShell
Hi Jed, The reason is that in the PFLOTRAN code we currently have some code like this:
select case(discretization%itype) case(STRUCTURED_GRID,STRUCTURED_GRID_MIMETIC) call DMLocalToGlobalBegin(dm_ptr%sgdm,local_vec,INSERT_VALUES,global_vec,ierr) call DMLocalToGlobalEnd(dm_ptr%sgdm,local_vec,INSERT_VALUES,global_vec,ierr) case(UNSTRUCTURED_GRID) call VecScatterBegin(dm_ptr%ugdm%scatter_ltog,local_vec,global_vec, & INSERT_VALUES,SCATTER_FORWARD,ierr) call VecScatterEnd(dm_ptr%ugdm%scatter_ltog,local_vec,global_vec, & INSERT_VALUES,SCATTER_FORWARD,ierr) end select where in the STRUCTURED_GRID case we have a DMDA. In the UNSTRUCTURED_GRID case we have no DM, and I want to pack things into a DMShell so that have a DM and the various DM calls work (and then I can eliminate these 'select case' statements).
(Eventually I'd like to be using more of the PETSc infrastructure and not even calling DMLocalToGlobalBegin(), etc., in the PFLOTRAN code, but that can wait a bit.) --Richard On 2/21/13 1:42 PM, Jed Brown wrote:
It would be natural to have a matching interface, but why do you need it? You're in charge of making the matrices and vectors so you can give them local-to-global mappings. The only solver that calls DMGetLocalToGlobalMapping is PCEXOTIC, which only works with DMDA anyway.
On Thu, Feb 21, 2013 at 12:35 PM, Richard Tran Mills <[email protected] <mailto:[email protected]>> wrote:
Hi Folks,
I want to set a LocalToGlobal mapping in a DMShell object. Should we add a DMShell routine to do this, or just add a DMSetLocalToGlobalMapping() routine?
Thanks, Richard
-- Richard Tran Mills, Ph.D. Computational Earth Scientist | Joint Assistant Professor Hydrogeochemical Dynamics Team | EECS and Earth & Planetary Sciences Oak Ridge National Laboratory | University of Tennessee, Knoxville E-mail: [email protected] <mailto:[email protected]> V: 865-241-3198 <tel:865-241-3198> http://climate.ornl.gov/~rmills <http://climate.ornl.gov/%7Ermills>
-- Richard Tran Mills, Ph.D. Computational Earth Scientist | Joint Assistant Professor Hydrogeochemical Dynamics Team | EECS and Earth & Planetary Sciences Oak Ridge National Laboratory | University of Tennessee, Knoxville E-mail: [email protected] V: 865-241-3198 http://climate.ornl.gov/~rmills
participants (1)
-
Richard Tran Mills