~corrado-maurini/dolfin/tao

« back to all changes in this revision

Viewing changes to demo/undocumented/nonmatching-interpolation/cpp/P1.h

  • Committer: corrado maurini
  • Date: 2012-12-18 12:16:08 UTC
  • mfrom: (6685.78.207 trunk)
  • Revision ID: corrado.maurini@upmc.fr-20121218121608-nk82ly9jgsld9u84
updating with trunk, fix uint in TAO solver and hacking the check for tao FindTAO.cmake

Show diffs side-by-side

added added

removed removed

Lines of Context:
1186
1186
 
1187
1187
// DOLFIN includes
1188
1188
#include <dolfin/common/NoDeleter.h>
 
1189
#include <dolfin/mesh/Restriction.h>
1189
1190
#include <dolfin/fem/FiniteElement.h>
1190
1191
#include <dolfin/fem/DofMap.h>
1191
1192
#include <dolfin/fem/Form.h>
1202
1203
{
1203
1204
public:
1204
1205
 
 
1206
  //--- Constructors for standard function space, 2 different versions ---
 
1207
 
 
1208
  // Create standard function space (reference version)
1205
1209
  FunctionSpace(const dolfin::Mesh& mesh):
1206
1210
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
1207
1211
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new p1_finite_element_0()))),
1210
1214
    // Do nothing
1211
1215
  }
1212
1216
 
1213
 
  FunctionSpace(dolfin::Mesh& mesh):
1214
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
1215
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new p1_finite_element_0()))),
1216
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new p1_dofmap_0()), mesh)))
1217
 
  {
1218
 
    // Do nothing
1219
 
  }
1220
 
 
1221
 
  FunctionSpace(boost::shared_ptr<dolfin::Mesh> mesh):
1222
 
    dolfin::FunctionSpace(mesh,
1223
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new p1_finite_element_0()))),
1224
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new p1_dofmap_0()), *mesh)))
1225
 
  {
1226
 
      // Do nothing
1227
 
  }
1228
 
 
 
1217
  // Create standard function space (shared pointer version)
1229
1218
  FunctionSpace(boost::shared_ptr<const dolfin::Mesh> mesh):
1230
1219
    dolfin::FunctionSpace(mesh,
1231
1220
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new p1_finite_element_0()))),
1232
1221
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new p1_dofmap_0()), *mesh)))
1233
1222
  {
1234
 
      // Do nothing
1235
 
  }
1236
 
 
 
1223
    // Do nothing
 
1224
  }
 
1225
 
 
1226
  //--- Constructors for restricted function space, 2 different versions ---
 
1227
 
 
1228
  // Create restricted function space (reference version)
 
1229
  FunctionSpace(const dolfin::Restriction& restriction):
 
1230
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
 
1231
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new p1_finite_element_0()))),
 
1232
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new p1_dofmap_0()),
 
1233
                                                                                     reference_to_no_delete_pointer(restriction))))
 
1234
  {
 
1235
    // Do nothing
 
1236
  }
 
1237
 
 
1238
  // Create restricted function space (shared pointer version)
 
1239
  FunctionSpace(boost::shared_ptr<const dolfin::Restriction> restriction):
 
1240
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
 
1241
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new p1_finite_element_0()))),
 
1242
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new p1_dofmap_0()),
 
1243
                                                                                     restriction)))
 
1244
  {
 
1245
    // Do nothing
 
1246
  }
 
1247
 
 
1248
  // Copy constructor
1237
1249
  ~FunctionSpace()
1238
1250
  {
1239
1251
  }