~fdm-lab/fidlab/main

« back to all changes in this revision

Viewing changes to examples/gsl1d_nl_4.cpp

  • Committer: Apostol Faliagas
  • Date: 2019-03-15 15:27:46 UTC
  • Revision ID: apostol.faliagas@gmail.com-20190315152746-uddz7mqk831sftx5
VersionĀ 0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
CodeFragment PtEvalDiscretizer::discretize(const DiscretizationData &d) const
61
61
{
62
62
        const std::string &i = point;
63
 
        const std::string code_y = "u["         + code_elem_func("e", i, "$c$") + "]";
64
 
        const std::string code_j = "du["        + code_elem_func("e", i, "$c$") + "]";
 
63
        const std::string code_y = "u["         + d.pde->code_elem_func(i) + "]";
 
64
        const std::string code_j = "du["        + d.pde->code_elem_func(i) + "]";
65
65
        return CodeFragment(code_y, code_j);
66
66
}
67
67
 
68
68
CodeFragment PtEvalDiscretizer::discretize_on_boundary(
69
69
                const BoundaryDiscretizationData &bdd) const
70
70
{
71
 
        CodeFragment cf = discretize({bdd.pde, bdd.i});
 
71
        CodeFragment cf = discretize({bdd.pde, bdd.i, "", ""});
72
72
        cf.bid = bdd.bid;
73
73
        return cf;
74
74
}
78
78
CodeFragment PtEvalDiscretizer::discretize_scalar_field(
79
79
                const DiscretizationData& d) const
80
80
{
81
 
        const std::string code_y = fd1::code_func_call("$f$", point);
 
81
        const std::string code_y = d.pde->code_func_call("$f$", point, "", "");
82
82
        const std::string code_j = "0";
83
83
        return CodeFragment(code_y, code_j);
84
84
}