Skip to content
Snippets Groups Projects
Commit d4bf6234 authored by Tom Fischer's avatar Tom Fischer
Browse files

[PL/BC] Set coordinates in spatial positions.

parent 5965d43b
No related branches found
No related tags found
No related merge requests found
...@@ -94,6 +94,7 @@ void getEssentialBCValuesLocal( ...@@ -94,6 +94,7 @@ void getEssentialBCValuesLocal(
if (global_index >= 0) if (global_index >= 0)
{ {
pos.setNodeID(id); pos.setNodeID(id);
pos.setCoordinates(*node);
bc_values.ids.emplace_back(global_index); bc_values.ids.emplace_back(global_index);
bc_values.values.emplace_back(parameter(t, pos).front()); bc_values.values.emplace_back(parameter(t, pos).front());
} }
......
...@@ -87,6 +87,7 @@ void PrimaryVariableConstraintDirichletBoundaryCondition::getEssentialBCValues( ...@@ -87,6 +87,7 @@ void PrimaryVariableConstraintDirichletBoundaryCondition::getEssentialBCValues(
// fetch the value of the primary variable // fetch the value of the primary variable
auto const local_x = x.get(std::vector{global_index}); auto const local_x = x.get(std::vector{global_index});
pos.setNodeID(id); pos.setNodeID(id);
pos.setCoordinates(*node);
if (_less && local_x[0] < _threshold_parameter(t, pos).front()) if (_less && local_x[0] < _threshold_parameter(t, pos).front())
{ {
bc_values.ids.emplace_back(global_index); bc_values.ids.emplace_back(global_index);
......
...@@ -31,6 +31,7 @@ class RobinBoundaryConditionLocalAssembler final ...@@ -31,6 +31,7 @@ class RobinBoundaryConditionLocalAssembler final
{ {
using Base = GenericNaturalBoundaryConditionLocalAssembler< using Base = GenericNaturalBoundaryConditionLocalAssembler<
ShapeFunction, IntegrationMethod, GlobalDim>; ShapeFunction, IntegrationMethod, GlobalDim>;
using ShapeMatricesType = ShapeMatrixPolicyType<ShapeFunction, GlobalDim>;
public: public:
RobinBoundaryConditionLocalAssembler(MeshLib::Element const& e, RobinBoundaryConditionLocalAssembler(MeshLib::Element const& e,
...@@ -65,16 +66,18 @@ public: ...@@ -65,16 +66,18 @@ public:
_data.u_0.getNodalValuesOnElement(Base::_element, t) _data.u_0.getNodalValuesOnElement(Base::_element, t)
.template topRows<ShapeFunction::MeshElement::n_all_nodes>(); .template topRows<ShapeFunction::MeshElement::n_all_nodes>();
ParameterLib::SpatialPosition position;
position.setElementID(Base::_element.getID());
for (unsigned ip = 0; ip < n_integration_points; ++ip) for (unsigned ip = 0; ip < n_integration_points; ++ip)
{ {
position.setIntegrationPoint(ip);
auto const& ip_data = Base::_ns_and_weights[ip]; auto const& ip_data = Base::_ns_and_weights[ip];
auto const& N = ip_data.N; auto const& N = ip_data.N;
auto const& w = ip_data.weight; auto const& w = ip_data.weight;
ParameterLib::SpatialPosition const position{
boost::none, Base::_element.getID(), ip,
MathLib::Point3d(
interpolateCoordinates<ShapeFunction, ShapeMatricesType>(
Base::_element, N))};
double integral_measure = 1.0; double integral_measure = 1.0;
if (_data.integral_measure) if (_data.integral_measure)
{ {
......
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