--- Begin Message ---
------------------------------------------------------------
revno: 200
committer: Andre Massing <massing@xxxxxxxxx>
branch nick: nitsche_sandbox
timestamp: Fri 2011-01-14 13:38:45 +0100
message:
Fixed compile errors in QuadratureRule and created the most const function ever:
double const * const * const points() const :)
modified:
nitsche_method/assembler/assemble_nitsche.cpp
nitsche_method/overlapping_meshes/CutFacet.h
nitsche_method/quadrature/QuadratureRule.h
--
lp:~massing/dolfin/sandbox_branch
https://code.launchpad.net/~massing/dolfin/sandbox_branch
You are subscribed to branch lp:~massing/dolfin/sandbox_branch.
To unsubscribe from this branch go to https://code.launchpad.net/~massing/dolfin/sandbox_branch/+edit-subscription
=== modified file 'nitsche_method/assembler/assemble_nitsche.cpp'
--- nitsche_method/assembler/assemble_nitsche.cpp 2011-01-14 11:11:44 +0000
+++ nitsche_method/assembler/assemble_nitsche.cpp 2011-01-14 12:38:45 +0000
@@ -22,10 +22,9 @@
#include "../overlapping_meshes/OverlappingMeshes.h"
#include "../overlapping_meshes/EntityToPolyhedron.h"
#include "../overlapping_meshes/CutCell.h"
-#include "../overlapping_meshes/CutFacet.h"
+//#include "../overlapping_meshes/CutFacet.h"
#include "../quadrature/QuadratureRuleCache.h"
-
using namespace dolfin;
using dolfin::uint;
@@ -185,7 +184,7 @@
const Form& a = a_nit.a0();
const Mesh& mesh = a.mesh();
const OverlappingMeshes & overlapping_meshes = a_nit.overlapping_meshes();
- QuadratureRuleCacheBase & overlapping_domain_quadrature_cache = a_nit.overlapping_domain_quadrature_cache();
+ const QuadratureRuleCacheBase & overlapping_domain_quadrature_cache = a_nit.overlapping_domain_quadrature_cache();
// Cell integral
ufc::cell_integral* integral = ufc.cell_integrals[0].get();
@@ -317,11 +316,11 @@
{
const uint global_offset = a0.function_space(i)->dofmap().global_dimension();
const uint local_offset = a0.function_space(i)->dofmap().local_dimension(ufc_0.cell0);
- a0.function_space(i)->dofmap().tabulate_dofs(a_nit.dofs[i], ufc_0.cell, cell0.index());
- a1.function_space(i)->dofmap().tabulate_dofs(a_nit.dofs[i] + local_offset, ufc_1.cell, cell1.index());
+ a0.function_space(i)->dofmap().tabulate_dofs(a_nit.interface_dofs[i], ufc_0.cell, cell0.index());
+ a1.function_space(i)->dofmap().tabulate_dofs(a_nit.interface_dofs[i] + local_offset, ufc_1.cell, cell1.index());
//Shift dofs of the second form.
for (uint j = 0; j < ufc_1.local_dimensions[i]; ++j)
- dofs[i][j+local_offset] = dofs[i][j] + global_offset;
+ a_nit.interface_dofs[i][j+local_offset] += global_offset;
}
// Tabulate interface tensor.
=== modified file 'nitsche_method/overlapping_meshes/CutFacet.h'
--- nitsche_method/overlapping_meshes/CutFacet.h 2011-01-10 17:10:57 +0000
+++ nitsche_method/overlapping_meshes/CutFacet.h 2011-01-14 12:38:45 +0000
@@ -4,7 +4,7 @@
// Modified by André Massing, 2010
//
// First added: 2010-12-01
-// Last changed: 2011-01-10
+// Last changed: 2011-01-14
//
// Description: Implementation of needed iterators, gluing OverlappingMeshes class
// and assembler. NOTE: This is similiar to and a simply version of the
@@ -116,6 +116,6 @@
uint _pos_end;
CutFacetPart _cut_facet_part;
- }
-
+ };
+}
#endif // ----- #ifndef __CUTFACET_H -----
=== modified file 'nitsche_method/quadrature/QuadratureRule.h'
--- nitsche_method/quadrature/QuadratureRule.h 2011-01-13 11:13:58 +0000
+++ nitsche_method/quadrature/QuadratureRule.h 2011-01-14 12:38:45 +0000
@@ -4,7 +4,7 @@
// Modified by André Massing, 2010
//
// First added: 2010-12-13
-// Last changed: 2011-01-13
+// Last changed: 2011-01-14
#ifndef __QUADRATURERULE_H
#define __QUADRATURERULE_H
@@ -45,10 +45,10 @@
// Quadrature points
// Make const where possible
- double ** points() { return _points; }
+ double const * const * const points() const { return _points; }
// Quadrature weights
- double * weights() { return _weights; }
+ double const * weights() const { return _weights; }
// Sum of the weights, which gives area, volume etc. depending on
// geometry.
--- End Message ---