PetIGA / src / petigaftn.F90

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
! -*- f90 -*-

#include "petscconf.h"

#define C_PETSC_ERRORCODE C_INT
#define C_PETSC_BOOL C_INT

#if defined(PETSC_USE_64BIT_INDICES)
#define C_PETSC_INT C_LONG_LONG
#else
#define C_PETSC_INT C_INT
#endif

#if defined(PETSC_USE_REAL_SINGLE)
#define C_PETSC_REAL    C_FLOAT
#define C_PETSC_COMPLEX C_FLOAT_COMPLEX
#elif defined(PETSC_USE_REAL_DOUBLE)
#define C_PETSC_REAL    C_DOUBLE
#define C_PETSC_COMPLEX C_DOUBLE_COMPLEX
#elif defined(PETSC_USE_REAL_LONG_DOUBLE)
#define C_PETSC_REAL    C_LONG_DOUBLE
#define C_PETSC_COMPLEX C_LONG_DOUBLE_COMPLEX
#elif defined(PETSC_USE_REAL___FLOAT128)
#define C_PETSC_REAL    C_FLOAT128
#define C_PETSC_COMPLEX C_FLOAT128_COMPLEX
#endif

#if defined(PETSC_USE_COMPLEX)
#define C_PETSC_SCALAR C_PETSC_COMPLEX
#else
#define C_PETSC_SCALAR C_PETSC_REAL
#endif

#if defined(PETSC_USE_COMPLEX)
#define scalar complex
#else
#define scalar real
#endif

