Commit 187b7922 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

FETI-DP and Rosenbrock methods work now together.

parent b26c7ec3
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include "boost/lexical_cast.hpp" #include "boost/lexical_cast.hpp"
#include "FileWriter.h" #include "FileWriter.h"
#include "SystemVector.h"
#include "Initfile.h" #include "Initfile.h"
#include "ValueWriter.h" #include "ValueWriter.h"
#include "MacroWriter.h" #include "MacroWriter.h"
......
...@@ -160,7 +160,7 @@ namespace AMDiS { ...@@ -160,7 +160,7 @@ namespace AMDiS {
DataCollector dc(values->getFeSpace(), values); DataCollector dc(values->getFeSpace(), values);
std::vector<DataCollector*> dcList(0); std::vector<DataCollector*> dcList(0);
dcList.push_back(&dc); dcList.push_back(&dc);
writeFile(dcList,filename,writeParallel); writeFile(dcList, filename, writeParallel);
} }
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include "io/VtkWriter.h"
#include "parallel/PetscProblemStat.h" #include "parallel/PetscProblemStat.h"
#include "parallel/PetscSolver.h" #include "parallel/PetscSolver.h"
#include "parallel/MpiHelper.h" #include "parallel/MpiHelper.h"
......
...@@ -1500,7 +1500,9 @@ namespace AMDiS { ...@@ -1500,7 +1500,9 @@ namespace AMDiS {
solveFetiMatrix(vec); solveFetiMatrix(vec);
} else { } else {
solveReducedFetiMatrix(vec); solveReducedFetiMatrix(vec);
} }
MeshDistributor::globalMeshDistributor->synchVector(vec);
} }
......
...@@ -35,6 +35,7 @@ namespace AMDiS { ...@@ -35,6 +35,7 @@ namespace AMDiS {
initConstructor(problemStat); initConstructor(problemStat);
} }
RosenbrockAdaptInstationary::RosenbrockAdaptInstationary(std::string name, RosenbrockAdaptInstationary::RosenbrockAdaptInstationary(std::string name,
RosenbrockStationary &problemStat, RosenbrockStationary &problemStat,
AdaptInfo &info, AdaptInfo &info,
...@@ -54,6 +55,7 @@ namespace AMDiS { ...@@ -54,6 +55,7 @@ namespace AMDiS {
initConstructor(&problemStat); initConstructor(&problemStat);
} }
void RosenbrockAdaptInstationary::initConstructor(RosenbrockStationary *problemStat) void RosenbrockAdaptInstationary::initConstructor(RosenbrockStationary *problemStat)
{ {
std::string str; std::string str;
...@@ -73,6 +75,7 @@ namespace AMDiS { ...@@ -73,6 +75,7 @@ namespace AMDiS {
problemStat->setTau(&tau); problemStat->setTau(&tau);
} }
void RosenbrockAdaptInstationary::oneTimestep() void RosenbrockAdaptInstationary::oneTimestep()
{ {
FUNCNAME("RosenbrockAdaptInstationary::oneTimestep()"); FUNCNAME("RosenbrockAdaptInstationary::oneTimestep()");
...@@ -162,7 +165,7 @@ namespace AMDiS { ...@@ -162,7 +165,7 @@ namespace AMDiS {
INFO(info, 6)("time estimate for component %d = %e\n", INFO(info, 6)("time estimate for component %d = %e\n",
i, adaptInfo->getTimeEstSum(i)); i, adaptInfo->getTimeEstSum(i));
if(errorEst > timeTol) if (errorEst > timeTol)
WARNING("Accepted timestep but tolerance not reached \n" ); WARNING("Accepted timestep but tolerance not reached \n" );
} else { } else {
...@@ -192,6 +195,8 @@ namespace AMDiS { ...@@ -192,6 +195,8 @@ namespace AMDiS {
adaptInfo->setLastProcessedTimestep(adaptInfo->getTimestep()); adaptInfo->setLastProcessedTimestep(adaptInfo->getTimestep());
adaptInfo->incTimestepNumber(); adaptInfo->incTimestepNumber();
MSG("ONE TIMESTEP!\n");
} }
} }
...@@ -17,6 +17,10 @@ ...@@ -17,6 +17,10 @@
#include "OEMSolver.h" #include "OEMSolver.h"
#include "Debug.h" #include "Debug.h"
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
#include "parallel/MeshDistributor.h"
#endif
namespace AMDiS { namespace AMDiS {
void RosenbrockStationary::acceptTimestep() void RosenbrockStationary::acceptTimestep()
...@@ -25,6 +29,7 @@ namespace AMDiS { ...@@ -25,6 +29,7 @@ namespace AMDiS {
*unVec = *newUn; *unVec = *newUn;
} }
void RosenbrockStationary::init() void RosenbrockStationary::init()
{ {
stageSolution = new SystemVector(*solution); stageSolution = new SystemVector(*solution);
...@@ -59,7 +64,7 @@ namespace AMDiS { ...@@ -59,7 +64,7 @@ namespace AMDiS {
*newUn = *unVec; *newUn = *unVec;
*lowSol = *unVec; *lowSol = *unVec;
for (int i = 0; i < rm->getStages(); i++) { for (int i = 0; i < rm->getStages(); i++) {
*stageSolution = *unVec; *stageSolution = *unVec;
for (int j = 0; j < i; j++) { for (int j = 0; j < i; j++) {
...@@ -79,7 +84,7 @@ namespace AMDiS { ...@@ -79,7 +84,7 @@ namespace AMDiS {
*tmp *= (rm->getC(i, j) / *tauPtr); *tmp *= (rm->getC(i, j) / *tauPtr);
*timeRhsVec += *tmp; *timeRhsVec += *tmp;
} }
ProblemStat::buildAfterCoarsen(adaptInfo, flag, (i == 0), asmVector); ProblemStat::buildAfterCoarsen(adaptInfo, flag, (i == 0), asmVector);
ProblemStat::solve(adaptInfo, i == 0, i + 1 < rm->getStages()); ProblemStat::solve(adaptInfo, i == 0, i + 1 < rm->getStages());
...@@ -87,6 +92,7 @@ namespace AMDiS { ...@@ -87,6 +92,7 @@ namespace AMDiS {
*tmp = *solution; *tmp = *solution;
*tmp *= rm->getM1(i); *tmp *= rm->getM1(i);
*newUn += *tmp; *newUn += *tmp;
*tmp = *solution; *tmp = *solution;
......
Markdown is supported
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