Skip to content
Snippets Groups Projects
Commit ad204675 authored by Christoph Lehmann's avatar Christoph Lehmann
Browse files

[PL] f-f_0 -> u_0 - u; fixed docu.

parent 78c45ff6
No related branches found
No related tags found
No related merge requests found
...@@ -25,14 +25,14 @@ createUniformRobinBoundaryCondition( ...@@ -25,14 +25,14 @@ createUniformRobinBoundaryCondition(
//! \ogs_file_param{boundary_condition__UniformRobin__alpha} //! \ogs_file_param{boundary_condition__UniformRobin__alpha}
double const alpha = config.getConfigParameter<double>("alpha"); double const alpha = config.getConfigParameter<double>("alpha");
//! \ogs_file_param{boundary_condition__UniformRobin__f_0} //! \ogs_file_param{boundary_condition__UniformRobin__u_0}
double const f_0 = config.getConfigParameter<double>("f_0"); double const u_0 = config.getConfigParameter<double>("u_0");
return std::unique_ptr<UniformRobinBoundaryCondition>( return std::unique_ptr<UniformRobinBoundaryCondition>(
new UniformRobinBoundaryCondition( new UniformRobinBoundaryCondition(
integration_order, dof_table, variable_id, component_id, global_dim, integration_order, dof_table, variable_id, component_id, global_dim,
std::move(elements), std::move(elements),
UniformRobinBoundaryConditionData{alpha, f_0})); UniformRobinBoundaryConditionData{alpha, u_0}));
} }
} // ProcessLib } // ProcessLib
...@@ -27,9 +27,13 @@ using UniformRobinBoundaryCondition = GenericNaturalBoundaryCondition< ...@@ -27,9 +27,13 @@ using UniformRobinBoundaryCondition = GenericNaturalBoundaryCondition<
/*! Creates a new uniform Robin boundary condition from the given data. /*! Creates a new uniform Robin boundary condition from the given data.
* *
* The Robin boundary condition is given in the form * The Robin boundary condition is given in the form
* \f$ \partial f/\partial n = \alpha \cdot [ f(x) - f_0 ] \f$, * \f$ \alpha \cdot [ u_0 - u(x) ] \f$,
* where the coefficients \f$ \alpha \f$ and \f$ f_0 \f$ are obtained from the * where the coefficients \f$ \alpha \f$ and \f$ u_0 \f$ are obtained from the
* \c config. * \c config, and \f$ u \f$ is the unknown to which the boundary condition is
* applied.
*
* The value \f$ \alpha \cdot [ u_0 - u(x) ] \f$ is a flux. It replaces the
* integrand in the boundary integral for the variable \f$ u \f$.
*/ */
std::unique_ptr<UniformRobinBoundaryCondition> std::unique_ptr<UniformRobinBoundaryCondition>
createUniformRobinBoundaryCondition( createUniformRobinBoundaryCondition(
......
...@@ -16,7 +16,7 @@ namespace ProcessLib ...@@ -16,7 +16,7 @@ namespace ProcessLib
{ {
struct UniformRobinBoundaryConditionData final { struct UniformRobinBoundaryConditionData final {
double const alpha; double const alpha;
double const f_0; double const u_0;
}; };
template <typename ShapeFunction, typename IntegrationMethod, template <typename ShapeFunction, typename IntegrationMethod,
...@@ -59,13 +59,13 @@ public: ...@@ -59,13 +59,13 @@ public:
auto const& sm = Base::_shape_matrices[ip]; auto const& sm = Base::_shape_matrices[ip];
auto const& wp = integration_method.getWeightedPoint(ip); auto const& wp = integration_method.getWeightedPoint(ip);
// df/dn = alpha ( f - f_0 ) // flux = alpha * ( u_0 - u )
// adding a -alpha term to the diagonal of the stiffness matrix // adding a alpha term to the diagonal of the stiffness matrix
// and a -alpha * f_0 term to the rhs vector // and a alpha * u_0 term to the rhs vector
_local_K.diagonal().noalias() -= _local_K.diagonal().noalias() +=
sm.N * _data.alpha * sm.detJ * wp.getWeight(); sm.N * _data.alpha * sm.detJ * wp.getWeight();
_local_rhs.noalias() -= _local_rhs.noalias() +=
sm.N * _data.alpha * _data.f_0 * sm.detJ * wp.getWeight(); sm.N * _data.alpha * _data.u_0 * sm.detJ * wp.getWeight();
} }
auto const indices = NumLib::getIndices(id, dof_table_boundary); auto const indices = NumLib::getIndices(id, dof_table_boundary);
......
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