Commit a4bae8cf authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

replace deprecated AMDiS::init and finalize with Environment

parent e01dcaf2
......@@ -528,11 +528,9 @@ cat> "$PROJECT/src/$MODULE.cpp" << CC_DELIM
using namespace AMDiS;
int main(int argc, char** argv)
{
AMDiS::init(argc, argv);
Environment env(argc, argv);
// your code comes here
AMDiS::finalize();
}
CC_DELIM
......
......@@ -31,7 +31,7 @@ using Traits = LagrangeBasis<Grid::LeafGridView, 1>;
int main(int argc, char* argv[])
{
// Initialize linear-algebra backend and read parameters from file
AMDiS::init(argc, argv);
Environment env(argc, argv);
// Create a problem class containing all data for assembling
ProblemStat<Traits> prob("poisson");
......@@ -56,7 +56,6 @@ int main(int argc, char* argv[])
AdaptStationary adapt("adapt", prob);
adapt.adapt();
AMDiS::finalize();
return 0;
}
~~~~~~~~~~~~~~~
......
......@@ -30,7 +30,7 @@ struct UnitRadius
// solve the equation -laplace(u) - k^2 u = f on the sphere
int main(int argc, char** argv)
{
AMDiS::init(argc, argv);
Environment env(argc, argv);
std::string gridName = Parameters::get<std::string>("surface->mesh").value();
std::string gridFileName = Parameters::get<std::string>(gridName + "->macro file name").value();
......@@ -59,6 +59,5 @@ int main(int argc, char** argv)
prob.writeFiles(adaptInfo);
AMDiS::finalize();
return 0;
}
......@@ -57,7 +57,7 @@ struct NotAccessible {};
int main(int argc, char** argv)
{
AMDiS::init(argc, argv);
Environment env(argc, argv);
Vec1 vec1;
Vec2 vec2;
......@@ -90,6 +90,5 @@ int main(int argc, char** argv)
static_assert(VALUE(r) == 1, "");
static_assert(VALUE(c) == 1, "");
AMDiS::finalize();
return 0;
}
......@@ -25,12 +25,11 @@ void test()
int main(int argc, char** argv)
{
AMDiS::init(argc, argv);
Environment env(argc, argv);
test<float>();
test<double>();
test<long double>();
AMDiS::finalize();
return 0;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment