Skip to content
Snippets Groups Projects
Commit ba965c40 authored by wenqing's avatar wenqing
Browse files

[PCS] Added a member to Process to set coupling terms to all local assemblers

parent 576d8d11
No related branches found
No related tags found
No related merge requests found
......@@ -66,18 +66,20 @@ void LiquidFlowProcess::initializeConcreteProcess(
pv.getShapeFunctionOrder(), _local_assemblers,
mesh.isAxiallySymmetric(), integration_order, _gravitational_axis_id,
_gravitational_acceleration, _reference_temperature,
*_material_properties);
*_material_properties, this->_coupling_term);
_secondary_variables.addSecondaryVariable(
"darcy_velocity",
makeExtrapolator(mesh.getDimension(),
getExtrapolator(), _local_assemblers,
makeExtrapolator(
mesh.getDimension(), getExtrapolator(), _local_assemblers,
&LiquidFlowLocalAssemblerInterface::getIntPtDarcyVelocity));
}
void LiquidFlowProcess::assembleConcreteProcess(
const double t, GlobalVector const& x, GlobalMatrix& M, GlobalMatrix& K,
GlobalVector& b)
void LiquidFlowProcess::assembleConcreteProcess(const double t,
GlobalVector const& x,
GlobalMatrix& M,
GlobalMatrix& K,
GlobalVector& b)
{
DBUG("Assemble LiquidFlowProcess.");
// Call global assembler for each local assembly item.
......@@ -100,15 +102,21 @@ void LiquidFlowProcess::assembleWithJacobianConcreteProcess(
dx_dx, M, K, b, Jac, _coupling_term);
}
void LiquidFlowProcess::computeSecondaryVariableConcrete(
const double t,
GlobalVector const& x)
void LiquidFlowProcess::computeSecondaryVariableConcrete(const double t,
GlobalVector const& x)
{
DBUG("Compute the velocity for LiquidFlowProcess.");
GlobalExecutor::executeMemberOnDereferenced(
&LiquidFlowLocalAssemblerInterface::computeSecondaryVariable,
_local_assemblers, *_local_to_global_index_map, t, x,
_coupling_term);
_local_assemblers, *_local_to_global_index_map, t, x, _coupling_term);
}
void LiquidFlowProcess::setStaggeredCouplingTermToLocalAssemblers()
{
DBUG("Compute the velocity for LiquidFlowProcess.");
GlobalExecutor::executeMemberOnDereferenced(
&LiquidFlowLocalAssemblerInterface::setStaggeredCouplingTerm,
_local_assemblers, _coupling_term);
}
} // end of namespace
......
......@@ -73,8 +73,8 @@ public:
double const reference_temperature,
BaseLib::ConfigTree const& config);
void computeSecondaryVariableConcrete(
double const t, GlobalVector const& x) override;
void computeSecondaryVariableConcrete(double const t,
GlobalVector const& x) override;
bool isLinear() const override { return true; }
int getGravitationalAxisID() const { return _gravitational_axis_id; }
......@@ -88,14 +88,16 @@ public:
return _material_properties.get();
}
void setStaggeredCouplingTermToLocalAssemblers() override;
private:
void initializeConcreteProcess(
NumLib::LocalToGlobalIndexMap const& dof_table,
MeshLib::Mesh const& mesh, unsigned const integration_order) override;
void assembleConcreteProcess(
const double t, GlobalVector const& x, GlobalMatrix& M, GlobalMatrix& K,
GlobalVector& b) override;
void assembleConcreteProcess(const double t, GlobalVector const& x,
GlobalMatrix& M, GlobalMatrix& K,
GlobalVector& b) override;
void assembleWithJacobianConcreteProcess(
const double t, GlobalVector const& x, GlobalVector const& xdot,
......
......@@ -75,6 +75,7 @@ public:
_coupling_term = coupling_term;
}
virtual void setStaggeredCouplingTermToLocalAssemblers() {}
void assemble(const double t, GlobalVector const& x, GlobalMatrix& M,
GlobalMatrix& K, GlobalVector& b) final;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment