Commit e0f607da authored by Thomas KUMMER's avatar Thomas KUMMER
Browse files

euler lifev update

parent ab4aa280
......@@ -28,7 +28,7 @@
@file
@brief Generation muscular fibers and sheets
@author Simone Rossi <simone.rossi@epfl.ch>
@author Simone Rossi <simone.rossi@epfl.ch>, Thomas Kummer
@maintainer Simone Palamara <palamara.simone@gmail.com>
@date 31-01-2014
......
......@@ -1063,7 +1063,7 @@ template<typename Mesh , typename ElectroSolver>
void
EMSolver<Mesh, ElectroSolver>::computeDeformedFiberDirection (VectorEpetra& f_, VectorEpetra& f0_, VectorEpetra& disp, solidFESpacePtr_Type feSpacePtr)
{
// f_ = VectorEpetra(disp.map(), Unique);
// f_ = VectorEpetra(disp, Unique);
VectorEpetra dUdx (disp);
VectorEpetra dUdy (disp);
......@@ -1080,8 +1080,9 @@ EMSolver<Mesh, ElectroSolver>::computeDeformedFiberDirection (VectorEpetra& f_,
int n = f_.epetraVector().MyLength() / 3;
int i (0); int j (0); int k (0);
MatrixSmall<3,3> F; VectorSmall<3> f0;
f_ = f0_;
return;
// f_ = f0_; return;
for (int p (0); p < n; p++)
{
i = f_.blockMap().GID (p);
......@@ -1108,8 +1109,8 @@ EMSolver<Mesh, ElectroSolver>::computeDeformedFiberDirection (VectorEpetra& f_,
F(2,1) = dUdz[j];
F(2,2) = 1.0 + dUdz[k];
F *= 0.;
F(0,0) = 1.; F(1,1) = 1.; F(2,2) = 1.;
// F *= 0.;
// F(0,0) = 1.; F(1,1) = 1.; F(2,2) = 1.;
f0(0) = f0_[i];
f0(1) = f0_[j];
......@@ -1117,11 +1118,35 @@ EMSolver<Mesh, ElectroSolver>::computeDeformedFiberDirection (VectorEpetra& f_,
f0.normalize();
auto f = f0;
auto f = F * f0;
f_[i] = f(0);
f_[j] = f(1);
f_[k] = f(2);
}
// {
// using namespace ExpressionAssembly;
//
// auto I = value(Id);
// auto Grad_u = grad( dispETFESpace, dispCurrent, 0);
// auto F = Grad_u + I;
// auto FmT = minusT(F);
// auto J = det(F);
// auto p = value(pressure);
//
// QuadratureBoundary myBDQR (buildTetraBDQR (quadRuleTria7pt) );
//
// integrate ( boundary ( dispETFESpace->mesh(), bdFlag),
// myBDQR,
// dispETFESpace,
// value(-1.0) * p * J * dot( FmT * Nface, phi_i)
// //p * J * dot( FmT * Nface, phi_i)
// //value(-1.0) * J * dot (vE1, FmT * Nface) * phi_i) >> intergral
// ) >> traction;
//
// traction.globalAssemble();
// }
}
......
......@@ -249,8 +249,8 @@ public:
m_exporter->addVariable ( ExporterData<RegionMesh<LinearTetra> >::VectorField,
"Fibers",
M_emSolver.structuralOperatorPtr()->dispFESpacePtr(),
M_emSolver.structuralOperatorPtr()->fPtr(),
//M_emSolver.structuralOperatorPtr()->EMMaterial()->fiberVectorPtr(),
// M_emSolver.structuralOperatorPtr()->fPtr(),
M_emSolver.structuralOperatorPtr()->EMMaterial()->fiberVectorPtr(),
UInt (0) );
m_exporter->addVariable ( ExporterData<RegionMesh<LinearTetra> >::VectorField,
......
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