~corrado-maurini/dolfin/tao

« back to all changes in this revision

Viewing changes to bench/fem/multicore/cpp/NavierStokes.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:
14
14
//   error_control:                  False
15
15
//   form_postfix:                   True
16
16
//   format:                         'dolfin'
17
 
//   log_level:                      10
 
17
//   log_level:                      20
18
18
//   log_prefix:                     ''
19
 
//   no_ferari:                      True
20
19
//   optimize:                       True
21
20
//   output_dir:                     '.'
22
21
//   precision:                      15
6341
6340
  /// Return a string identifying the form
6342
6341
  virtual const char* signature() const
6343
6342
  {
6344
 
    return "7884fb18fb9f3a2b6de63398446bc7318d0be279eb4921af4e00bbd82073a164f379f270502d1919efda76bd8d5d9502b8d1f0fa278cfb32b1db3db054259904";
 
6343
    return "e6f7aaa87285d7f42ab86f9353b37f890e5009d94423241093314a2c7ec8e3568ac90f8eec6ae835fd8106c54bba9d84a86a9ba9aa74c8e87b19c677be4dd971";
6345
6344
  }
6346
6345
 
6347
6346
  /// Return the rank of the global tensor (r)
6500
6499
 
6501
6500
// DOLFIN includes
6502
6501
#include <dolfin/common/NoDeleter.h>
 
6502
#include <dolfin/mesh/Restriction.h>
6503
6503
#include <dolfin/fem/FiniteElement.h>
6504
6504
#include <dolfin/fem/DofMap.h>
6505
6505
#include <dolfin/fem/Form.h>
6516
6516
{
6517
6517
public:
6518
6518
 
 
6519
  //--- Constructors for standard function space, 2 different versions ---
 
6520
 
 
6521
  // Create standard function space (reference version)
6519
6522
  CoefficientSpace_d1(const dolfin::Mesh& mesh):
6520
6523
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
6521
6524
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
6524
6527
    // Do nothing
6525
6528
  }
6526
6529
 
6527
 
  CoefficientSpace_d1(dolfin::Mesh& mesh):
6528
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
6529
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
6530
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_0()), mesh)))
6531
 
  {
6532
 
    // Do nothing
6533
 
  }
6534
 
 
6535
 
  CoefficientSpace_d1(boost::shared_ptr<dolfin::Mesh> mesh):
6536
 
    dolfin::FunctionSpace(mesh,
6537
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
6538
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_0()), *mesh)))
6539
 
  {
6540
 
      // Do nothing
6541
 
  }
6542
 
 
 
6530
  // Create standard function space (shared pointer version)
6543
6531
  CoefficientSpace_d1(boost::shared_ptr<const dolfin::Mesh> mesh):
6544
6532
    dolfin::FunctionSpace(mesh,
6545
6533
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
6546
6534
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_0()), *mesh)))
6547
6535
  {
6548
 
      // Do nothing
6549
 
  }
6550
 
 
 
6536
    // Do nothing
 
6537
  }
 
6538
 
 
6539
  //--- Constructors for restricted function space, 2 different versions ---
 
6540
 
 
6541
  // Create restricted function space (reference version)
 
6542
  CoefficientSpace_d1(const dolfin::Restriction& restriction):
 
6543
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
 
6544
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
 
6545
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_0()),
 
6546
                                                                                     reference_to_no_delete_pointer(restriction))))
 
6547
  {
 
6548
    // Do nothing
 
6549
  }
 
6550
 
 
6551
  // Create restricted function space (shared pointer version)
 
6552
  CoefficientSpace_d1(boost::shared_ptr<const dolfin::Restriction> restriction):
 
6553
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
 
6554
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
 
6555
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_0()),
 
6556
                                                                                     restriction)))
 
6557
  {
 
6558
    // Do nothing
 
6559
  }
 
6560
 
 
6561
  // Copy constructor
6551
6562
  ~CoefficientSpace_d1()
6552
6563
  {
6553
6564
  }
6558
6569
{
6559
6570
public:
6560
6571
 
 
6572
  //--- Constructors for standard function space, 2 different versions ---
 
6573
 
 
6574
  // Create standard function space (reference version)
6561
6575
  CoefficientSpace_d2(const dolfin::Mesh& mesh):
6562
6576
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
6563
6577
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
6566
6580
    // Do nothing
6567
6581
  }
