Skip to content
Snippets Groups Projects
Commit 04181c88 authored by podlesny's avatar podlesny
Browse files

.

parent be8301e0
No related branches found
No related tags found
No related merge requests found
......@@ -58,7 +58,7 @@ class HDF5Writer {
template <class Friction>
void reportSolution(ProgramState const &programState,
// for the friction coefficient
Friction &friction) {
std::vector<std::shared_ptr<Friction>>& friction) {
timeWriter_.write(programState);
for (size_t i=0; i<bodyCount_; i++) {
......@@ -66,7 +66,7 @@ class HDF5Writer {
patchInfoWriters_[i]->write(programState);
#endif
surfaceWriters_[i]->write(programState);
frictionalBoundaryWriters_[i]->write(programState, friction);
frictionalBoundaryWriters_[i]->write(programState, *friction[i]);
}
}
......
......@@ -462,10 +462,10 @@ int main(int argc, char *argv[]) {
const MyVTKWriter<MyVertexBasis, MyCellBasis> vtkWriter(cellBases, vertexBases, "body");
IterationRegister iterationCount;
/*
auto const report = [&](bool initial = false) {
if (writeData) {
dataWriter->reportSolution(programState, *myGlobalFriction);
dataWriter->reportSolution(programState, globalFriction);
if (!initial)
dataWriter->reportIterations(programState, iterationCount);
dataFile->flush();
......@@ -484,17 +484,19 @@ int main(int argc, char *argv[]) {
<< std::endl;
if (parset.get<bool>("io.vtk.write")) {
ScalarVector stress;
myAssembler.assembleVonMisesStress(body.getYoungModulus(),
std::vector<ScalarVector> stress(assemblers.size());
for (size_t i=0; i<stress.size(); i++) {
assemblers[i]->assembleVonMisesStress(body.getYoungModulus(),
body.getPoissonRatio(),
programState.u, stress);
programState.u[i], stress[i]);
}
vtkWriter.write(programState.timeStep, programState.u, programState.v,
programState.alpha, stress);
}
};
report(true);
*/
// Set up TNNMG solver
using NonlinearFactory = SolverFactory<DeformedGrid, GlobalFriction<Matrix, Vector>, Matrix, Vector>;
......@@ -560,7 +562,7 @@ int main(int argc, char *argv[]) {
nBodyAssembler.assembleTransferOperator();
nBodyAssembler.assembleObstacle();
// report();
report();
if (terminationRequested) {
std::cerr << "Terminating prematurely" << std::endl;
......
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