compile_subdomains

dolfin.compilemodules.subdomains.compile_subdomains(cppcode)

Compile C++ string expressions into SubDomain instances.

Arguments
expressions
a string or a list of strings containing expressions in C++ syntax.

NOTE: This function is deprecated. Use CompiledSubDomain instead.

If expressions is a str, it is interpreted as a C++ string with complete implementations of subclasses of SubDomain. The compiled subdomains returned will be in the same order as they are defined in this code.

If it is a list, each item of the list is interpreted as a logical inside expression, and the compiled subdomains returned will be in the same order as they occur in this list.

If an expression string contains a name, it is assumed to be a scalar variable name, and is added as a public member of the generated subdomain.

Examples of usage

left  = compile_subdomains("x[0] == 0")
right = compile_subdomains("x[1] == 1")

or

bc = compile_subdomains(["x[0] == 0", "x[1] == 1"])