Commit 59da1bc8 authored by thomaskummer's avatar thomaskummer
Browse files

cervin lifev update

parent 9f0009f1
......@@ -397,6 +397,8 @@ public:
void solveActivation (Real dt);
computeI4f (VectorEpetra& i4f, const VectorEpetra& f0_, const VectorEpetra& disp, const boost::shared_ptr<FESpace<RegionMesh<LinearTetra>, MapEpetra> >& feSpacePtr);
vectorPtr_Type getElectroFibers()
{
......@@ -916,11 +918,53 @@ template<typename Mesh , typename ElectroSolver>
void
EMSolver<Mesh, ElectroSolver>::solveActivation (Real dt)
{
// M_activationModelPtr -> solveModelPathology ( dt, *M_EMStructuralOperatorPtr->EMMaterial()->fiberVectorPtr(), *M_EMStructuralOperatorPtr->displacementPtr(), M_EMStructuralOperatorPtr->dispFESpacePtr(), M_fullMeshPtr );
computeI4f (M_activationModelPtr->I4f(), *M_EMStructuralOperatorPtr->EMMaterial()->fiberVectorPtr(), *M_EMStructuralOperatorPtr->displacementPtr(), M_EMStructuralOperatorPtr->dispFESpacePtr());
M_activationModelPtr -> solveModelPathology ( dt, M_fullMeshPtr );
}
template<typename Mesh , typename ElectroSolver>
void
EMSolver<Mesh, ElectroSolver>::computeI4f (VectorEpetra& i4f, const VectorEpetra& f0_, const VectorEpetra& disp, const boost::shared_ptr<FESpace<RegionMesh<LinearTetra>, MapEpetra> >& feSpacePtr)
{
VectorEpetra dUdx (disp);
VectorEpetra dUdy (disp);
VectorEpetra dUdz (disp);
dUdx = GradientRecovery::ZZGradient (feSpacePtr, disp, 0);
dUdy = GradientRecovery::ZZGradient (feSpacePtr, disp, 1);
dUdz = GradientRecovery::ZZGradient (feSpacePtr, disp, 2);
int n = i4f.epetraVector().MyLength();
int i (0); int j (0); int k (0);
MatrixSmall<3,3> F; VectorSmall<3> f0;
for (int p (0); p < n; p++)
{
i = dUdx.blockMap().GID (p);
j = dUdx.blockMap().GID (p + n);
k = dUdx.blockMap().GID (p + 2 * n);
F(0,0) = 1.0 + dUdx[i];
F(0,1) = dUdy[i];
F(0,2) = dUdz[i];
F(1,0) = dUdx[j];
F(1,1) = 1.0 + dUdy[j];
F(1,2) = dUdz[j];
F(2,0) = dUdx[k];
F(2,1) = dUdy[k];
F(2,2) = 1.0 + dUdz[k];
f0(0) = f0_[i];
f0(1) = f0_[j];
f0(2) = f0_[k];
auto f = F * f0;
i4f[i] = f.dot(f);
}
}
} // namespace LifeV
......
......@@ -114,46 +114,6 @@ ActiveStrainRossiModel14::solveModelPathology ( Real& timeStep, boost::shared_pt
}
void
ActiveStrainRossiModel14::computeI4f (VectorEpetra& i4f, const VectorEpetra& f0_, const VectorEpetra& disp, const boost::shared_ptr<FESpace<RegionMesh<LinearTetra>, MapEpetra> >& feSpacePtr)
{
VectorEpetra dUdx (disp);
VectorEpetra dUdy (disp);
VectorEpetra dUdz (disp);
dUdx = GradientRecovery::ZZGradient (feSpacePtr, disp, 0);
dUdy = GradientRecovery::ZZGradient (feSpacePtr, disp, 1);
dUdz = GradientRecovery::ZZGradient (feSpacePtr, disp, 2);
int n = i4f.epetraVector().MyLength();
int i (0); int j (0); int k (0);
MatrixSmall<3,3> F; VectorSmall<3> f0;
for (int p (0); p < n; p++)
{
i = dUdx.blockMap().GID (p);
j = dUdx.blockMap().GID (p + n);
k = dUdx.blockMap().GID (p + 2 * n);
F(0,0) = 1.0 + dUdx[i];
F(0,1) = dUdy[i];
F(0,2) = dUdz[i];
F(1,0) = dUdx[j];
F(1,1) = 1.0 + dUdy[j];
F(1,2) = dUdz[j];
F(2,0) = dUdx[k];
F(2,1) = dUdy[k];
F(2,2) = 1.0 + dUdz[k];
f0(0) = f0_[i];
f0(1) = f0_[j];
f0(2) = f0_[k];
auto f = F * f0;
i4f[i] = f.dot(f);
}
}
void
......
......@@ -74,7 +74,7 @@ public:
super::setup(data, map);
}
void computeI4f(VectorEpetra& i4f, const VectorEpetra& f0_, const VectorEpetra& disp, const boost::shared_ptr<FESpace<RegionMesh<LinearTetra>, MapEpetra> >& feSpacePtr);
void computeI4f();
void showMe()
{
......
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