Commit a293220e authored by grandper's avatar grandper
Browse files

Adds the force term in the assembly process

parent c0cc14ac
......@@ -115,11 +115,13 @@ AssemblyPolicyGeneralizedStokes::initAssembly ( Teuchos::ParameterList& list )
void
AssemblyPolicyGeneralizedStokes::assembleSystem ( matrixPtr_Type systemMatrix,
vectorPtr_Type /*rhs*/,
vectorPtr_Type rhs,
vectorPtr_Type /*solution*/,
preconditionerPtr_Type /*preconditioner*/ )
{
*systemMatrix += *M_stokesMatrix;
M_assembler->addMassRhs ( *rhs, problem()->force(), currentTime() );
}
} // namespace LifeV
......@@ -109,6 +109,7 @@ struct AssemblyPolicyGeneralizedStokes
assemblerPtr_Type M_assembler;
virtual Displayer displayer() = 0;
virtual Real currentTime() const = 0;
virtual fespacePtr_Type uFESpace() const = 0;
virtual fespacePtr_Type pFESpace() const = 0;
virtual NSProblemPtr_Type problem() const = 0;
......
......@@ -111,11 +111,13 @@ AssemblyPolicyStokes::initAssembly ( Teuchos::ParameterList& list )
void
AssemblyPolicyStokes::assembleSystem ( matrixPtr_Type systemMatrix,
vectorPtr_Type /*rhs*/,
vectorPtr_Type rhs,
vectorPtr_Type /*solution*/,
preconditionerPtr_Type /*preconditioner*/ )
{
*systemMatrix += *M_stokesMatrix;
M_assembler->addMassRhs ( *rhs, problem()->force(), currentTime() );
}
} // namespace LifeV
......@@ -106,6 +106,7 @@ struct AssemblyPolicyStokes
assemblerPtr_Type M_assembler;
virtual Displayer displayer() = 0;
virtual Real currentTime() const = 0;
virtual fespacePtr_Type uFESpace() const = 0;
virtual fespacePtr_Type pFESpace() const = 0;
virtual NSProblemPtr_Type problem() const = 0;
......
......@@ -37,6 +37,13 @@
namespace LifeV
{
Real
NavierStokesProblem::nullFunction( const Real&, const Real&, const Real&,
const Real&, const ID& )
{
return 0.0;
}
NavierStokesProblem::NavierStokesProblem()
: M_refinement ( 0 ), M_resourcesPath ( "" ), M_viscosity ( 1.0 ), M_density ( 1.0 )
{
......@@ -110,4 +117,10 @@ NavierStokesProblem::density() const
return M_density;
}
NavierStokesProblem::function_Type
NavierStokesProblem::force()
{
return nullFunction;
}
} // namespace LifeV
......@@ -53,6 +53,9 @@ public:
typedef Real (*function_Type) ( const Real&, const Real&, const Real&,
const Real&, const ID& );
static Real nullFunction( const Real&, const Real&, const Real&,
const Real&, const ID& );
//! @name Constructors, destructor
//@{
......@@ -130,6 +133,9 @@ public:
//! Returns the density
Real density() const;
//! Returns the value of the forces
virtual function_Type force();
//@}
protected:
......
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