16 #include "weakforms_hcurl.h"
22 template<
typename Real,
typename Scalar>
23 static Scalar int_e_f(
int n,
double *wt, Func<Real> *u, Func<Real> *v)
25 Scalar result = Scalar(0);
26 for (
int i = 0; i < n; i++)
27 result += wt[i] * (u->val0[i] * conj(v->val0[i]) + u->val1[i] * conj(v->val1[i]));
31 template<
typename Real,
typename Scalar>
32 static Scalar int_curl_e_curl_f(
int n,
double *wt, Func<Real> *u, Func<Real> *v)
34 Scalar result = Scalar(0);
35 for (
int i = 0; i < n; i++)
36 result += wt[i] * (u->curl[i] * conj(v->curl[i]));
40 template<
typename Real,
typename Scalar>
41 static Scalar int_v0(
int n,
double *wt, Func<Scalar> *v)
43 Scalar result = Scalar(0);
44 for (
int i = 0; i < n; i++)
45 result += wt[i] * v->val0[i];
49 template<
typename Real,
typename Scalar>
50 static Scalar int_v1(
int n,
double *wt, Func<Real> *v)
52 Scalar result = Scalar(0);
53 for (
int i = 0; i < n; i++)
54 result += wt[i] * (v->val1[i]);
58 template<
typename Real,
typename Scalar>
59 static Scalar int_F_e_f(
int n,
double *wt,
double(*F)(
int marker, Real x, Real y), Func<Real> *u, Func<Real> *v, Geom<Real> *e)
61 Scalar result = Scalar(0);
62 for (
int i = 0; i < n; i++)
63 result += wt[i] * (*F)(e->elem_marker, e->x[i], e->y[i]) * (u->val0[i] * conj(v->val0[i]) + u->val1[i] * conj(v->val1[i]));
67 template<
typename Real,
typename Scalar>
68 static Scalar int_e_tau_f_tau(
int n,
double *wt, Func<Real> *u, Func<Real> *v, GeomSurf<Real> *e)
70 Scalar result = Scalar(0);
71 for (
int i = 0; i < n; i++)
72 result += wt[i] * ((u->val0[i] * e->tx[i] + u->val1[i] * e->ty[i]) *
73 conj(v->val0[i] * e->tx[i] + v->val1[i] * e->ty[i]));
77 namespace WeakFormsHcurl
79 template<
typename Scalar>
80 DefaultMatrixFormVol<Scalar>::DefaultMatrixFormVol
81 (
int i,
int j,
std::string area, Scalar const_coeff,
82 Hermes2DFunction<Scalar>* f_coeff,
SymFlag sym,
84 : MatrixFormVol<Scalar>(i, j), const_coeff(const_coeff), function_coeff(f_coeff), gt(gt)
87 this->setSymFlag(sym);
90 if (f_coeff ==
nullptr) this->function_coeff =
new Hermes2DFunction<Scalar>(1.0);
91 else throw Hermes::Exceptions::Exception(
"Nonconstant coefficients in Hcurl forms not implemented yet.");
94 template<
typename Scalar>
95 DefaultMatrixFormVol<Scalar>::DefaultMatrixFormVol
96 (
int i,
int j, std::vector<std::string> areas, Scalar const_coeff,
98 : MatrixFormVol<Scalar>(i, j), const_coeff(const_coeff), function_coeff(f_coeff), gt(gt)
100 this->set_areas(areas);
101 this->setSymFlag(sym);
104 if (f_coeff ==
nullptr) this->function_coeff =
new Hermes2DFunction<Scalar>(1.0);
105 else throw Hermes::Exceptions::Exception(
"Nonconstant coefficients in Hcurl forms not implemented yet.");
108 template<
typename Scalar>
109 DefaultMatrixFormVol<Scalar>::~DefaultMatrixFormVol()
111 if (function_coeff ==
nullptr)
112 delete function_coeff;
115 template<
typename Scalar>
116 Scalar DefaultMatrixFormVol<Scalar>::value(
int n,
double *wt, Func<Scalar> *u_ext[], Func<double> *u,
117 Func<double> *v, GeomVol<double> *e, Func<Scalar> **ext)
const
120 if (gt == HERMES_PLANAR)
122 result = const_coeff * int_e_f<double, Scalar>(n, wt, u, v);
124 else throw Hermes::Exceptions::Exception(
"Axisymmetric Hcurl forms not implemented yet.");
129 template<
typename Scalar>
130 Ord DefaultMatrixFormVol<Scalar>::ord(
int n,
double *wt, Func<Ord> *u_ext[], Func<Ord> *u, Func<Ord> *v,
131 GeomVol<Ord> *e, Func<Ord> **ext)
const
134 if (gt == HERMES_PLANAR)
136 result = const_coeff * int_e_f<Ord, Ord>(n, wt, u, v);
138 else throw Hermes::Exceptions::Exception(
"Axisymmetric Hcurl forms not implemented yet.");
143 template<
typename Scalar>
144 MatrixFormVol<Scalar>* DefaultMatrixFormVol<Scalar>::clone()
const
146 return new DefaultMatrixFormVol<Scalar>(*this);
149 template<
typename Scalar>
150 DefaultJacobianCurlCurl<Scalar>::DefaultJacobianCurlCurl(
int i,
int j,
std::string area, Scalar const_coeff,
151 CubicSpline* c_spline,
153 : MatrixFormVol<Scalar>(i, j),
154 idx_j(j), const_coeff(const_coeff), spline_coeff(c_spline), gt(gt)
156 this->set_area(area);
157 this->setSymFlag(sym);
160 if (c_spline ==
nullptr) this->spline_coeff =
new CubicSpline(1.0);
161 else throw Hermes::Exceptions::Exception(
"Nonconstant coefficients in Hcurl forms not implemented yet.");
164 template<
typename Scalar>
165 DefaultJacobianCurlCurl<Scalar>::DefaultJacobianCurlCurl(
int i,
int j, std::vector<std::string> areas,
166 Scalar const_coeff, CubicSpline* c_spline,
168 : MatrixFormVol<Scalar>(i, j),
169 idx_j(j), const_coeff(const_coeff), spline_coeff(c_spline), gt(gt)
171 this->set_areas(areas);
172 this->setSymFlag(sym);
175 if (c_spline ==
nullptr)
176 this->spline_coeff =
new CubicSpline(1.0);
177 else throw Hermes::Exceptions::Exception(
"Nonconstant coefficients in Hcurl forms not implemented yet.");
180 template<
typename Scalar>
181 DefaultJacobianCurlCurl<Scalar>::~DefaultJacobianCurlCurl()
183 if (spline_coeff ==
nullptr)
187 template<
typename Scalar>
188 Scalar DefaultJacobianCurlCurl<Scalar>::value(
int n,
double *wt, Func<Scalar> *u_ext[], Func<double> *u,
189 Func<double> *v, GeomVol<double> *e, Func<Scalar> **ext)
const
192 if (gt == HERMES_PLANAR)
194 result = const_coeff * int_curl_e_curl_f<double, Scalar>(n, wt, u, v);
196 else throw Hermes::Exceptions::Exception(
"Axisymmetric Hcurl forms not implemented yet.");
201 template<
typename Scalar>
202 Ord DefaultJacobianCurlCurl<Scalar>::ord(
int n,
double *wt, Func<Ord> *u_ext[], Func<Ord> *u, Func<Ord> *v,
203 GeomVol<Ord> *e, Func<Ord> **ext)
const
206 if (gt == HERMES_PLANAR)
208 result = const_coeff * int_curl_e_curl_f<Ord, Ord>(n, wt, u, v);
210 else throw Hermes::Exceptions::Exception(
"Axisymmetric Hcurl forms not implemented yet.");
215 template<
typename Scalar>
216 MatrixFormVol<Scalar>* DefaultJacobianCurlCurl<Scalar>::clone()
const
218 return new DefaultJacobianCurlCurl(*
this);
221 template<
typename Scalar>
222 DefaultVectorFormVol<Scalar>::DefaultVectorFormVol(
int i,
std::string area, Scalar const_coeff0, Scalar const_coeff1,
223 Hermes2DFunction<Scalar>* f_coeff0, Hermes2DFunction<Scalar>* f_coeff1,
225 : VectorFormVol<Scalar>(i), const_coeff0(const_coeff0), const_coeff1(const_coeff1),
226 function_coeff0(f_coeff0), function_coeff1(f_coeff1), gt(gt)
228 this->set_area(area);
231 if (f_coeff0 ==
nullptr) this->function_coeff0 =
new Hermes2DFunction<Scalar>(1.0);
232 else throw Hermes::Exceptions::Exception(
"Nonconstant coefficients in Hcurl forms not implemented yet.");
233 if (f_coeff1 ==
nullptr) this->function_coeff1 =
new Hermes2DFunction<Scalar>(1.0);
234 else throw Hermes::Exceptions::Exception(
"Nonconstant coefficients in Hcurl forms not implemented yet.");
237 template<
typename Scalar>
238 DefaultVectorFormVol<Scalar>::DefaultVectorFormVol(
int i, std::vector<std::string> areas,
239 Scalar const_coeff0, Scalar const_coeff1,
240 Hermes2DFunction<Scalar>* f_coeff0, Hermes2DFunction<Scalar>* f_coeff1,
242 : VectorFormVol<Scalar>(i), const_coeff0(const_coeff0), const_coeff1(const_coeff1),
243 function_coeff0(f_coeff0), function_coeff1(f_coeff1), gt(gt)
245 this->set_areas(areas);
248 if (f_coeff0 ==
nullptr) this->function_coeff0 =
new Hermes2DFunction<Scalar>(1.0);
249 else throw Hermes::Exceptions::Exception(
"Nonconstant coefficients in Hcurl forms not implemented yet.");
250 if (f_coeff1 ==
nullptr) this->function_coeff1 =
new Hermes2DFunction<Scalar>(1.0);
251 else throw Hermes::Exceptions::Exception(
"Nonconstant coefficients in Hcurl forms not implemented yet.");
254 template<
typename Scalar>
255 DefaultVectorFormVol<Scalar>::~DefaultVectorFormVol()
257 if (function_coeff0 ==
nullptr)
delete function_coeff0;
258 if (function_coeff1 ==
nullptr)
delete function_coeff1;
261 template<
typename Scalar>
262 Scalar DefaultVectorFormVol<Scalar>::value(
int n,
double *wt, Func<Scalar> *u_ext[], Func<double> *v,
263 GeomVol<double> *e, Func<Scalar> **ext)
const
265 Scalar int_v0 = 0, int_v1 = 0;
266 for (
int i = 0; i < n; i++) int_v0 += wt[i] * v->val0[i];
267 for (
int i = 0; i < n; i++) int_v1 += wt[i] * v->val1[i];
268 return const_coeff0 * int_v0 + const_coeff1 * int_v1;
271 template<
typename Scalar>
272 Ord DefaultVectorFormVol<Scalar>::ord(
int n,
double *wt, Func<Ord> *u_ext[], Func<Ord> *v,
273 GeomVol<Ord> *e, Func<Ord> **ext)
const
275 Ord int_v0 = Ord(0), int_v1 = Ord(0);
276 for (
int i = 0; i < n; i++) int_v0 += wt[i] * v->val0[i];
277 for (
int i = 0; i < n; i++) int_v1 += wt[i] * v->val1[i];
278 return const_coeff0 * int_v0 + const_coeff1 * int_v1;
281 template<
typename Scalar>
282 VectorFormVol<Scalar>* DefaultVectorFormVol<Scalar>::clone()
const
284 return new DefaultVectorFormVol<Scalar>(*this);
287 template<
typename Scalar>
288 DefaultResidualVol<Scalar>::DefaultResidualVol(
int i,
std::string area, Scalar const_coeff,
289 Hermes2DFunction<Scalar>* f_coeff,
291 : VectorFormVol<Scalar>(i),
292 idx_i(i), const_coeff(const_coeff), function_coeff(f_coeff), gt(gt)
294 this->set_area(area);
297 if (f_coeff ==
nullptr) this->function_coeff =
new Hermes2DFunction<Scalar>(1.0);
298 else throw Hermes::Exceptions::Exception(
"Nonconstant functions in Hcurl forms not implemented yet.");
301 template<
typename Scalar>
302 DefaultResidualVol<Scalar>::DefaultResidualVol(
int i, std::vector<std::string> areas, Scalar const_coeff,
303 Hermes2DFunction<Scalar>* f_coeff,
305 : VectorFormVol<Scalar>(i),
306 idx_i(i), const_coeff(const_coeff), function_coeff(f_coeff), gt(gt)
308 this->set_areas(areas);
311 if (f_coeff ==
nullptr) this->function_coeff =
new Hermes2DFunction<Scalar>(1.0);
312 else throw Hermes::Exceptions::Exception(
"Nonconstant functions in Hcurl forms not implemented yet.");
315 template<
typename Scalar>
316 DefaultResidualVol<Scalar>::~DefaultResidualVol()
318 if (function_coeff ==
nullptr)
delete function_coeff;
321 template<
typename Scalar>
322 Scalar DefaultResidualVol<Scalar>::value(
int n,
double *wt, Func<Scalar> *u_ext[], Func<double> *v,
323 GeomVol<double> *e, Func<Scalar> **ext)
const
326 if (gt == HERMES_PLANAR)
328 for (
int i = 0; i < n; i++)
330 result += wt[i] * function_coeff->value(e->x[i], e->y[i]) * (u_ext[idx_i]->val0[i] * v->val0[i] +
331 u_ext[idx_i]->val1[i] * v->val1[i]);
334 else throw Hermes::Exceptions::Exception(
"Axisymmetric Hcurl forms not implemented yet.");
336 return const_coeff * result;
339 template<
typename Scalar>
340 Ord DefaultResidualVol<Scalar>::ord(
int n,
double *wt, Func<Ord> *u_ext[], Func<Ord> *v,
341 GeomVol<Ord> *e, Func<Ord> **ext)
const
344 if (gt == HERMES_PLANAR)
346 for (
int i = 0; i < n; i++)
348 result += wt[i] * function_coeff->value(e->x[i], e->y[i]) * u_ext[idx_i]->val[i] * v->val[i];
351 else throw Hermes::Exceptions::Exception(
"Axisymmetric Hcurl forms not implemented yet.");
356 template<
typename Scalar>
357 VectorFormVol<Scalar>* DefaultResidualVol<Scalar>::clone()
const
359 return new DefaultResidualVol(*
this);
362 template<
typename Scalar>
363 DefaultResidualCurlCurl<Scalar>::DefaultResidualCurlCurl(
int i,
std::string area, Scalar const_coeff,
364 CubicSpline* c_spline,
366 : VectorFormVol<Scalar>(i),
367 idx_i(i), const_coeff(const_coeff), spline_coeff(c_spline), gt(gt)
369 this->set_area(area);
372 if (c_spline ==
nullptr) this->spline_coeff =
new CubicSpline(1.0);
373 else throw Hermes::Exceptions::Exception(
"Nonconstant coefficients in Hcurl forms not implemented yet.");
376 template<
typename Scalar>
377 DefaultResidualCurlCurl<Scalar>::DefaultResidualCurlCurl(
int i, std::vector<std::string> areas, Scalar const_coeff,
378 CubicSpline* c_spline,
380 : VectorFormVol<Scalar>(i),
381 idx_i(i), const_coeff(const_coeff), spline_coeff(c_spline), gt(gt)
383 this->set_areas(areas);
386 if (c_spline ==
nullptr) this->spline_coeff =
new CubicSpline(1.0);
387 else throw Hermes::Exceptions::Exception(
"Nonconstant coefficients in Hcurl forms not implemented yet.");
390 template<
typename Scalar>
391 DefaultResidualCurlCurl<Scalar>::~DefaultResidualCurlCurl()
393 if (spline_coeff ==
nullptr)
delete spline_coeff;
396 template<
typename Scalar>
397 Scalar DefaultResidualCurlCurl<Scalar>::value(
int n,
double *wt, Func<Scalar> *u_ext[], Func<double> *v,
398 GeomVol<double> *e, Func<Scalar> **ext)
const
400 Func<Scalar>* u_prev = u_ext[idx_i];
402 if (gt == HERMES_PLANAR)
404 for (
int i = 0; i < n; i++)
406 double mag0_i = std::abs(u_prev->val0[i]);
407 double mag1_i = std::abs(u_prev->val1[i]);
408 double mag_i = sqrt(sqr(mag0_i) + sqr(mag1_i));
409 result += wt[i] * const_coeff*spline_coeff->value(mag_i)
410 * (u_prev->curl[i] * conj(v->curl[i]));
413 else throw Hermes::Exceptions::Exception(
"Axisymmetric Hcurl forms not implemented yet.");
418 template<
typename Scalar>
419 Ord DefaultResidualCurlCurl<Scalar>::ord(
int n,
double *wt, Func<Ord> *u_ext[], Func<Ord> *v,
420 GeomVol<Ord> *e, Func<Ord> **ext)
const
422 Func<Ord>* u_prev = u_ext[idx_i];
424 if (gt == HERMES_PLANAR)
426 for (
int i = 0; i < n; i++)
428 Ord mag0_i = u_prev->val0[i];
429 Ord mag1_i = u_prev->val1[i];
430 Ord mag_i = sqrt(sqr(mag0_i) + sqr(mag1_i));
431 result += wt[i] * const_coeff*spline_coeff->value(mag_i)
432 * (u_prev->curl[i] * conj(v->curl[i]));
435 else throw Hermes::Exceptions::Exception(
"Axisymmetric Hcurl forms not implemented yet.");
440 template<
typename Scalar>
441 VectorFormVol<Scalar>* DefaultResidualCurlCurl<Scalar>::clone()
const
443 return new DefaultResidualCurlCurl(*
this);
446 template<
typename Scalar>
447 DefaultMatrixFormSurf<Scalar>::DefaultMatrixFormSurf(
int i,
int j,
std::string area,
448 Scalar const_coeff, Hermes2DFunction<Scalar>* f_coeff,
450 : MatrixFormSurf<Scalar>(i, j), const_coeff(const_coeff), function_coeff(f_coeff), gt(gt)
452 this->set_area(area);
454 if (f_coeff ==
nullptr) this->function_coeff =
new Hermes2DFunction<Scalar>(1.0);
455 else throw Hermes::Exceptions::Exception(
"Nonconstant functions in Hcurl forms not implemented yet.");
458 template<
typename Scalar>
459 DefaultMatrixFormSurf<Scalar>::DefaultMatrixFormSurf(
int i,
int j, std::vector<std::string> areas,
460 Scalar const_coeff, Hermes2DFunction<Scalar>* f_coeff,
462 : MatrixFormSurf<Scalar>(i, j), const_coeff(const_coeff), function_coeff(f_coeff), gt(gt)
464 this->set_areas(areas);
466 if (f_coeff ==
nullptr) this->function_coeff =
new Hermes2DFunction<Scalar>(1.0);
467 else throw Hermes::Exceptions::Exception(
"Nonconstant functions in Hcurl forms not implemented yet.");
470 template<
typename Scalar>
471 DefaultMatrixFormSurf<Scalar>::~DefaultMatrixFormSurf()
473 if (function_coeff ==
nullptr)
delete function_coeff;
476 template<
typename Scalar>
477 Scalar DefaultMatrixFormSurf<Scalar>::value(
int n,
double *wt, Func<Scalar> *u_ext[], Func<double> *u, Func<double> *v,
478 GeomSurf<double> *e, Func<Scalar> **ext)
const
481 if (gt == HERMES_PLANAR)
483 result = const_coeff * int_e_tau_f_tau<double, Scalar>(n, wt, u, v, e);
485 else throw Hermes::Exceptions::Exception(
"Axisymmetric Hcurl forms not implemnted yet.");
490 template<
typename Scalar>
491 Ord DefaultMatrixFormSurf<Scalar>::ord(
int n,
double *wt, Func<Ord> *u_ext[], Func<Ord> *u,
492 Func<Ord> *v, GeomSurf<Ord> *e, Func<Ord> **ext)
const
495 if (gt == HERMES_PLANAR)
497 result = const_coeff * int_e_tau_f_tau<Ord, Ord>(n, wt, u, v, e);
500 throw Hermes::Exceptions::Exception(
"Axisymmetric Hcurl forms not implemnted yet.");
505 template<
typename Scalar>
506 MatrixFormSurf<Scalar>* DefaultMatrixFormSurf<Scalar>::clone()
const
508 return new DefaultMatrixFormSurf<Scalar>(*this);
511 template<
typename Scalar>
512 DefaultResidualSurf<Scalar>::DefaultResidualSurf(
int i,
std::string area,
513 Scalar const_coeff, Hermes2DFunction<Scalar>* f_coeff,
515 : VectorFormSurf<Scalar>(i), const_coeff(const_coeff), function_coeff(f_coeff), gt(gt)
517 this->set_area(area);
519 if (f_coeff ==
nullptr) this->function_coeff =
new Hermes2DFunction<Scalar>(1.0);
520 else throw Hermes::Exceptions::Exception(
"Nonconstant functions in Hcurl forms not implemented yet.");
523 template<
typename Scalar>
524 DefaultResidualSurf<Scalar>::DefaultResidualSurf(
int i, std::vector<std::string> areas,
525 Scalar const_coeff, Hermes2DFunction<Scalar>* f_coeff,
527 : VectorFormSurf<Scalar>(i), const_coeff(const_coeff), function_coeff(f_coeff), gt(gt)
530 if (f_coeff ==
nullptr) this->function_coeff =
new Hermes2DFunction<Scalar>(1.0);
531 else throw Hermes::Exceptions::Exception(
"Nonconstant functions in Hcurl forms not implemented yet.");
534 template<
typename Scalar>
535 DefaultResidualSurf<Scalar>::~DefaultResidualSurf()
537 if (function_coeff ==
nullptr)
delete function_coeff;
540 template<
typename Scalar>
541 Scalar DefaultResidualSurf<Scalar>::value(
int n,
double *wt, Func<Scalar> *u_ext[], Func<double> *v,
542 GeomSurf<double> *e, Func<Scalar> **ext)
const
545 if (gt == HERMES_PLANAR)
547 for (
int i = 0; i < n; i++)
548 result += wt[i] * ((u_ext[0]->val0[i] * e->tx[i] + u_ext[0]->val1[i] * e->ty[i]) *
549 conj(v->val0[i] * e->tx[i] + v->val1[i] * e->ty[i]));
550 result *= const_coeff;
552 else throw Hermes::Exceptions::Exception(
"Axisymmetric Hcurl forms not implemnted yet.");
557 template<
typename Scalar>
558 Ord DefaultResidualSurf<Scalar>::ord(
int n,
double *wt, Func<Ord> *u_ext[],
559 Func<Ord> *v, GeomSurf<Ord> *e, Func<Ord> **ext)
const
562 if (gt == HERMES_PLANAR)
564 for (
int i = 0; i < n; i++)
565 result += wt[i] * ((u_ext[0]->val0[i] * e->tx[i] + u_ext[0]->val1[i] * e->ty[i]) *
566 conj(v->val0[i] * e->tx[i] + v->val1[i] * e->ty[i]));
568 else throw Hermes::Exceptions::Exception(
"Axisymmetric Hcurl forms not implemnted yet.");
573 template<
typename Scalar>
574 VectorFormSurf<Scalar>* DefaultResidualSurf<Scalar>::clone()
const
576 return new DefaultResidualSurf(*
this);
579 template<
typename Scalar>
580 DefaultVectorFormSurf<Scalar>::DefaultVectorFormSurf(
int i,
std::string area, Scalar const_coeff,
581 Hermes2DFunction<Scalar>* f_coeff,
583 : VectorFormSurf<Scalar>(i), const_coeff(const_coeff), function_coeff(f_coeff), gt(gt)
585 this->set_area(area);
587 if (f_coeff ==
nullptr) this->function_coeff =
new Hermes2DFunction<Scalar>(1.0);
588 else throw Hermes::Exceptions::Exception(
"Nonconstant coefficients in Hcurl forms not implemented yet.");
591 template<
typename Scalar>
592 DefaultVectorFormSurf<Scalar>::DefaultVectorFormSurf(
int i, std::vector<std::string> areas, Scalar const_coeff,
593 Hermes2DFunction<Scalar>* f_coeff,
595 : VectorFormSurf<Scalar>(i), const_coeff(const_coeff), function_coeff(f_coeff), gt(gt)
597 this->set_areas(areas);
599 if (f_coeff ==
nullptr) this->function_coeff =
new Hermes2DFunction<Scalar>(1.0);
600 else throw Hermes::Exceptions::Exception(
"Nonconstant coefficients in Hcurl forms not implemented yet.");
603 template<
typename Scalar>
604 DefaultVectorFormSurf<Scalar>::~DefaultVectorFormSurf()
606 if (function_coeff ==
nullptr)
delete function_coeff;
609 template<
typename Scalar>
610 Scalar DefaultVectorFormSurf<Scalar>::value(
int n,
double *wt, Func<Scalar> *u_ext[], Func<double> *v,
611 GeomSurf<double> *e, Func<Scalar> **ext)
const
614 if (gt == HERMES_PLANAR)
616 for (
int i = 0; i < n; i++)
618 result += wt[i] * conj(v->val0[i] * e->tx[i] + v->val1[i] * e->ty[i]);
621 else throw Hermes::Exceptions::Exception(
"Axisymmetric Hcurl forms not implemented yet.");
626 template<
typename Scalar>
627 Ord DefaultVectorFormSurf<Scalar>::ord(
int n,
double *wt, Func<Ord> *u_ext[], Func<Ord> *v,
628 GeomSurf<Ord> *e, Func<Ord> **ext)
const
631 if (gt == HERMES_PLANAR)
633 for (
int i = 0; i < n; i++)
635 result += wt[i] * conj(v->val0[i] * e->tx[i] + v->val1[i] * e->ty[i]);
638 else throw Hermes::Exceptions::Exception(
"Axisymmetric Hcurl forms not implemented yet.");
643 template<
typename Scalar>
644 VectorFormSurf<Scalar>* DefaultVectorFormSurf<Scalar>::clone()
const
646 return new DefaultVectorFormSurf<Scalar>(*this);
649 template class HERMES_API DefaultJacobianCurlCurl < double > ;
650 template class HERMES_API DefaultJacobianCurlCurl < std::complex<double> > ;
651 template class HERMES_API DefaultMatrixFormVol < double > ;
652 template class HERMES_API DefaultMatrixFormVol < std::complex<double> > ;
653 template class HERMES_API DefaultVectorFormVol < double > ;
654 template class HERMES_API DefaultVectorFormVol < std::complex<double> > ;
655 template class HERMES_API DefaultResidualVol < double > ;
656 template class HERMES_API DefaultResidualVol < std::complex<double> > ;
657 template class HERMES_API DefaultResidualCurlCurl < double > ;
658 template class HERMES_API DefaultResidualCurlCurl < std::complex<double> > ;
659 template class HERMES_API DefaultMatrixFormSurf < double > ;
660 template class HERMES_API DefaultMatrixFormSurf < std::complex<double> > ;
661 template class HERMES_API DefaultVectorFormSurf < double > ;
662 template class HERMES_API DefaultVectorFormSurf < std::complex<double> > ;
663 template class HERMES_API DefaultResidualSurf < double > ;
664 template class HERMES_API DefaultResidualSurf < std::complex<double> > ;
SymFlag
Bilinear form symmetry flag, see WeakForm::add_matrix_form.
::xsd::cxx::tree::string< char, simple_type > string
C++ type corresponding to the string XML Schema built-in type.
GeomType
Geometrical type of weak forms.