Commit 691023f6 authored by thomaskummer's avatar thomaskummer
Browse files

intrepid lifev update

parent df161605
......@@ -12,7 +12,9 @@
#include <stdio.h>
namespace LifeV
{
class HeartData
{
public:
......@@ -117,7 +119,8 @@ protected:
GetPot M_datafile;
};
}
#endif /* HeartData_hpp */
......@@ -116,54 +116,33 @@ public:
Real dtExport = 10.;
// Get most recent restart index
//if ( restartInput == "." )
//{
// restartInput = pipeToString( ("tail -n 1 " + restartDir + "solution.dat | awk -F '[. ]' '{print $1 \".\" $2}' | awk '{printf \"%05g\", int($1*1000/" + std::to_string(dtExport) + ") + 1}'").c_str() );
//}
// Set time variable
const unsigned int restartInputStr = std::stoi(restartInput);
const unsigned int nIter = (restartInputStr - 1) * dtExport / data().dt_mechanics();
t = nIter * data().dt_mechanics();
if ( 0 == M_emSolver.comm()->MyPID() )
{
std::cout << "\nLoad from restart: " << restartInput << ", nIterCirculation = " << nIter << ", time = " << t << std::endl;
}
// Set time exporter time index
M_emSolver.setTimeIndex(restartInputStr + 1);
//solver.importHdf5();
if ( 0 == M_emSolver.comm()->MyPID() )
{
std::cout << "\nLoad from restart: " << restartInput << ", nIterCirculation = " << nIter << ", time = " << t << std::endl;
}
// Load restart solutions from output files
std::string polynomialDegree = data().datafile() ( "solid/space_discretization/order", "P1");
if ( 0 == M_emSolver.comm()->MyPID() )
{
std::cout << "\nLoad from restart: " << restartInput << ", nIterCirculation = " << nIter << ", time = " << t << std::endl;
}
ElectrophysiologyUtility::importVectorField ( M_emSolver.structuralOperatorPtr() -> displacementPtr(), "MechanicalSolution" , "displacement", M_emSolver.localMeshPtr(), restartDir, polynomialDegree, restartInput );
if ( 0 == M_emSolver.comm()->MyPID() )
{
std::cout << "\nLoad from restart: " << restartInput << ", nIterCirculation = " << nIter << ", time = " << t << std::endl;
}
for ( unsigned int i = 0; i < M_emSolver.electroSolverPtr()->globalSolution().size() ; ++i )
{
ElectrophysiologyUtility::importScalarField (M_emSolver.electroSolverPtr()->globalSolution().at(i), "ElectroSolution" , ("Variable" + std::to_string(i)), M_emSolver.localMeshPtr(), restartDir, polynomialDegree, restartInput );
}
if ( 0 == M_emSolver.comm()->MyPID() )
{
std::cout << "\nLoad from restart: " << restartInput << ", nIterCirculation = " << nIter << ", time = " << t << std::endl;
}
ElectrophysiologyUtility::importScalarField (M_emSolver.activationModelPtr() -> fiberActivationPtr(), "ActivationSolution" , "Activation", M_emSolver.localMeshPtr(), restartDir, polynomialDegree, restartInput );
//ElectrophysiologyUtility::importScalarField (solver.activationTimePtr(), "ActivationTimeSolution" , "Activation Time", solver.localMeshPtr(), restartDir, polynomialDegree, restartInput );
if ( 0 == M_emSolver.comm()->MyPID() )
{
std::cout << "\nLoad from restart: " << restartInput << ", nIterCirculation = " << nIter << ", time = " << t << std::endl;
}
M_circulationSolver.restartFromFile ( restartDir + "solution.dat" , nIter );
}
......
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