module PetIGA
  use ISO_C_BINDING, only: C_PTR
  use ISO_C_BINDING, only: IGA_ERRCODE_KIND => C_PETSC_ERRORCODE
  use ISO_C_BINDING, only: IGA_LOGICAL_KIND => C_PETSC_BOOL
  use ISO_C_BINDING, only: IGA_INTEGER_KIND => C_PETSC_INT
  use ISO_C_BINDING, only: IGA_REAL_KIND    => C_PETSC_REAL
  use ISO_C_BINDING, only: IGA_COMPLEX_KIND => C_PETSC_COMPLEX
  use ISO_C_BINDING, only: IGA_SCALAR_KIND  => C_PETSC_SCALAR
  implicit none

  !type, bind(C) :: IGA
  !   private
  !end type IGAElement

  !type, bind(C) :: IGAElement
  !   integer(kind=IGA_INTEGER_KIND) :: private_refct
  !   integer(kind=IGA_INTEGER_KIND) :: private_start(3);
  !   integer(kind=IGA_INTEGER_KIND) :: private_width(3);
  !   integer(kind=IGA_INTEGER_KIND) :: private_ID(3);
  !   integer(kind=IGA_INTEGER_KIND) :: count
  !   integer(kind=IGA_INTEGER_KIND) :: index
  !   integer(kind=IGA_INTEGER_KIND) :: qnp
  !   integer(kind=IGA_INTEGER_KIND) :: nen
  !   integer(kind=IGA_INTEGER_KIND) :: dof
  !   integer(kind=IGA_INTEGER_KIND) :: dim
  !   integer(kind=IGA_INTEGER_KIND) :: nsd
  !end type IGAElement

  type, bind(C) :: IGAPoint
     integer(kind=IGA_INTEGER_KIND) :: private_refct

     integer(kind=IGA_INTEGER_KIND) :: count
     integer(kind=IGA_INTEGER_KIND) :: index
     integer(kind=IGA_INTEGER_KIND) :: neq
     integer(kind=IGA_INTEGER_KIND) :: nen
     integer(kind=IGA_INTEGER_KIND) :: dof
     integer(kind=IGA_INTEGER_KIND) :: dim
     integer(kind=IGA_INTEGER_KIND) :: nsd
     integer(kind=IGA_INTEGER_KIND) :: npd

     type(C_PTR) :: geometry
     type(C_PTR) :: property

     type(C_PTR) :: weight
     type(C_PTR) :: detJac
     type(C_PTR) :: point
     type(C_PTR) :: basis(0:3)
     type(C_PTR) :: detX
     type(C_PTR) :: gradX(0:1)
     type(C_PTR) :: shape(0:3)
     type(C_PTR) :: normal
  end type IGAPoint


  interface IGA_GeomMap
     module procedure IGA_GeomMap
  end interface IGA_GeomMap

  interface IGA_GradGeomMap
     module procedure IGA_GradGeomMap
  end interface IGA_GradGeomMap

  !interface IGA_HessGeomMap
  !   module procedure IGA_HessGeomMap
  !end interface IGA_HessGeomMap

  interface IGA_InvGradGeomMap
     module procedure IGA_InvGradGeomMap
  end interface IGA_InvGradGeomMap


  interface IGA_Basis0
     module procedure IGA_Basis0
  end interface IGA_Basis0

  interface IGA_Basis1
     module procedure IGA_Basis1
  end interface IGA_Basis1

  interface IGA_Basis2
     module procedure IGA_Basis2
  end interface IGA_Basis2

  interface IGA_Basis3
     module procedure IGA_Basis3
  end interface IGA_Basis3


  interface IGA_Shape0
     module procedure IGA_Shape0
  end interface IGA_Shape0

  interface IGA_Shape1
     module procedure IGA_Shape1
  end interface IGA_Shape1

  interface IGA_Shape2
     module procedure IGA_Shape2
  end interface IGA_Shape2

  interface IGA_Shape3
     module procedure IGA_Shape3
  end interface IGA_Shape3


  interface IGA_Eval
     module procedure IGA_Shape_Der0_S
     module procedure IGA_Shape_Der0_V
     module procedure IGA_Shape_Der1_S
     module procedure IGA_Shape_Der1_V
     module procedure IGA_Shape_Der2_S
     module procedure IGA_Shape_Der2_V
     module procedure IGA_Shape_Der3_S
     module procedure IGA_Shape_Der3_V
  end interface IGA_Eval

  interface IGA_Value
     module procedure IGA_Shape_Der0_S
     module procedure IGA_Shape_Der0_V
     module procedure IGA_Point_Der0_S
     module procedure IGA_Point_Der0_V
  end interface IGA_Value

  interface IGA_Grad
     module procedure IGA_Shape_Der1_S
     module procedure IGA_Shape_Der1_V
     module procedure IGA_Point_Der1_S
     module procedure IGA_Point_Der1_V
  end interface IGA_Grad

  interface IGA_Hess
     module procedure IGA_Shape_Der2_S
     module procedure IGA_Shape_Der2_V
     module procedure IGA_Point_Der2_S
     module procedure IGA_Point_Der2_V
  end interface IGA_Hess

  interface IGA_Der3
     module procedure IGA_Shape_Der3_S
     module procedure IGA_Shape_Der3_V
     module procedure IGA_Point_Der3_S
     module procedure IGA_Point_Der3_V
  end interface IGA_Der3

  interface IGA_Div
     module procedure IGA_Shape_Div
     module procedure IGA_Point_Div
  end interface IGA_Div

  interface IGA_Del2
     module procedure IGA_Shape_Del2_S
     module procedure IGA_Shape_Del2_V
     module procedure IGA_Point_Del2_S
     module procedure IGA_Point_Del2_V
  end interface IGA_Del2

  contains

    function IGA_Geometry(p) result(X)
      use ISO_C_BINDING, only: c2f => C_F_POINTER
      use ISO_C_BINDING, only: nonnull => C_ASSOCIATED
      implicit none
      type(IGAPoint), intent(in) :: p
      real(kind=IGA_REAL_KIND), pointer :: X(:)
      nullify(X)
      if (nonnull(p%geometry)) &
      call c2f(p%geometry,X,(/p%nsd,p%nen/))
    end function IGA_Geometry

    function IGA_Property(p) result(A)
      use ISO_C_BINDING, only: c2f => C_F_POINTER
      use ISO_C_BINDING, only: nonnull => C_ASSOCIATED
      implicit none
      type(IGAPoint), intent(in) :: p
      real(kind=IGA_REAL_KIND), pointer :: A(:)
      nullify(A)
      if (nonnull(p%property)) &
      call c2f(p%property,A,(/p%npd,p%nen/))
    end function IGA_Property

    function IGA_GeomMap(p) result (X)
      implicit none
      type(IGAPoint), intent(in) :: p
      real(kind=IGA_REAL_KIND)   :: X(p%nsd)
      interface
         subroutine IGAPoint_GeomMap(p,X) bind(C)
           import; implicit none;
           type(IGAPoint), intent(in) :: p
           real(kind=IGA_REAL_KIND), intent(out) :: X(p%nsd)
         end subroutine IGAPoint_GeomMap
      end interface
      call IGAPoint_GeomMap(p,X)
    end function IGA_GeomMap

    function IGA_GradGeomMap(p) result (F)
      implicit none
      type(IGAPoint), intent(in) :: p
      real(kind=IGA_REAL_KIND)   :: F(p%dim,p%nsd)
      interface
         subroutine IGAPoint_GradGeomMap(p,F) bind(C)
           import; implicit none;
           type(IGAPoint), intent(in) :: p
           real(kind=IGA_REAL_KIND), intent(out) :: F(p%dim,p%nsd)
         end subroutine IGAPoint_GradGeomMap
      end interface
      call IGAPoint_GradGeomMap(p,F)
    end function IGA_GradGeomMap

    function IGA_InvGradGeomMap(p) result (G)
      implicit none
      type(IGAPoint), intent(in) :: p
      real(kind=IGA_REAL_KIND)   :: G(p%nsd,p%dim)
      interface
         subroutine IGAPoint_InvGradGeomMap(p,G) bind(C)
           import; implicit none;
           type(IGAPoint), intent(in) :: p
           real(kind=IGA_REAL_KIND), intent(out) :: G(p%nsd,p%dim)
         end subroutine IGAPoint_InvGradGeomMap
      end interface
      call IGAPoint_InvGradGeomMap(p,G)
    end function IGA_InvGradGeomMap

    function IGA_Normal(p) result (N)
      use ISO_C_BINDING, only: c2f => C_F_POINTER
      implicit none
      type(IGAPoint), intent(in) :: p
      real(kind=IGA_REAL_KIND), pointer :: N(:)
      call c2f(p%normal,N,(/p%dim/))
    end function IGA_Normal

    function IGA_Basis0(p) result(N)
      use ISO_C_BINDING, only: c2f => C_F_POINTER
      implicit none
      type(IGAPoint), intent(in) :: p
      real(kind=IGA_REAL_KIND), pointer :: N(:)
      call c2f(p%basis(0),N,(/p%nen/))
    end function IGA_Basis0

    function IGA_Basis1(p) result(N)
      use ISO_C_BINDING, only: c2f => C_F_POINTER
      implicit none
      type(IGAPoint), intent(in) :: p
      real(kind=IGA_REAL_KIND), pointer :: N(:,:)
      call c2f(p%basis(1),N,(/p%dim,p%nen/))
    end function IGA_Basis1

    function IGA_Basis2(p) result(N)
      use ISO_C_BINDING, only: c2f => C_F_POINTER
      implicit none
      type(IGAPoint), intent(in) :: p
      real(kind=IGA_REAL_KIND), pointer :: N(:,:,:)
      call c2f(p%basis(2),N,(/p%dim,p%dim,p%nen/))
    end function IGA_Basis2

    function IGA_Basis3(p) result(N)
      use ISO_C_BINDING, only: c2f => C_F_POINTER
      implicit none
      type(IGAPoint), intent(in) :: p
      real(kind=IGA_REAL_KIND), pointer :: N(:,:,:,:)
      call c2f(p%basis(3),N,(/p%dim,p%dim,p%dim,p%nen/))
    end function IGA_Basis3

    function IGA_Shape0(p) result(N)
      use ISO_C_BINDING, only: c2f => C_F_POINTER
      implicit none
      type(IGAPoint), intent(in) :: p
      real(kind=IGA_REAL_KIND), pointer :: N(:)
      call c2f(p%shape(0),N,(/p%nen/))
    end function IGA_Shape0

    function IGA_Shape1(p) result(N)
      use ISO_C_BINDING, only: c2f => C_F_POINTER
      implicit none
      type(IGAPoint), intent(in) :: p
      real(kind=IGA_REAL_KIND), pointer :: N(:,:)
      call c2f(p%shape(1),N,(/p%dim,p%nen/))
    end function IGA_Shape1

    function IGA_Shape2(p) result(N)
      use ISO_C_BINDING, only: c2f => C_F_POINTER
      implicit none
      type(IGAPoint), intent(in) :: p
      real(kind=IGA_REAL_KIND), pointer :: N(:,:,:)
      call c2f(p%shape(2),N,(/p%dim,p%dim,p%nen/))
    end function IGA_Shape2

    function IGA_Shape3(p) result(N)
      use ISO_C_BINDING, only: c2f => C_F_POINTER
      implicit none
      type(IGAPoint), intent(in) :: p
      real(kind=IGA_REAL_KIND), pointer :: N(:,:,:,:)
      call c2f(p%shape(3),N,(/p%dim,p%dim,p%dim,p%nen/))
    end function IGA_Shape3

