I have taken a look on the class UExtFunction. Could someone suggest me how to implement the following issue:
class CustomUExtFunction : public UExtFunction<double>
{
public:
CustomUExtFunction(double mu, double lambda, CustomExactFunction* MyFun) : UExtFunction<double>(), mu(mu), lambda(lambda), MyFun(MyFun)
{
}
virtual void value (int n, Func<double>** u_ext, Func<double>* result, Geom<double>* geometry) const
{
for(int i = 0; i < n; i++)
{
double ux = u_ext[0]->dx[i];
double uy = u_ext[0]->dy[i];
double vx = u_ext[1]->dx[i];
double vy = u_ext[1]->dy[i];
double dS11dE11 = mu * MyFun * ux;
result->val[i] = dS11dE11;
}
};
virtual void ord(Func<Hermes::Ord>** u_ext, Func<Hermes::Ord>* result) const
{
result->val[0] = u_ext[mu]->val[0];
};
int mu;
CustomExactFunction* MyFun;
};
This would permit to implement more complex weak forms with non constant coefficients over the domain.
Thanks for any help or advice.
Tomas.