Empty C++ subdomain does not compile

Issue #301 resolved
Jan Blechta created an issue

This code

from dolfin import *
CompiledSubDomain('false')

does not pass because false is treated as double variable by DOLFIN. Generated code:

class CompiledSubDomain68934a3e9455fa72420237eb05902327: public SubDomain
{
public:
  double false;

  CompiledSubDomain68934a3e9455fa72420237eb05902327()
  {
    false = 0;
  }

  /// Return true for points inside the sub domain
  bool inside(const Array<double>& x, bool on_boundary) const
  {
      return false;
  }

};

Comments (3)

  1. Log in to comment