Commit 07474bc5 authored by thomaskummer's avatar thomaskummer
Browse files

cervin lifev update

parent 96940424
......@@ -554,8 +554,6 @@ int main (int argc, char** argv)
std::vector<double> bcValues { p ( "lv" ) , p ( "rv") };
std::vector<double> bcValuesPre ( bcValues );
VectorSmall<4> ABdplv, ABdprv;
VectorSmall<2> VCirc, VCircNew, VCircPert, VFe, VFeNew, VFePert, R, dp;
MatrixSmall<2,2> JFe, JCirc, JR;
......@@ -798,7 +796,7 @@ int main (int argc, char** argv)
// 4th order Adam-Bashforth pressure extrapol.
//============================================//
heartSolver.extrapolate4thOrderAdamBashforth(bcValues, bcValuesPre, ABdplv, ABdprv, dpMax);
heartSolver.extrapolate4thOrderAdamBashforth(bcValues, bcValuesPre, dpMax);
if ( 0 == comm->MyPID() )
{
......
......@@ -146,24 +146,24 @@ public:
}
template<class bcVectorType>
void extrapolate4thOrderAdamBashforth(bcVectorType& bcValues, bcVectorType& bcValuesPre, VectorSmall<4>& ABdplv, VectorSmall<4>& ABdprv, const Real& dpMax)
void extrapolate4thOrderAdamBashforth(bcVectorType& bcValues, bcVectorType& bcValuesPre, const Real& dpMax)
{
VectorSmall<4> ABcoef;
ABcoef (0) = 55/24; ABcoef (1) = -59/24; ABcoef (2) = 37/24; ABcoef (3) = -3/8;
for ( unsigned int i = ABcoef.size() - 1; i > 0; --i )
{
ABdplv(i) = ABdplv(i-1);
ABdprv(i) = ABdprv(i-1);
m_ABdplv(i) = m_ABdplv(i-1);
m_ABdprv(i) = m_ABdprv(i-1);
}
ABdplv(0) = bcValues[0] - bcValuesPre[0];
ABdprv(0) = bcValues[1] - bcValuesPre[1];
m_ABdplv(0) = bcValues[0] - bcValuesPre[0];
m_ABdprv(0) = bcValues[1] - bcValuesPre[1];
bcValuesPre = bcValues;
bcValues[0] += std::min( std::max( ABcoef.dot( ABdplv ) , - dpMax ) , dpMax );
bcValues[1] += std::min( std::max( ABcoef.dot( ABdprv ) , - dpMax ) , dpMax );
bcValues[0] += std::min( std::max( ABcoef.dot( m_ABdplv ) , - dpMax ) , dpMax );
bcValues[1] += std::min( std::max( ABcoef.dot( m_ABdprv ) , - dpMax ) , dpMax );
}
......@@ -179,9 +179,13 @@ protected:
VectorSmall<2> M_pressure;
VectorSmall<2> M_volume;
VectorSmall<4> m_ABdplv, m_ABdprv;
std::string pipeToString ( const char* command )
{
FILE* file = popen( command, "r" ) ;
......
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