Skip to content
Snippets Groups Projects
Commit c6612d31 authored by Oliver Sander's avatar Oliver Sander Committed by sander@PCPOOL.MI.FU-BERLIN.DE
Browse files

remove Neumann boundary data code. Neumann problems are not always...

remove Neumann boundary data code.  Neumann problems are not always conservative --> I need to do some more thinking

[[Imported from SVN: r5687]]
parent 4da667b4
No related branches found
No related tags found
No related merge requests found
......@@ -52,43 +52,6 @@ assembleGradient(const std::vector<RigidBodyMotion<3> >& sol,
}
// ///////////////////////////////////////////////////////////////////////
// Add the contributions of the Neumann data. Since the boundary is
// zero-dimensional these are not integrals but simply values
// added at the first and last vertex.
// \todo We use again that the numbering goes from left to right!
// ///////////////////////////////////////////////////////////////////////
for (int i=0; i<3; i++) {
grad[0][i] += leftNeumannForce_[i];
grad[0][i+3] += leftNeumannTorque_[i];
grad[grad.size()-1][i] += rightNeumannForce_[i];
grad[grad.size()-1][i+3] += rightNeumannTorque_[i];
}
}
template <class GridView>
double RodAssembler<GridView>::
computeEnergy(const std::vector<RigidBodyMotion<3> >& sol) const
{
double energy = GeodesicFEAssembler<GridView,RigidBodyMotion<3> >::computeEnergy(sol);
// ///////////////////////////////////////////////////////////////////////
// Add the contributions of the Neumann data. Since the boundary is
// zero-dimensional these are not integrals but simply values
// added at the first and last vertex.
// \todo We use again that the numbering goes from left to right!
// ///////////////////////////////////////////////////////////////////////
energy += sol[0].r * leftNeumannForce_;
//energy += Rotation<3,double>::expInv(sol[0].q) * leftNeumannTorque_;
energy += sol.back().r * rightNeumannForce_;
//energy += Rotation<3,double>::expInv(sol.back().q) * rightNeumannTorque_;
return energy;
}
......
......@@ -37,20 +37,11 @@ class RodAssembler : public GeodesicFEAssembler<GridView, RigidBodyMotion<3> >
public:
GridView gridView_;
protected:
Dune::FieldVector<double, 3> leftNeumannForce_;
Dune::FieldVector<double, 3> leftNeumannTorque_;
Dune::FieldVector<double, 3> rightNeumannForce_;
Dune::FieldVector<double, 3> rightNeumannTorque_;
public:
//! ???
RodAssembler(const GridView &gridView,
RodLocalStiffness<GridView,double>* localStiffness)
: GeodesicFEAssembler<GridView, RigidBodyMotion<3> >(gridView,localStiffness),
gridView_(gridView),
leftNeumannForce_(0), leftNeumannTorque_(0), rightNeumannForce_(0), rightNeumannTorque_(0)
gridView_(gridView)
{
std::vector<RigidBodyMotion<3> > referenceConfiguration(gridView.size(gridDim));
......@@ -70,23 +61,9 @@ class RodAssembler : public GeodesicFEAssembler<GridView, RigidBodyMotion<3> >
dynamic_cast<RodLocalStiffness<GridView, double>* >(this->localStiffness_)->setReferenceConfiguration(referenceConfiguration);
}
void setNeumannData(const Dune::FieldVector<double, 3>& leftForce,
const Dune::FieldVector<double, 3>& leftTorque,
const Dune::FieldVector<double, 3>& rightForce,
const Dune::FieldVector<double, 3>& rightTorque)
{
leftNeumannForce_ = leftForce;
leftNeumannTorque_ = leftTorque;
rightNeumannForce_ = rightForce;
rightNeumannTorque_ = rightTorque;
}
void assembleGradient(const std::vector<RigidBodyMotion<3> >& sol,
Dune::BlockVector<Dune::FieldVector<double, blocksize> >& grad) const;
/** \brief Compute the energy of a deformation state */
double computeEnergy(const std::vector<RigidBodyMotion<3> >& sol) const;
void getStrain(const std::vector<RigidBodyMotion<3> >& sol,
Dune::BlockVector<Dune::FieldVector<double, blocksize> >& strain) const;
......
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