6568
6582
 
6569
 
  CoefficientSpace_d2(dolfin::Mesh& mesh):
6570
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
6571
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
6572
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_0()), mesh)))
6573
 
  {
6574
 
    // Do nothing
6575
 
  }
6576
 
 
6577
 
  CoefficientSpace_d2(boost::shared_ptr<dolfin::Mesh> mesh):
6578
 
    dolfin::FunctionSpace(mesh,
6579
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
6580
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_0()), *mesh)))
6581
 
  {
6582
 
      // Do nothing
6583
 
  }
6584
 
 
 
6583
  // Create standard function space (shared pointer version)
6585
6584
  CoefficientSpace_d2(boost::shared_ptr<const dolfin::Mesh> mesh):
6586
6585
    dolfin::FunctionSpace(mesh,
6587
6586
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
6588
6587
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_0()), *mesh)))
6589
6588
  {
6590
 
      // Do nothing
6591
 
  }
6592
 
 
 
6589
    // Do nothing
 
6590
  }
 
6591
 
 
6592
  //--- Constructors for restricted function space, 2 different versions ---
 
6593
 
 
6594
  // Create restricted function space (reference version)
 
6595
  CoefficientSpace_d2(const dolfin::Restriction& restriction):
 
6596
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
 
6597
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
 
6598
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_0()),
 
6599
                                                                                     reference_to_no_delete_pointer(restriction))))
 
6600
  {
 
6601
    // Do nothing
 
6602
  }
 
6603
 
 
6604
  // Create restricted function space (shared pointer version)
 
6605
  CoefficientSpace_d2(boost::shared_ptr<const dolfin::Restriction> restriction):
 
6606
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
 
6607
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
 
6608
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_0()),
 
6609
                                                                                     restriction)))
 
6610
  {
 
6611
    // Do nothing
 
6612
  }
 
6613
 
 
6614
  // Copy constructor
6593
6615
  ~CoefficientSpace_d2()
6594
6616
  {
6595
6617
  }
6600
6622
{
6601
6623
public:
6602
6624
 
 
6625
  //--- Constructors for standard function space, 2 different versions ---
 
6626
 
 
6627
  // Create standard function space (reference version)
6603
6628
  CoefficientSpace_k(const dolfin::Mesh& mesh):
6604
6629
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
6605
6630
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
6608
6633
    // Do nothing
6609
6634
  }
6610
6635
 
6611
 
  CoefficientSpace_k(dolfin::Mesh& mesh):
6612
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
6613
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
6614
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_0()), mesh)))
6615
 
  {
6616
 
    // Do nothing
6617
 
  }
6618
 
 
6619
 
  CoefficientSpace_k(boost::shared_ptr<dolfin::Mesh> mesh):
6620
 
    dolfin::FunctionSpace(mesh,
6621
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
6622
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_0()), *mesh)))
6623
 
  {
6624
 
      // Do nothing
6625
 
  }
6626
 
 
 
6636
  // Create standard function space (shared pointer version)
6627
6637
  CoefficientSpace_k(boost::shared_ptr<const dolfin::Mesh> mesh):
6628
6638
    dolfin::FunctionSpace(mesh,
6629
6639
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
6630
6640
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_0()), *mesh)))
6631
6641
  {
6632
 
      // Do nothing
6633
 
  }
6634
 
 
 
6642
    // Do nothing
 
6643
  }
 
6644
 
 
6645
  //--- Constructors for restricted function space, 2 different versions ---
 
6646
 
 
6647
  // Create restricted function space (reference version)
 
6648
  CoefficientSpace_k(const dolfin::Restriction& restriction):
 
6649
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
 
6650
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
 
6651
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_0()),
 
6652
                                                                                     reference_to_no_delete_pointer(restriction))))
 
6653
  {
 
6654
    // Do nothing
 
6655
  }
 
6656
 
 
6657
  // Create restricted function space (shared pointer version)
 
6658
  CoefficientSpace_k(boost::shared_ptr<const dolfin::Restriction> restriction):
 
6659
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
 
6660
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
 
6661
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_0()),
 
6662
                                                                                     restriction)))
 
6663
  {
 
6664
    // Do nothing
 
6665
  }
 
