diff --git a/bin/amdisproject b/bin/amdisproject index 22aff56474ff36a68e09b04ce573098da892aed3..3f65d3c95e161183dabeb9299ee3808ce34263cc 100755 --- a/bin/amdisproject +++ b/bin/amdisproject @@ -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 diff --git a/doc/Mainpage.md b/doc/Mainpage.md index 46adb2a7e894a5707e27552a036aaab11bb82c31..6b4b2f78bc4053e7694a2deb9760a54b17213271 100644 --- a/doc/Mainpage.md +++ b/doc/Mainpage.md @@ -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; } ~~~~~~~~~~~~~~~ diff --git a/examples/surface.cc b/examples/surface.cc index 51484ac4b9f3b9aa045265517a5bc1a5d2af1a3a..7de309bcd43b39c4d818e47302047b27926a1a1f 100644 --- a/examples/surface.cc +++ b/examples/surface.cc @@ -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; } diff --git a/test/HybridSizeTest.cpp b/test/HybridSizeTest.cpp index 5335f00c45c31dd446c57857fb2325934002f7c6..1a2703829fcf1e6b53e4cf54051fe45b8bbcf448 100644 --- a/test/HybridSizeTest.cpp +++ b/test/HybridSizeTest.cpp @@ -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; } diff --git a/test/ProblemStatTest.cpp b/test/ProblemStatTest.cpp index 9ad40cb96c064ebd418b80b5aafe3f47102763ce..d4fa6a495f27e0ba0c98fc15f43b515969d9e000 100644 --- a/test/ProblemStatTest.cpp +++ b/test/ProblemStatTest.cpp @@ -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; }