Commit 300909e5 authored by thomaskummer's avatar thomaskummer
Browse files

cervin lifev update

parent 16bd4dd7
......@@ -309,17 +309,17 @@ public:
{
if ( solver.comm()->MyPID() == 0 ) std::cout << __FUNCTION__ << " a" << std::endl;
// m_patchDisplacementVecSumPtr = vectorPtr_Type (new VectorEpetra( solver.structuralOperatorPtr()->dispFESpacePtr()->map(), Repeated ));
// m_patchLocationScalarSumPtr = vectorPtr_Type (new VectorEpetra( solver.electroSolverPtr()->potentialPtr()->map(), Repeated ));
m_patchDisplacementVecSumPtr = vectorPtr_Type (new VectorEpetra( solver.structuralOperatorPtr()->dispFESpacePtr()->map(), Repeated ));
m_patchLocationScalarSumPtr = vectorPtr_Type (new VectorEpetra( solver.electroSolverPtr()->potentialPtr()->map(), Repeated ));
if ( solver.comm()->MyPID() == 0 ) std::cout << __FUNCTION__ << " b" << std::endl;
for (auto& patch : m_patchBCPtrVec)
{
patch->applyBC(solver, m_dataFile);
}
//
// updatePatchDisplacementSum(solver);
// updatePatchLocationSum(solver);
updatePatchDisplacementSum(solver);
updatePatchLocationSum(solver);
}
void modifyPatchBC(EMSolver<RegionMesh<LinearTetra>, EMMonodomainSolver<RegionMesh<LinearTetra> > >& solver, const Real& time)
......@@ -331,29 +331,29 @@ public:
patch->modifyPatchBC(solver, time);
}
// updatePatchDisplacementSum(solver);
// updatePatchLocationSum(solver);
updatePatchDisplacementSum(solver);
updatePatchLocationSum(solver);
}
// vector_Type& patchDisplacementSum()
// {
// return *m_patchDisplacementVecSumPtr;
// }
//
// vectorPtr_Type patchDisplacementSumPtr()
// {
// return m_patchDisplacementVecSumPtr;
// }
//
// vector_Type& patchLocationSum()
// {
// return *m_patchLocationScalarSumPtr;
// }
//
// vectorPtr_Type patchLocationSumPtr()
// {
// return m_patchLocationScalarSumPtr;
// }
vector_Type& patchDisplacementSum()
{
return *m_patchDisplacementVecSumPtr;
}
vectorPtr_Type patchDisplacementSumPtr()
{
return m_patchDisplacementVecSumPtr;
}
vector_Type& patchLocationSum()
{
return *m_patchLocationScalarSumPtr;
}
vectorPtr_Type patchLocationSumPtr()
{
return m_patchLocationScalarSumPtr;
}
private:
......
......@@ -206,8 +206,6 @@ int main (int argc, char** argv)
EssentialPatchBCHandler patchHandler ("listEssentialPatchBC", dataFile);
patchHandler.addPatchBC(solver);
if ( 0 == comm->MyPID() ) std::cout << "\n xyz \n";
if ( 0 == comm->MyPID() ) PRINT_FACTORY(EssentialPatchBC);
......@@ -265,8 +263,8 @@ int main (int argc, char** argv)
// Apply essential patch b.c.
//============================================
patchHandler.applyPatchBC(solver);
// heartSolver.setPatchDisplacementSumPtr(patchHandler.patchDisplacementSumPtr());
// heartSolver.setPatchLocationSumPtr(patchHandler.patchLocationSumPtr());
heartSolver.setPatchDisplacementSumPtr(patchHandler.patchDisplacementSumPtr());
heartSolver.setPatchLocationSumPtr(patchHandler.patchLocationSumPtr());
//============================================
......
......@@ -234,17 +234,17 @@ public:
M_emSolver.tensionEstimator().sigmaZPtr(),
UInt (0) );
// m_exporter->addVariable ( ExporterData<RegionMesh<LinearTetra> >::VectorField,
// "Patch displacement",
// M_emSolver.structuralOperatorPtr()->dispFESpacePtr(),
// this->patchDispSumPtr(),
// UInt (0) );
//
// m_exporter->addVariable ( ExporterData<RegionMesh<LinearTetra> >::ScalarField,
// "Patch location",
// M_emSolver.electroSolverPtr()->feSpacePtr(),
// this->patchLocSumPtr(),
// UInt (0) );
m_exporter->addVariable ( ExporterData<RegionMesh<LinearTetra> >::VectorField,
"Patch displacement",
M_emSolver.structuralOperatorPtr()->dispFESpacePtr(),
this->patchDispSumPtr(),
UInt (0) );
m_exporter->addVariable ( ExporterData<RegionMesh<LinearTetra> >::ScalarField,
"Patch location",
M_emSolver.electroSolverPtr()->feSpacePtr(),
this->patchLocSumPtr(),
UInt (0) );
m_exporter->addVariable ( ExporterData<RegionMesh<LinearTetra> >::VectorField,
"Fibers",
......@@ -366,25 +366,25 @@ public:
return traction.dot(velocity);
}
// void setPatchDisplacementSumPtr(vectorPtr_Type patchDisplacementSumPtr)
// {
// m_patchDisplacementSumPtr = patchDisplacementSumPtr;
// }
//
// vectorPtr_Type patchDispSumPtr()
// {
// return m_patchDisplacementSumPtr;
// }
//
// void setPatchLocationSumPtr(vectorPtr_Type patchLocationSumPtr)
// {
// m_patchLocationSumPtr = patchLocationSumPtr;
// }
//
// vectorPtr_Type patchLocSumPtr()
// {
// return m_patchLocationSumPtr;
// }
void setPatchDisplacementSumPtr(vectorPtr_Type patchDisplacementSumPtr)
{
m_patchDisplacementSumPtr = patchDisplacementSumPtr;
}
vectorPtr_Type patchDispSumPtr()
{
return m_patchDisplacementSumPtr;
}
void setPatchLocationSumPtr(vectorPtr_Type patchLocationSumPtr)
{
m_patchLocationSumPtr = patchLocationSumPtr;
}
vectorPtr_Type patchLocSumPtr()
{
return m_patchLocationSumPtr;
}
protected:
......@@ -406,7 +406,6 @@ protected:
std::string pipeToString ( const char* command )
{
FILE* file = popen( command, "r" ) ;
......@@ -418,8 +417,6 @@ protected:
return stm.str() ;
};
Real patchDispFunNormal (const Real& t, const Real& X, const Real& Y, const Real& Z, const ID& i)
{
return (-0.000 - 0.00005*t);// sinSquared(t, 0.1, 50, 100)); // -0.001;// (t * 1e-5);
......@@ -437,67 +434,6 @@ protected:
return 1.4 * time; // ( Y < 2.5 && Y > 0.5 ? 1.0 : 0.0 );
}
Real patchDispFun1 (const Real& t, const Real& X, const Real& Y, const Real& Z, const ID& i)
{
switch (i)
{
case 0:
return (t);
break;
case 1:
return 0;
break;
case 2:
return (t);
break;
default:
ERROR_MSG ("This entry is not allowed");
return 0.;
break;
}
}
Real patchDispFun2 (const Real& t, const Real& X, const Real& Y, const Real& Z, const ID& i)
{
switch (i)
{
case 0:
return (-t);
break;
case 1:
return 0;
break;
case 2:
return (-t);
break;
default:
ERROR_MSG ("This entry is not allowed");
return 0.;
break;
}
}
Real normalDirection ( const Real& /*t*/, const Real& x , const Real& y, const Real& z, const ID& i)
{
Real nnorm = std::sqrt(x * x + y * y + z * z);
switch (i)
{
case 0:
return 1/std::sqrt(2);
break;
case 1:
return 0;
break;
case 2:
return 1/std::sqrt(2);
break;
default:
ERROR_MSG ("This entry is not allowed");
return 0.;
break;
}
}
};
......
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