Exemple #1
0
def makeTagField(functionspace):
    """
    this creates a data object making the tagged regions with the corresponding tag id 
    
    :param functionspace: function space to create tags for
    :type functionspace: `esys.escript.FunctionSpace` 
    :return: `esys.escript.Scalar` with tags 
    """
    out = Scalar(-1, functionspace)
    for t in functionspace.getListOfTags():
        out.setTaggedValue(t, t)
    out.expand()
    return out