Skip to content
Snippets Groups Projects
Commit 541e49e3 authored by Johannes Hommel's avatar Johannes Hommel Committed by Simon Emmert
Browse files

[2pncmin][next] ported the .cc and problem files according to their 2pnc versions

parent 28e96442
No related branches found
No related tags found
2 merge requests!632Merge feature/2pncmin into next,!617[WIP] Next
......@@ -113,9 +113,8 @@ int main(int argc, char** argv) try
auto problem = std::make_shared<Problem>(fvGridGeometry);
// the solution vector
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
SolutionVector x(leafGridView.size(GridView::dimension));
SolutionVector x(leafGridView.size(0));
problem->applyInitialSolution(x);
auto xOld = x;
......@@ -141,6 +140,9 @@ int main(int argc, char** argv) try
VtkOutputModule<TypeTag> vtkWriter(*problem, *fvGridGeometry, *gridVariables, x, problem->name());
VtkOutputFields::init(vtkWriter); //! Add model specific output fields
//add specific output
vtkWriter.addField(problem->getCurrentDensity(), "currentDensity [A/cm^2]");
vtkWriter.addField(problem->getReactionSourceH2O(), "reactionSourceH2O [mol/(sm^2)]");
vtkWriter.addField(problem->getReactionSourceO2(), "reactionSourceO2 [mol/(sm^2)]");
vtkWriter.addField(problem->getKxx(), "Kxx");
vtkWriter.addField(problem->getKyy(), "Kyy");
vtkWriter.write(0.0);
......@@ -166,10 +168,6 @@ int main(int argc, char** argv) try
// time loop
timeLoop->start(); do
{
// set time for problem for implicit Euler scheme
problem->setTime( timeLoop->time() + timeLoop->timeStepSize() );
problem->setTimeStepSize( timeLoop->timeStepSize() );
// set previous solution for storage evaluations
assembler->setPreviousSolution(xOld);
......@@ -251,4 +249,4 @@ catch (...)
{
std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl;
return 4;
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment