1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
/////////////////////////////////////////////////////////////
// //
// Copyright (c) 2003-2014 by The University of Queensland //
// Centre for Geoscience Computing //
// http://earth.uq.edu.au/centre-geoscience-computing //
// //
// Primary Business: Brisbane, Queensland, Australia //
// Licensed under the Open Software License version 3.0 //
// http://www.apache.org/licenses/LICENSE-2.0 //
// //
/////////////////////////////////////////////////////////////
#include "Model/ABCDampingIGP.h"
ABCDampingIGP::ABCDampingIGP(const string& type,
const string& name,
double visc,
double dt,
int maxi,
const Vec3& vref,
const Vec3& pos,
const Vec3& normal,
double c1)
:CDampingIGP(type,name,visc,dt,maxi,vref)
{
m_pos=pos;
m_normal=normal;
m_c1=c1;
}
/*!
Pack the parameters for a ABCDamping into a MPI-buffer
\param B the buffer
*/
void ABCDampingIGP::packInto(CVarMPIBuffer* B) const
{
CDampingIGP::packInto(B);
B->append(m_pos);
B->append(m_normal);
B->append(m_c1);
}
/*!
Extract parameters for a ABCDamping from a MPI-buffer
\param B the buffer
*/
ABCDampingIGP* extractABCDampingIGP(AMPIBuffer* B)
{
ABCDampingIGP* res = new ABCDampingIGP;
res->setName(B->pop_string());
res->setType(B->pop_string());
res->setVRef(B->pop_vector());
res->setVisc(B->pop_double());
res->setTimeStep(B->pop_double());
res->setMaxIter(B->pop_int());
res->setPos(B->pop_vector());
res->setNormal(B->pop_vector());
res->setC1(B->pop_double());
return res;
}
|