6666
 
 
6667
  // Copy constructor
6635
6668
  ~CoefficientSpace_k()
6636
6669
  {
6637
6670
  }
6642
6675
{
6643
6676
public:
6644
6677
 
 
6678
  //--- Constructors for standard function space, 2 different versions ---
 
6679
 
 
6680
  // Create standard function space (reference version)
6645
6681
  CoefficientSpace_nu(const dolfin::Mesh& mesh):
6646
6682
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
6647
6683
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
6650
6686
    // Do nothing
6651
6687
  }
6652
6688
 
6653
 
  CoefficientSpace_nu(dolfin::Mesh& mesh):
6654
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
6655
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
6656
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_0()), mesh)))
6657
 
  {
6658
 
    // Do nothing
6659
 
  }
6660
 
 
6661
 
  CoefficientSpace_nu(boost::shared_ptr<dolfin::Mesh> mesh):
6662
 
    dolfin::FunctionSpace(mesh,
6663
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
6664
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_0()), *mesh)))
6665
 
  {
6666
 
      // Do nothing
6667
 
  }
6668
 
 
 
6689
  // Create standard function space (shared pointer version)
6669
6690
  CoefficientSpace_nu(boost::shared_ptr<const dolfin::Mesh> mesh):
6670
6691
    dolfin::FunctionSpace(mesh,
6671
6692
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
6672
6693
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_0()), *mesh)))
6673
6694
  {
6674
 
      // Do nothing
6675
 
  }
6676
 
 
 
6695
    // Do nothing
 
6696
  }
 
6697
 
 
6698
  //--- Constructors for restricted function space, 2 different versions ---
 
6699
 
 
6700
  // Create restricted function space (reference version)
 
6701
  CoefficientSpace_nu(const dolfin::Restriction& restriction):
 
6702
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
 
6703
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
 
6704
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_0()),
 
6705
                                                                                     reference_to_no_delete_pointer(restriction))))
 
6706
  {
 
6707
    // Do nothing
 
6708
  }
 
6709
 
 
6710
  // Create restricted function space (shared pointer version)
 
6711
  CoefficientSpace_nu(boost::shared_ptr<const dolfin::Restriction> restriction):
 
6712
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
 
6713
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_0()))),
 
6714
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_0()),
 
6715
                                                                                     restriction)))
 
6716
  {
 
6717
    // Do nothing
 
6718
  }
 
6719
 
 
6720
  // Copy constructor
6677
6721
  ~CoefficientSpace_nu()
6678
6722
  {
6679
6723
  }
6684
6728
{
6685
6729
public:
6686
6730
 
 
6731
  //--- Constructors for standard function space, 2 different versions ---
 
6732
 
 
6733
  // Create standard function space (reference version)
6687
6734
  CoefficientSpace_w(const dolfin::Mesh& mesh):
6688
6735
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
6689
6736
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
6692
6739
    // Do nothing
6693
6740
  }
6694
6741
 
6695
 
  CoefficientSpace_w(dolfin::Mesh& mesh):
6696
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
6697
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
6698
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()), mesh)))
6699
 
  {
6700
 
    // Do nothing
6701
 
  }
6702
 
 
6703
 
  CoefficientSpace_w(boost::shared_ptr<dolfin::Mesh> mesh):
6704
 
    dolfin::FunctionSpace(mesh,
6705
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
6706
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()), *mesh)))
6707
 
  {
6708
 
      // Do nothing
6709
 
  }
6710
 
 
 
6742
  // Create standard function space (shared pointer version)
6711
6743
  CoefficientSpace_w(boost::shared_ptr<const dolfin::Mesh> mesh):
6712
6744
    dolfin::FunctionSpace(mesh,
6713
6745
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
6714
6746
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()), *mesh)))
6715
6747
  {
6716
 
      // Do nothing
6717
 
  }
6718
 
 
 
6748
    // Do nothing
 
6749
  }
 
6750
 
 
6751
  //--- Constructors for restricted function space, 2 different versions ---
 
6752
 
 
6753
  // Create restricted function space (reference version)
 
6754
  CoefficientSpace_w(const dolfin::Restriction& restriction):
 
6755
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
 
6756
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
 
6757
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()),
 
6758
                                                                                     reference_to_no_delete_pointer(restriction))))
 