#define DIM size(N,1)
#define DOF size(U,1)

    function IGA_Shape_Der0_S(N,U) result (V)
      implicit none
      real   (kind=IGA_REAL_KIND  ), intent(in) :: N(:) ! nen
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:) ! nen
      scalar (kind=IGA_SCALAR_KIND)  :: V
      ! V = dot_product(N,U)
      integer a
      V = 0
      do a = 1, size(U,1) ! nen
         V = V + N(a) * U(a)
      end do
    end function IGA_Shape_Der0_S

    function IGA_Shape_Der0_V(N,U) result (V)
      implicit none
      real   (kind=IGA_REAL_KIND  ), intent(in) :: N(:)   ! nen
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:,:) ! dof,nen
      scalar (kind=IGA_SCALAR_KIND)  :: V(DOF)            ! dof
      ! V = matmul(N,transpose(U))
      integer a
      V = 0
      do a = 1, size(U,2) ! nen
         V = V + N(a) * U(:,a)
      end do
    end function IGA_Shape_Der0_V

    function IGA_Shape_Der1_S(N,U) result (V)
      implicit none
      real   (kind=IGA_REAL_KIND  ), intent(in) :: N(:,:) ! dim,nen
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:)   ! nen
      scalar (kind=IGA_SCALAR_KIND)  :: V(DIM)            ! dim
      !V = matmul(N,U)
      integer a
      V = 0
      do a = 1, size(U,1) ! nen
         V(:) = V(:) + N(:,a) * U(a)
      end do
    end function IGA_Shape_Der1_S

    function IGA_Shape_Der1_V(N,U) result (V)
      implicit none
      real   (kind=IGA_REAL_KIND  ), intent(in) :: N(:,:) ! dim,nen
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:,:) ! dof,nen
      scalar (kind=IGA_SCALAR_KIND)  :: V(DIM,DOF)        ! dim,dof
      ! V = matmul(N,transpose(U))
      integer a, c
      V = 0
      do a = 1, size(U,2) ! nen
         do c = 1, size(U,1) ! dof
            V(:,c) = V(:,c) + N(:,a) * U(c,a)
         end do
      end do
    end function IGA_Shape_Der1_V

    function IGA_Shape_Der2_S(N,U) result (V)
      implicit none
      real   (kind=IGA_REAL_KIND  ), intent(in) :: N(:,:,:) ! dim,dim,nen
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:)     ! nen
      scalar (kind=IGA_SCALAR_KIND)  :: V(DIM,DIM)          ! dim,dim
      integer a
      V = 0
      do a = 1, size(U,1) ! nen
         V(:,:) = V(:,:) + N(:,:,a) * U(a)
      end do
    end function IGA_Shape_Der2_S

    function IGA_Shape_Der2_V(N,U) result (V)
      implicit none
      real   (kind=IGA_REAL_KIND  ), intent(in) :: N(:,:,:) ! dim,dim,nen
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:,:)   ! dof,nen
      scalar (kind=IGA_SCALAR_KIND)  :: V(DIM,DIM,DOF)      ! dim,dim,dof
      integer a, c
      V = 0
      do a = 1, size(U,2) ! nen
         do c = 1, size(U,1) ! dof
            V(:,:,c) = V(:,:,c) + N(:,:,a) * U(c,a)
         end do
      end do
    end function IGA_Shape_Der2_V

    function IGA_Shape_Der3_S(N,U) result (V)
      implicit none
      real   (kind=IGA_REAL_KIND  ), intent(in) :: N(:,:,:,:) ! dim,dim,dim,nen
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:)       ! nen
      scalar (kind=IGA_SCALAR_KIND)  :: V(DIM,DIM,DIM)        ! dim,dim,dim
      integer a
      V = 0
      do a = 1, size(U,1) ! nen
         V(:,:,:) = V(:,:,:) + N(:,:,:,a) * U(a)
      end do
    end function IGA_Shape_Der3_S

    function IGA_Shape_Der3_V(N,U) result (V)
      implicit none
      real   (kind=IGA_REAL_KIND  ), intent(in) :: N(:,:,:,:) ! dim,dim,dim,nen
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:,:)     ! dof,nen
      scalar (kind=IGA_SCALAR_KIND)  :: V(DIM,DIM,DIM,DOF)    ! dim,dim,dim,dof
      integer a, c
      V = 0
      do a = 1, size(U,2) ! nen
         do c = 1, size(U,1) ! dof
            V(:,:,:,c) = V(:,:,:,c) + N(:,:,:,a) * U(c,a)
         end do
      end do
    end function IGA_Shape_Der3_V

    function IGA_Shape_Div(N,U) result (V)
      implicit none
      real   (kind=IGA_REAL_KIND  ), intent(in) :: N(:,:) ! dim,nen
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:,:) ! dim,nen
      scalar (kind=IGA_SCALAR_KIND)  :: V
      integer a, c, i
      V = 0
      do a = 1, size(U,2) ! nen
         do i = 1, size(N,1) ! dim
            V = V + N(i,a) * U(i,a)
         end do
      end do
    end function IGA_Shape_Div

    function IGA_Shape_Del2_S(N,U) result (V)
      implicit none
      real   (kind=IGA_REAL_KIND  ), intent(in) :: N(:,:,:) ! dim,dim,nen
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:)     ! nen
      scalar (kind=IGA_SCALAR_KIND)  :: V
      integer a, c, i
      V = 0
      do a = 1, size(U,1) ! nen
         do i = 1, size(N,1) ! dim
            V = V + N(i,i,a) * U(a)
         end do
      end do
    end function IGA_Shape_Del2_S

    function IGA_Shape_Del2_V(N,U) result (V)
      implicit none
      real   (kind=IGA_REAL_KIND  ), intent(in) :: N(:,:,:) ! dim,dim,nen
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:,:)   ! dof,nen
      scalar (kind=IGA_SCALAR_KIND)  :: V(DOF)
      integer a, c, i
      V = 0
      do a = 1, size(U,2) ! nen
         do c = 1, size(U,1) ! dof
            do i = 1, size(N,1) ! dim
               V(c) = V(c) + N(i,i,a) * U(c,a)
            end do
         end do
      end do
    end function IGA_Shape_Del2_V

