Ejemplo n.º 1
0
Scalar CustomWeakFormHeatRK::CustomFormResidualSurf::vector_form_surf(int n, double *wt, Func<Scalar> *u_ext[], Func<Real> *v, GeomSurf<Real> *e, Func<Scalar> **ext) const
{
  Scalar T_ext = Scalar(temp_ext(get_current_stage_time()));
  Scalar result = Scalar(0);

  for (int pt_i = 0; pt_i < n; pt_i++)
  {
    result += wt[pt_i] * (T_ext - u_ext[this->previous_iteration_space_index]->val[pt_i]) * v->val[pt_i];
  }

  return alpha / (rho * heatcap) * result;
}
Ejemplo n.º 2
0
double CustomWeakFormHeatRK::CustomFormResidualSurf::value(int n, double *wt, Func<double> *u_ext[], Func<double> *v, GeomSurf<double> *e,
  Func<double> **ext) const
{
  double T_ext = temp_ext(get_current_stage_time());
  double result = 0.;

  for (int pt_i = 0; pt_i < n; pt_i++)
  {
    result += wt[pt_i] * (T_ext - u_ext[this->previous_iteration_space_index]->val[pt_i]) * v->val[pt_i];
  }

  return alpha / (rho * heatcap) * result;
}
Ejemplo n.º 3
0
double CustomWeakFormHeatRK::CustomFormResidualSurf::value(int n, double *wt, Func<double> *u_ext[], Func<double> *v, Geom<double> *e,
                                                           ExtData<double> *ext) const 
{
  double T_ext = temp_ext(get_current_stage_time());
  double result = 0;

  for (int i = 0; i < n; i++) 
  {
    result += wt[i] * (T_ext - u_ext[0]->val[i]) * v->val[i];
  }

  return alpha / (rho * heatcap) * result;
}