6759
  {
 
6760
    // Do nothing
 
6761
  }
 
6762
 
 
6763
  // Create restricted function space (shared pointer version)
 
6764
  CoefficientSpace_w(boost::shared_ptr<const dolfin::Restriction> restriction):
 
6765
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
 
6766
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
 
6767
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()),
 
6768
                                                                                     restriction)))
 
6769
  {
 
6770
    // Do nothing
 
6771
  }
 
6772
 
 
6773
  // Copy constructor
6719
6774
  ~CoefficientSpace_w()
6720
6775
  {
6721
6776
  }
6722
6777
 
6723
6778
};
6724
6779
 
6725
 
class Form_0_FunctionSpace_0: public dolfin::FunctionSpace
6726
 
{
6727
 
public:
6728
 
 
6729
 
  Form_0_FunctionSpace_0(const dolfin::Mesh& mesh):
6730
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
6731
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
6732
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()), mesh)))
6733
 
  {
6734
 
    // Do nothing
6735
 
  }
6736
 
 
6737
 
  Form_0_FunctionSpace_0(dolfin::Mesh& mesh):
6738
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
6739
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
6740
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()), mesh)))
6741
 
  {
6742
 
    // Do nothing
6743
 
  }
6744
 
 
6745
 
  Form_0_FunctionSpace_0(boost::shared_ptr<dolfin::Mesh> mesh):
6746
 
    dolfin::FunctionSpace(mesh,
6747
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
6748
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()), *mesh)))
6749
 
  {
6750
 
      // Do nothing
6751
 
  }
6752
 
 
6753
 
  Form_0_FunctionSpace_0(boost::shared_ptr<const dolfin::Mesh> mesh):
6754
 
    dolfin::FunctionSpace(mesh,
6755
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
6756
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()), *mesh)))
6757
 
  {
6758
 
      // Do nothing
6759
 
  }
6760
 
 
6761
 
  ~Form_0_FunctionSpace_0()
6762
 
  {
6763
 
  }
6764
 
 
6765
 
};
6766
 
 
6767
 
class Form_0_FunctionSpace_1: public dolfin::FunctionSpace
6768
 
{
6769
 
public:
6770
 
 
6771
 
  Form_0_FunctionSpace_1(const dolfin::Mesh& mesh):
6772
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
6773
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
6774
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()), mesh)))
6775
 
  {
6776
 
    // Do nothing
6777
 
  }
6778
 
 
6779
 
  Form_0_FunctionSpace_1(dolfin::Mesh& mesh):
6780
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
6781
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
6782
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()), mesh)))
6783
 
  {
6784
 
    // Do nothing
6785
 
  }
6786
 
 
6787
 
  Form_0_FunctionSpace_1(boost::shared_ptr<dolfin::Mesh> mesh):
6788
 
    dolfin::FunctionSpace(mesh,
6789
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
6790
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()), *mesh)))
6791
 
  {
6792
 
      // Do nothing
6793
 
  }
6794
 
 
6795
 
  Form_0_FunctionSpace_1(boost::shared_ptr<const dolfin::Mesh> mesh):
6796
 
    dolfin::FunctionSpace(mesh,
6797
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
6798
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()), *mesh)))
6799
 
  {
6800
 
      // Do nothing
6801
 
  }
6802
 
 
6803
 
  ~Form_0_FunctionSpace_1()
6804
 
  {
6805
 
  }
6806
 
 
6807
 
};
6808
 
 
6809
 
typedef CoefficientSpace_w Form_0_FunctionSpace_2;
6810
 
 
6811
 
typedef CoefficientSpace_d1 Form_0_FunctionSpace_3;
6812
 
 
6813
 
typedef CoefficientSpace_d2 Form_0_FunctionSpace_4;
6814
 
 
6815
 
typedef CoefficientSpace_k Form_0_FunctionSpace_5;
6816
 
 
6817
 
typedef CoefficientSpace_nu Form_0_FunctionSpace_6;
6818
 
 
6819
 
class Form_0: public dolfin::Form
 
6780
class Form_a_FunctionSpace_0: public dolfin::FunctionSpace
 
