On 5/4/21 6:15 PM, Abbas Ballout wrote:
I am running my code in Debug using the latest 9.3 release.
I have attached a minimal code and what it does it that it prints the 
constraints.

  * If BCs are applied for both parts of the system ,my output for the
    constraint is:

 1.      0 = 0
 2.      1 = 0
 3.      2 = 0
 4.      3 = 0
 5.      4 = 1.00000
 6.      5 = 0
 7.      6 = 1.00000
 8.      7 = 0

  * If BCs are applied for the first part of the system, my output for the
    constraint is:

 1.      0 = 0
 2.      2 = 0
 3.      4 = 1.00000
 4.      6 = 1.00000

  * If BCs are applied for he first partof the system my output for the
    constraint is:

 1.      1 = 0
 2.      3 = 0
 3.      5 = 0
 4.      7 = 0
Abbas,
excellent little test case -- thanks for shrinking things to a size that makes it easy for me to understand what is happening! I'm going to add a variation of your testcase to the test suite!

The problem is that you have 6 finite element components, but your boundary value function only provides 3 components. The function VectorTools::project_boundary_values_curl_conforming_l2 was missing a check for this to tell you about this requirement.

In any case, you can make things work by using this instead:
```
class BC_class : public Function<3>
{
public:
  BC_class()
    : Function<3>(6)
  {}

  void
  vector_value_list(const std::vector<Point<3>> &points,
                    std::vector<Vector<double>> &values) const override;
};

void
BC_class::vector_value_list(const std::vector<Point<3>> &points,
                            std::vector<Vector<double>> &values) const
{
  for (unsigned int i = 0; i < points.size(); ++i)
    {
      values[i][0] = 1.0;
      values[i][1] = 0.0;
      values[i][2] = 0.0;
      values[i][3] = 1.0;
      values[i][4] = 0.0;
      values[i][5] = 0.0;
    }
}
```

Best
 W.

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 [email protected]
                           www: http://www.math.colostate.edu/~bangerth/

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/7b048c04-7ecd-2177-ecd1-6de50a105c58%40colostate.edu.

Reply via email to