~fluidity-core/fluidity/sediment_restructure

« back to all changes in this revision

Viewing changes to assemble/Divergence_Matrix_CV.F90

merge with branch including remap_surface_to_field but then removed this change and approached it a different way which seems to work

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
      type(vector_field) :: field_bc
108
108
 
109
109
      real, dimension(:,:,:), allocatable :: ct_mat_local, ct_mat_local_bdy
110
 
      real, dimension(:), allocatable :: ct_rhs_local
 
110
      real, dimension(:,:), allocatable :: ct_rhs_local
111
111
 
112
112
      logical :: l_get_ct
113
113
 
316
316
        allocate(field_nodes_bdy(field%mesh%faces%shape%loc))
317
317
        allocate(test_nodes_bdy(test_mesh%faces%shape%loc))
318
318
        allocate(ct_mat_local_bdy(x%dim, test_mesh%faces%shape%loc, field%mesh%faces%shape%loc), &
319
 
                ct_rhs_local(test_mesh%faces%shape%loc))
 
319
                 ct_rhs_local(x%dim, test_mesh%faces%shape%loc))
320
320
  
321
321
        surface_element_loop: do sele = 1, surface_element_count(test_mesh)
322
322
  
366
366
                      if((present(ct_rhs)).and.(field_bc_type(dim, sele)==BC_TYPE_WEAKDIRICHLET)) then
367
367
  
368
368
                        if(multiphase) then
369
 
                           ct_rhs_local(iloc) = ct_rhs_local(iloc) + &
 
369
                           ct_rhs_local(dim, iloc) = ct_rhs_local(dim, iloc) - &
370
370
                                 field_cvbdyshape%n(jloc,ggi)*detwei_bdy(ggi)*nvfrac_gi_f(ggi)*&
371
371
                                 normal_bdy(dim,ggi)*field_bc_val(dim, jloc)
372
372
                        else
373
 
                           ct_rhs_local(iloc) = ct_rhs_local(iloc) + &
 
373
                           ct_rhs_local(dim, iloc) = ct_rhs_local(dim, iloc) - &
374
374
                                 field_cvbdyshape%n(jloc,ggi)*detwei_bdy(ggi)*normal_bdy(dim,ggi)*&
375
375
                                 field_bc_val(dim, jloc)
376
376
                        end if
403
403
  
404
404
            if((present(ct_rhs)).and.(field_bc_type(dim, sele)==BC_TYPE_WEAKDIRICHLET)) then
405
405
  
406
 
              call addto(ct_rhs, test_nodes_bdy, ct_rhs_local)
 
406
              call addto(ct_rhs, test_nodes_bdy, ct_rhs_local(dim,:))
407
407
  
408
408
            elseif(l_get_ct) then
409
409