[petsc-users] ex52_integrateElement.cu

David Fuentes fuentesdt at gmail.com
Mon Apr 23 09:46:26 CDT 2012


I have some existing libMesh code that I would like to use with this ex52
GPU code example.

I think it may be reasonable to use the existing code for setup of initial
conditions and jacobian calc,
But then use the GPU residual calculation.

Where is the nodal degree of freedom stored in the "DM_Complex" data
structure  ?
I would like to setup the same dof ordering in the libMesh data structures.

I'm also a little unfamiliar with the terminology in the DM_Complex data
structure,
what is being referred to by the "cones", "maxConeSize", and
"coneOrientation" ?

Lastly,
Are there any data structures to pass spatially varying element-wise
material parameters to the inner loop of the assembly?

for example, something like:

diff -r 58bb1a4e8a0d src/snes/examples/tutorials/ex52_integrateElement.cu
--- a/src/snes/examples/tutorials/ex52_integrateElement.cu      Tue Mar 27
23:22:11 2012 -0500
+++ b/src/snes/examples/tutorials/ex52_integrateElement.cu      Mon Apr 23
09:36:30 2012 -0500
@@ -3,8 +3,8 @@

 #include "ex52_gpu.h"

-__device__ vecType f1_laplacian(float u[], vecType gradU[], int comp) {
-  return gradU[comp];
+__device__ vecType f1_laplacian(float thermalconductivity, float u[],
vecType gradU[], int comp) {
+  return thermalconductivity*gradU[comp];
 }




Thanks,
David






On Mon, Apr 2, 2012 at 9:37 PM, Matthew Knepley <knepley at gmail.com> wrote:

> On Wed, Mar 28, 2012 at 6:42 PM, Matthew Knepley <knepley at gmail.com>wrote:
>
>> On Wed, Mar 28, 2012 at 6:25 PM, David Fuentes <fuentesdt at gmail.com>wrote:
>>
>>> Yes. This would work.
>>> I had trouble compiling in single precision using the some of the
>>> external package options I was using for double.
>>>
>>
>> Okay,  getting on it now.
>>
>
> Okay, I have tested using PetscReal=double with floats on the GPU. If you
> want doubles on the GPU, you can
> currently change PETSc/FEM.py:434. I am deciding what the best way to
> specify this type is.
>
>   Thanks,
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120423/9516d2bb/attachment.htm>


More information about the petsc-users mailing list