<commit_before>#
#   based on meshOptMWE.cpp from <NAME>
#

import os
from os.path import expanduser, join
import numpy as np

import mfem.ser as mfem

class discrete_size_2d(mfem.PyCoefficient):
    def EvalValue(self, x):
        opt = 2;
        small = 0.001
        big = 0.01
        val = 0.;
        
        xc = x[0] - 0.0
        yc = x[1] - 0.5
        r = np.sqrt(xc*xc + yc*yc)
        r1 = 0.45
        r2 = 0.55
        sf=30.0
        val = 0.5*(1+np.tanh(sf*(r-r1))) - 0.5*(1+np.tanh(sf*(r-r2)))
<commit_msg>minor typo and a sample run<commit_after>#
#   based on meshOptMWE.cpp from <NAME>
#
# python test_tmop.py -m ../data/square01.mesh -o 2 -rs 2 -mid 80 -tid 5 -ni 50 -qo 4 -vl 2 -ae 0

import os
from os.path import expanduser, join
import numpy as np

import mfem.ser as mfem

class discrete_size_2d(mfem.PyCoefficient):
    def EvalValue(self, x):
        opt = 2;
        small = 0.001
        big = 0.01
        val = 0.;
        
        xc = x[0] - 0.0
        yc = x[1] - 0.5
        r = np.sqrt(xc*xc + yc*yc)
        r1 = 0.45
        r2 = 0.55
        sf=30.0
        val = 0.5*(1+np.tanh(sf*(r-r1))) - 0.5*(1+np.tanh(sf*(r-r2)))

{'fraction_non_alphanumeric': 0.14776632302405499, 'fraction_numerical': 0.070446735395189, 'mean_word_length': 1.6967592592592593, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1501225', 'n_tokens_mistral': 535, 'n_tokens_neox': 487, 'n_words': 127}