Loading...
Searching...
No Matches
combustion1.icc

The combustion problem: class body for the Newton method.

The combustion problem: class body for the Newton method

combustion::combustion (const geo& omega, string approx)
: lambda(0), Xh(), m(), pm(), a1(), pa1(), event("lambda","u") {
if (approx != "") reset (omega, approx);
}
void combustion::reset (const geo& omega, string approx) {
Xh = space (omega, approx);
Xh.block ("boundary");
m = form (Xh, Xh, "mass");
pm = problem (m);
}
field combustion::initial (std::string restart) {
if (restart == "") return field (Xh, 0);
idiststream in (restart);
field xh0;
get (in, xh0);
derr << "# restart from lambda=" << lambda << endl;
return xh0;
}
odiststream& combustion::put (odiststream& os, const field& uh) const {
return os << event(lambda,uh);
}
idiststream& combustion::get (idiststream& is, field& uh) {
is >> event(lambda,uh);
if (!is) return is;
if (Xh.name() == "") reset (uh.get_geo(), uh.get_approx());
if (uh.b().dis_size() == 0) {
// re-allocate the field with right blocked/unblocked sizes
field tmp = field(Xh, 0);
std::copy (uh.begin_dof(), uh.end_dof(), tmp.begin_dof());
uh = tmp;
}
return is;
}
field
see the field page for the full documentation
form
see the form page for the full documentation
geo
see the geo page for the full documentation
problem
see the problem page for the full documentation
space
see the space page for the full documentation
mkgeo_ball.tmp
str tmp
Definition mkgeo_ball.sh:380
combustion::Xh
space Xh
Definition combustion.h:49
combustion::event
branch event
Definition combustion.h:54
combustion::m
form m
Definition combustion.h:50
combustion::put
odiststream & put(odiststream &os, const field &uh) const
Definition combustion1.icc:43
combustion::initial
field initial(std::string restart="")
Definition combustion1.icc:35
combustion::reset
void reset(const geo &omega, string approx)
Definition combustion1.icc:29
combustion::combustion
combustion(const geo &omega=geo(), string approx="")
Definition combustion1.icc:25
combustion::get
idiststream & get(idiststream &is, field &uh)
Definition combustion1.icc:46
combustion::pm
problem pm
Definition combustion.h:51
lambda
Definition yield_slip_circle.h:34