Rheolef  7.1
an efficient C++ finite element environment
combustion1.icc
Go to the documentation of this file.
1 combustion::combustion (const geo& omega, string approx)
26  : lambda(0), Xh(), m(), pm(), a1(), pa1(), event("lambda","u") {
27  if (approx != "") reset (omega, approx);
28 }
29 void combustion::reset (const geo& omega, string approx) {
30  Xh = space (omega, approx);
31  Xh.block ("boundary");
32  m = form (Xh, Xh, "mass");
33  pm = problem (m);
34 }
35 field combustion::initial (std::string restart) {
36  if (restart == "") return field (Xh, 0);
37  idiststream in (restart);
38  field xh0;
39  get (in, xh0);
40  derr << "# restart from lambda=" << lambda << endl;
41  return xh0;
42 }
43 odiststream& combustion::put (odiststream& os, const field& uh) const {
44  return os << event(lambda,uh);
45 }
46 idiststream& combustion::get (idiststream& is, field& uh) {
47  is >> event(lambda,uh);
48  if (!is) return is;
49  if (Xh.name() == "") reset (uh.get_geo(), uh.get_approx());
50  if (uh.b().dis_size() == 0) {
51  // re-allocate the field with right blocked/unblocked sizes
52  field tmp = field(Xh, 0);
53  std::copy (uh.begin_dof(), uh.end_dof(), tmp.begin_dof());
54  uh = tmp;
55  }
56  return is;
57 }
see the field page for the full documentation
see the form page for the full documentation
see the geo page for the full documentation
see the problem page for the full documentation
see the space page for the full documentation
void reset(T &x)
space Xh
Definition: combustion.h:49
branch event
Definition: combustion.h:54
odiststream & put(odiststream &os, const field &uh) const
Definition: combustion1.icc:43
field initial(std::string restart="")
Definition: combustion1.icc:35
void reset(const geo &omega, string approx)
Definition: combustion1.icc:29
combustion(const geo &omega=geo(), string approx="")
Definition: combustion1.icc:25
idiststream & get(idiststream &is, field &uh)
Definition: combustion1.icc:46
problem pm
Definition: combustion.h:51