6781
{
 
6782
public:
 
6783
 
 
6784
  //--- Constructors for standard function space, 2 different versions ---
 
6785
 
 
6786
  // Create standard function space (reference version)
 
6787
  Form_a_FunctionSpace_0(const dolfin::Mesh& mesh):
 
6788
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
 
6789
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
 
6790
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()), mesh)))
 
6791
  {
 
6792
    // Do nothing
 
6793
  }
 
6794
 
 
6795
  // Create standard function space (shared pointer version)
 
6796
  Form_a_FunctionSpace_0(boost::shared_ptr<const dolfin::Mesh> mesh):
 
6797
    dolfin::FunctionSpace(mesh,
 
6798
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
 
6799
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()), *mesh)))
 
6800
  {
 
6801
    // Do nothing
 
6802
  }
 
6803
 
 
6804
  //--- Constructors for restricted function space, 2 different versions ---
 
6805
 
 
6806
  // Create restricted function space (reference version)
 
6807
  Form_a_FunctionSpace_0(const dolfin::Restriction& restriction):
 
6808
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
 
6809
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
 
6810
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()),
 
6811
                                                                                     reference_to_no_delete_pointer(restriction))))
 
6812
  {
 
6813
    // Do nothing
 
6814
  }
 
6815
 
 
6816
  // Create restricted function space (shared pointer version)
 
6817
  Form_a_FunctionSpace_0(boost::shared_ptr<const dolfin::Restriction> restriction):
 
6818
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
 
6819
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
 
6820
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()),
 
6821
                                                                                     restriction)))
 
6822
  {
 
6823
    // Do nothing
 
6824
  }
 
6825
 
 
6826
  // Copy constructor
 
6827
  ~Form_a_FunctionSpace_0()
 
6828
  {
 
6829
  }
 
6830
 
 
6831
};
 
6832
 
 
6833
class Form_a_FunctionSpace_1: public dolfin::FunctionSpace
 
6834
{
 
6835
public:
 
6836
 
 
6837
  //--- Constructors for standard function space, 2 different versions ---
 
6838
 
 
6839
  // Create standard function space (reference version)
 
6840
  Form_a_FunctionSpace_1(const dolfin::Mesh& mesh):
 
6841
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
 
6842
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
 
6843
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()), mesh)))
 
6844
  {
 
6845
    // Do nothing
 
6846
  }
 
6847
 
 
6848
  // Create standard function space (shared pointer version)
 
6849
  Form_a_FunctionSpace_1(boost::shared_ptr<const dolfin::Mesh> mesh):
 
6850
    dolfin::FunctionSpace(mesh,
 
6851
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
 
6852
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()), *mesh)))
 
6853
  {
 
6854
    // Do nothing
 
6855
  }
 
6856
 
 
6857
  //--- Constructors for restricted function space, 2 different versions ---
 
6858
 
 
6859
  // Create restricted function space (reference version)
 
6860
  Form_a_FunctionSpace_1(const dolfin::Restriction& restriction):
 
6861
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
 
6862
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
 
6863
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()),
 
6864
                                                                                     reference_to_no_delete_pointer(restriction))))
 
6865
  {
 
6866
    // Do nothing
 
6867
  }
 
6868
 
 
6869
  // Create restricted function space (shared pointer version)
 
6870
  Form_a_FunctionSpace_1(boost::shared_ptr<const dolfin::Restriction> restriction):
 
6871
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
 
6872
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new navierstokes_finite_element_2()))),
 
6873
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new navierstokes_dofmap_2()),
 
6874
                                                                                     restriction)))
 
6875
  {
 
6876
    // Do nothing
 
6877
  }
 
6878
 
 
6879
  // Copy constructor
 
6880
  ~Form_a_FunctionSpace_1()
 
6881
  {
 
6882
  }
 
6883
 
 
6884
};
 
6885
 
 
6886
typedef CoefficientSpace_w Form_a_FunctionSpace_2;
 
6887
 
 
6888
typedef CoefficientSpace_d1 Form_a_FunctionSpace_3;
 
6889
 
 
6890
typedef CoefficientSpace_d2 Form_a_FunctionSpace_4;
 
6891
 
 
6892
typedef CoefficientSpace_k Form_a_FunctionSpace_5;
 
6893
 
 
6894
typedef CoefficientSpace_nu Form_a_FunctionSpace_6;
 
