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

cleanup

[[Imported from SVN: r5598]]
parent a3938e12
No related branches found
No related tags found
No related merge requests found
...@@ -39,8 +39,8 @@ public: ...@@ -39,8 +39,8 @@ public:
private: private:
static Dune::FieldVector<ctype,dim+1> barycentricCoordinates(const Dune::FieldVector<ctype,dim>& local) { static std::vector<ctype> barycentricCoordinates(const Dune::FieldVector<ctype,dim>& local) {
Dune::FieldVector<ctype,dim+1> result; std::vector<ctype> result(dim+1);
result[0] = 1; result[0] = 1;
for (int i=0; i<dim; i++) { for (int i=0; i<dim; i++) {
result[0] -= local[i]; result[0] -= local[i];
...@@ -59,15 +59,9 @@ TargetSpace LocalGeodesicFEFunction<dim,ctype,TargetSpace>:: ...@@ -59,15 +59,9 @@ TargetSpace LocalGeodesicFEFunction<dim,ctype,TargetSpace>::
evaluate(const Dune::FieldVector<ctype, dim>& local) evaluate(const Dune::FieldVector<ctype, dim>& local)
{ {
// First compute the coordinates on the standard simplex (in R^{n+1}) // First compute the coordinates on the standard simplex (in R^{n+1})
std::vector<ctype> barycentricCoordinates(dim+1); std::vector<ctype> w = barycentricCoordinates(local);
barycentricCoordinates[0] = 1; AverageDistanceAssembler<TargetSpace> assembler(coefficients_, w);
for (int i=0; i<dim; i++) {
barycentricCoordinates[0] -= local[i];
barycentricCoordinates[i+1] = local[i];
}
AverageDistanceAssembler<TargetSpace> assembler(coefficients_, barycentricCoordinates);
TargetSpaceRiemannianTRSolver<TargetSpace> solver; TargetSpaceRiemannianTRSolver<TargetSpace> solver;
...@@ -129,7 +123,7 @@ evaluateDerivative(const Dune::FieldVector<ctype, dim>& local) ...@@ -129,7 +123,7 @@ evaluateDerivative(const Dune::FieldVector<ctype, dim>& local)
Dune::FMatrixHelp::multMatrix(dFdw,B, RHS); Dune::FMatrixHelp::multMatrix(dFdw,B, RHS);
// the actual system matrix // the actual system matrix
Dune::FieldVector<ctype,dim+1> w = barycentricCoordinates(local); std::vector<ctype> w = barycentricCoordinates(local);
AverageDistanceAssembler<TargetSpace> assembler(coefficients_, w); AverageDistanceAssembler<TargetSpace> assembler(coefficients_, w);
Dune::FieldMatrix<ctype,dim+1,dim+1> dFdq(0); Dune::FieldMatrix<ctype,dim+1,dim+1> dFdq(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment