static char help[] =
"...\n\n";
double operator()(
const double x,
const double y,
const double z)
const {
return 1 + x * x + y * y + z * z * z;
}
};
const double z) const {
grad(0) = 2 * x;
grad(1) = 2 * y;
grad(2) = 3 * z * z;
return grad;
}
};
double operator()(
const double x,
const double y,
const double z)
const {
return 4 + 6 * z;
}
};
int main(
int argc,
char *argv[]) {
try {
PetscBool flg_test = PETSC_FALSE;
CHKERR PetscOptionsBegin(PETSC_COMM_WORLD,
"",
"Poisson's problem options",
"none");
PETSC_NULL);
CHKERR PetscOptionsBool(
"-test",
"if true is ctest",
"", flg_test,
&flg_test, PETSC_NULL);
ierr = PetscOptionsEnd();
boost::shared_ptr<ForcesAndSourcesCore> domain_lhs_fe;
boost::shared_ptr<ForcesAndSourcesCore> boundary_lhs_fe;
boost::shared_ptr<ForcesAndSourcesCore> domain_rhs_fe;
boost::shared_ptr<ForcesAndSourcesCore> boundary_rhs_fe;
boost::shared_ptr<ForcesAndSourcesCore> domain_error;
boost::shared_ptr<PoissonExample::PostProcFE>
post_proc_volume;
boost::shared_ptr<ForcesAndSourcesCore> null;
{
boundary_lhs_fe, domain_rhs_fe, boundary_rhs_fe);
global_error, domain_error);
}
Simple *simple_interface;
{
CHKERR simple_interface->getOptions();
CHKERR simple_interface->loadFile();
CHKERR simple_interface->setFieldOrder(
"ERROR",0);
CHKERR simple_interface->setUp();
}
DM dm;
CHKERR simple_interface->getDM(&dm);
{
dm, simple_interface->getDomainFEName(), domain_lhs_fe, null, null);
dm, simple_interface->getBoundaryFEName(), boundary_lhs_fe, null,
null);
domain_rhs_fe, null, null);
boundary_rhs_fe, null, null);
}
{
CHKERR DMCreateGlobalVector(dm,&
F);
KSP solver;
CHKERR KSPCreate(PETSC_COMM_WORLD,&solver);
CHKERR KSPSetFromOptions(solver);
}
{
domain_error);
global_error);
if (flg_test == PETSC_TRUE) {
}
}
{
post_proc_volume);
post_proc_volume->writeFile("out_vol.h5m");
}
CHKERR VecDestroy(&global_error);
}
return 0;
}