6895
 
 
6896
class Form_a: public dolfin::Form
6820
6897
{
6821
6898
public:
6822
6899
 
6823
6900
  // Constructor
6824
 
  Form_0(const dolfin::FunctionSpace& V1, const dolfin::FunctionSpace& V0):
 
6901
  Form_a(const dolfin::FunctionSpace& V1, const dolfin::FunctionSpace& V0):
6825
6902
    dolfin::Form(2, 5), w(*this, 0), d1(*this, 1), d2(*this, 2), k(*this, 3), nu(*this, 4)
6826
6903
  {
6827
6904
    _function_spaces[0] = reference_to_no_delete_pointer(V0);
6831
6908
  }
6832
6909
 
6833
6910
  // Constructor
6834
 
  Form_0(const dolfin::FunctionSpace& V1, const dolfin::FunctionSpace& V0, const dolfin::GenericFunction& w, const dolfin::GenericFunction& d1, const dolfin::GenericFunction& d2, const dolfin::GenericFunction& k, const dolfin::GenericFunction& nu):
 
6911
  Form_a(const dolfin::FunctionSpace& V1, const dolfin::FunctionSpace& V0, const dolfin::GenericFunction& w, const dolfin::GenericFunction& d1, const dolfin::GenericFunction& d2, const dolfin::GenericFunction& k, const dolfin::GenericFunction& nu):
6835
6912
    dolfin::Form(2, 5), w(*this, 0), d1(*this, 1), d2(*this, 2), k(*this, 3), nu(*this, 4)
6836
6913
  {
6837
6914
    _function_spaces[0] = reference_to_no_delete_pointer(V0);
6847
6924
  }
6848
6925
 
6849
6926
  // Constructor
6850
 
  Form_0(const dolfin::FunctionSpace& V1, const dolfin::FunctionSpace& V0, boost::shared_ptr<const dolfin::GenericFunction> w, boost::shared_ptr<const dolfin::GenericFunction> d1, boost::shared_ptr<const dolfin::GenericFunction> d2, boost::shared_ptr<const dolfin::GenericFunction> k, boost::shared_ptr<const dolfin::GenericFunction> nu):
 
6927
  Form_a(const dolfin::FunctionSpace& V1, const dolfin::FunctionSpace& V0, boost::shared_ptr<const dolfin::GenericFunction> w, boost::shared_ptr<const dolfin::GenericFunction> d1, boost::shared_ptr<const dolfin::GenericFunction> d2, boost::shared_ptr<const dolfin::GenericFunction> k, boost::shared_ptr<const dolfin::GenericFunction> nu):
6851
6928
    dolfin::Form(2, 5), w(*this, 0), d1(*this, 1), d2(*this, 2), k(*this, 3), nu(*this, 4)
6852
6929
  {
6853
6930
    _function_spaces[0] = reference_to_no_delete_pointer(V0);
6863
6940
  }
6864
6941
 
6865
6942
  // Constructor
6866
 
  Form_0(boost::shared_ptr<const dolfin::FunctionSpace> V1, boost::shared_ptr<const dolfin::FunctionSpace> V0):
 
6943
  Form_a(boost::shared_ptr<const dolfin::FunctionSpace> V1, boost::shared_ptr<const dolfin::FunctionSpace> V0):
6867
6944
    dolfin::Form(2, 5), w(*this, 0), d1(*this, 1), d2(*this, 2), k(*this, 3), nu(*this, 4)
6868
6945
  {
6869
6946
    _function_spaces[0] = V0;
6873
6950
  }
6874
6951
 
6875
6952
  // Constructor
6876
 
  Form_0(boost::shared_ptr<const dolfin::FunctionSpace> V1, boost::shared_ptr<const dolfin::FunctionSpace> V0, const dolfin::GenericFunction& w, const dolfin::GenericFunction& d1, const dolfin::GenericFunction& d2, const dolfin::GenericFunction& k, const dolfin::GenericFunction& nu):
 
6953
  Form_a(boost::shared_ptr<const dolfin::FunctionSpace> V1, boost::shared_ptr<const dolfin::FunctionSpace> V0, const dolfin::GenericFunction& w, const dolfin::GenericFunction& d1, const dolfin::GenericFunction& d2, const dolfin::GenericFunction& k, const dolfin::GenericFunction& nu):
6877
6954
    dolfin::Form(2, 5), w(*this, 0), d1(*this, 1), d2(*this, 2), k(*this, 3), nu(*this, 4)
6878
6955
  {
6879
6956
    _function_spaces[0] = V0;
6889
6966
  }
6890
6967
 
6891
6968
  // Constructor
6892
 
  Form_0(boost::shared_ptr<const dolfin::FunctionSpace> V1, boost::shared_ptr<const dolfin::FunctionSpace> V0, boost::shared_ptr<const dolfin::GenericFunction> w, boost::shared_ptr<const dolfin::GenericFunction> d1, boost::shared_ptr<const dolfin::GenericFunction> d2, boost::shared_ptr<const dolfin::GenericFunction> k, boost::shared_ptr<const dolfin::GenericFunction> nu):
 
6969
  Form_a(boost::shared_ptr<const dolfin::FunctionSpace> V1, boost::shared_ptr<const dolfin::FunctionSpace> V0, boost::shared_ptr<const dolfin::GenericFunction> w, boost::shared_ptr<const dolfin::GenericFunction> d1, boost::shared_ptr<const dolfin::GenericFunction> d2, boost::shared_ptr<const dolfin::GenericFunction> k, boost::shared_ptr<const dolfin::GenericFunction> nu):
6893
6970
    dolfin::Form(2, 5), w(*this, 0), d1(*this, 1), d2(*this, 2), k(*this, 3), nu(*this, 4)
6894
6971
  {
6895
6972
    _function_spaces[0] = V0;
6905
6982
  }
6906
6983
 
6907
6984
  // Destructor
6908
 
  ~Form_0()
 
6985
  ~Form_a()
6909
6986
  {}
6910
6987
 
6911
6988
  /// Return the number of the coefficient with this name
6912
 
  virtual dolfin::uint coefficient_number(const std::string& name) const
 
6989
  virtual std::size_t coefficient_number(const std::string& name) const
6913
6990
  {
6914
6991
    if (name == "w")
6915
6992
      return 0;
6929
7006
  }
6930
7007
 
6931
7008
  /// Return the name of the coefficient with this number
6932
 
  virtual std::string coefficient_name(dolfin::uint i) const
 
7009
  virtual std::string coefficient_name(std::size_t i) const
6933
7010
  {
6934
7011
    switch (i)
6935
7012
    {
6952
7029
  }
6953
7030
 
6954
7031
  // Typedefs
6955
 
  typedef Form_0_FunctionSpace_0 TestSpace;
6956
 
  typedef Form_0_FunctionSpace_1 TrialSpace;
6957
 
  typedef Form_0_FunctionSpace_2 CoefficientSpace_w;
6958
 
  typedef Form_0_FunctionSpace_3 CoefficientSpace_d1;
6959
 
  typedef Form_0_FunctionSpace_4 CoefficientSpace_d2;
6960
 
  typedef Form_0_FunctionSpace_5 CoefficientSpace_k;
6961
 
  typedef Form_0_FunctionSpace_6 CoefficientSpace_nu;
 
7032
  typedef Form_a_FunctionSpace_0 TestSpace;
 
7033
  typedef Form_a_FunctionSpace_1 TrialSpace;
 
7034
  typedef Form_a_FunctionSpace_2 CoefficientSpace_w;
 
7035
  typedef Form_a_FunctionSpace_3 CoefficientSpace_d1;
 
7036
  typedef Form_a_FunctionSpace_4 CoefficientSpace_d2;
 
7037
  typedef Form_a_FunctionSpace_5 CoefficientSpace_k;
 
7038
  typedef Form_a_FunctionSpace_6 CoefficientSpace_nu;
6962
7039
 
6963
7040
  // Coefficients
6964
7041
  dolfin::CoefficientAssigner w;
6969
7046
};
6970
7047
 
6971
7048
// Class typedefs
6972
 
typedef Form_0 BilinearForm;
6973
 
typedef Form_0 JacobianForm;
6974
 
typedef Form_0::TestSpace FunctionSpace;
 
7049
typedef Form_a BilinearForm;
 
7050
typedef Form_a JacobianForm;
 
7051
typedef Form_a::TestSpace FunctionSpace;
6975
7052
 
6976
7053
}
6977
7054