Commit 7d9054f7 authored by thomaskummer's avatar thomaskummer
Browse files

euler lifev update

parent e92493bb
......@@ -44,13 +44,6 @@
#ifndef _EMSOLVER_H_
#define _EMSOLVER_H_
#ifdef EPETRA_MPI
#include <mpi.h>
#include <Epetra_MpiComm.h>
#else
#include <Epetra_SerialComm.h>
#endif
#include <lifev/core/mesh/MeshLoadingUtility.hpp>
#include <lifev/em/solver/electrophysiology/EMMonodomainSolver.hpp>
......@@ -1090,7 +1083,7 @@ EMSolver<Mesh, ElectroSolver>::computeDeformedFiberDirection (boost::shared_ptr<
// *f_ = *f0_; return;
for (int p (0); p < n; p++)
for (int p (0); p < n; ++p)
{
int i = f_->blockMap().GID (p);
int j = f_->blockMap().GID (p + n);
......
......@@ -299,6 +299,34 @@ public:
exporter.setPostDir (folder);
}
template<typename Mesh , typename ElectroSolver>
void
EMSolver<Mesh, ElectroSolver>::computeDeformedFiberDirection (boost::shared_ptr<VectorEpetra> f_, boost::shared_ptr<VectorEpetra> f0_, boost::shared_ptr<VectorEpetra> disp, solidFESpacePtr_Type feSpacePtr)
{
int n = f_->epetraVector().MyLength() / 3;
MatrixSmall<3,3> F; VectorSmall<3> f0;
for (int p (0); p < n; ++p)
{
int i = f_->blockMap().GID (p);
int j = f_->blockMap().GID (p + n);
int k = f_->blockMap().GID (p + 2 * n);
F *= 0.;
F(0,0) = 1.; F(1,1) = 1.; F(2,2) = 1.;
f0(0) = (*f0_)[i];
f0(1) = (*f0_)[j];
f0(2) = (*f0_)[k];
//
// f0.normalize();
//
auto f = F * f0;
(*f_)[i] = f(0);
(*f_)[j] = f(1);
(*f_)[k] = f(2);
}
}
void postProcess(const Real& time)
{
......@@ -309,7 +337,8 @@ public:
//M_emSolver.tensionEstimator().analyzeTensionsRecoveryEigenvalues();
// Compute deformed fiber direction
M_emSolver.computeDeformedFiberDirection (M_emSolver.structuralOperatorPtr()->fPtr(), M_emSolver.structuralOperatorPtr()->EMMaterial()->fiberVectorPtr(), M_emSolver.structuralOperatorPtr()->displacementPtr(), M_emSolver.structuralOperatorPtr()->dispFESpacePtr());
//M_emSolver.computeDeformedFiberDirection (M_emSolver.structuralOperatorPtr()->fPtr(), M_emSolver.structuralOperatorPtr()->EMMaterial()->fiberVectorPtr(), M_emSolver.structuralOperatorPtr()->displacementPtr(), M_emSolver.structuralOperatorPtr()->dispFESpacePtr());
computeDeformedFiberDirection (M_emSolver.structuralOperatorPtr()->fPtr(), M_emSolver.structuralOperatorPtr()->EMMaterial()->fiberVectorPtr(), M_emSolver.structuralOperatorPtr()->displacementPtr(), M_emSolver.structuralOperatorPtr()->dispFESpacePtr());
// Compute deformed sheet direction
M_emSolver.computeDeformedFiberDirection (M_emSolver.structuralOperatorPtr()->sPtr(), M_emSolver.structuralOperatorPtr()->EMMaterial()->sheetVectorPtr(), M_emSolver.structuralOperatorPtr()->displacementPtr(), M_emSolver.structuralOperatorPtr()->dispFESpacePtr());
......
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