#undef DIM
#undef DOF

#define DIM p%dim
#define DOF size(U,1)

    function IGA_Point_Der0_S(p,U) result(V)
      implicit none
      type(IGAPoint), intent(in) :: p
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:) ! nen
      scalar (kind=IGA_SCALAR_KIND)  :: V               !
      V = IGA_Eval(IGA_Shape0(p),U)
    end function IGA_Point_Der0_S

    function IGA_Point_Der0_V(p,U) result(V)
      implicit none
      type(IGAPoint), intent(in) :: p
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:,:) ! dof,nen
      scalar (kind=IGA_SCALAR_KIND)  :: V(DOF)            ! dim,dof
      V = IGA_Eval(IGA_Shape0(p),U)
    end function IGA_Point_Der0_V

    function IGA_Point_Der1_S(p,U) result(V)
      implicit none
      type(IGAPoint), intent(in) :: p
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:) ! nen
      scalar (kind=IGA_SCALAR_KIND)  :: V(DIM)          ! dim
      V = IGA_Eval(IGA_Shape1(p),U)
    end function IGA_Point_Der1_S

    function IGA_Point_Der1_V(p,U) result(V)
      implicit none
      type(IGAPoint), intent(in) :: p
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:,:) ! dof,nen
      scalar (kind=IGA_SCALAR_KIND)  :: V(DIM,DOF)        ! dim,dof
      V = IGA_Eval(IGA_Shape1(p),U)
    end function IGA_Point_Der1_V

    function IGA_Point_Der2_S(p,U) result(V)
      implicit none
      type(IGAPoint), intent(in) :: p
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:) ! nen
      scalar (kind=IGA_SCALAR_KIND)  :: V(DIM,DIM)      ! dim,dim
      V = IGA_Eval(IGA_Shape2(p),U)
    end function IGA_Point_Der2_S

    function IGA_Point_Der2_V(p,U) result(V)
      implicit none
      type(IGAPoint), intent(in) :: p
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:,:) ! dof,nen
      scalar (kind=IGA_SCALAR_KIND)  :: V(DIM,DIM,DOF)    ! dim,dim,dof
      V = IGA_Eval(IGA_Shape2(p),U)
    end function IGA_Point_Der2_V

    function IGA_Point_Der3_S(p,U) result(V)
      implicit none
      type(IGAPoint), intent(in) :: p
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:) ! nen
      scalar (kind=IGA_SCALAR_KIND)  :: V(DIM,DIM,DIM)  ! dim,dim,dim
      V = IGA_Eval(IGA_Shape3(p),U)
    end function IGA_Point_Der3_S

    function IGA_Point_Der3_V(p,U) result(V)
      implicit none
      type(IGAPoint), intent(in) :: p
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:,:)  ! dof,nen
      scalar (kind=IGA_SCALAR_KIND)  :: V(DIM,DIM,DIM,DOF) ! dim,dim,dof
      V = IGA_Eval(IGA_Shape3(p),U)
    end function IGA_Point_Der3_V

    function IGA_Point_Div(p,U) result (V)
      implicit none
      type(IGAPoint), intent(in) :: p
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:,:) ! dim,nen
      scalar (kind=IGA_SCALAR_KIND)  :: V(DIM)            ! dim
      V = IGA_Shape_Div(IGA_Shape1(p),U)
    end function IGA_Point_Div

    function IGA_Point_Del2_S(p,U) result (V)
      implicit none
      type(IGAPoint), intent(in) :: p
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:) ! nen
      scalar (kind=IGA_SCALAR_KIND)  :: V
      V = IGA_Shape_Del2_S(IGA_Shape2(p),U)
    end function IGA_Point_Del2_S

    function IGA_Point_Del2_V(p,U) result (V)
      implicit none
      type(IGAPoint), intent(in) :: p
      scalar (kind=IGA_SCALAR_KIND), intent(in) :: U(:,:) ! dof,nen
      scalar (kind=IGA_SCALAR_KIND)  :: V(DOF)
      V = IGA_Shape_Del2_V(IGA_Shape2(p),U)
    end function IGA_Point_Del2_V

#undef DIM
#undef DOF

end module PetIGA
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.