diff --git a/Adaptive_benchmark/ArctanSphericalWaveFront.xinp b/Adaptive_benchmark/ArctanSphericalWaveFront.xinp
new file mode 100644
index 0000000..0371b00
--- /dev/null
+++ b/Adaptive_benchmark/ArctanSphericalWaveFront.xinp
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BINARY
+
+
+
+
+ x0=-.05; y0=-.05; z0=-.05; r=sqrt(pow(x-x0,2)+pow(y-y0,2)+pow(z-z0,2)); alpha=20; r0=0.7;
+
+(alpha*(2*x - 2*x0)^2)/(4*(alpha^2*(r0 - ((x - x0)^2 + (y - y0)^2 + (z - z0)^2)^(1/2))^2 + 1)*((x - x0)^2 + (y - y0)^2 + (z - z0)^2)^(3/2)) - (3*alpha)/((alpha^2*(r0 - ((x - x0)^2 + (y - y0)^2 + (z - z0)^2)^(1/2))^2 + 1)*((x - x0)^2 + (y - y0)^2 + (z - z0)^2)^(1/2)) + (alpha*(2*y - 2*y0)^2)/(4*(alpha^2*(r0 - ((x - x0)^2 + (y - y0)^2 + (z - z0)^2)^(1/2))^2 + 1)*((x - x0)^2 + (y - y0)^2 + (z - z0)^2)^(3/2)) + (alpha*(2*z - 2*z0)^2)/(4*(alpha^2*(r0 - ((x - x0)^2 + (y - y0)^2 + (z - z0)^2)^(1/2))^2 + 1)*((x - x0)^2 + (y - y0)^2 + (z - z0)^2)^(3/2)) - (alpha^3*(2*z - 2*z0)^2*(r0 - ((x - x0)^2 + (y - y0)^2 + (z - z0)^2)^(1/2)))/(2*(alpha^2*(r0 - ((x - x0)^2 + (y - y0)^2 + (z - z0)^2)^(1/2))^2 + 1)^2*((x - x0)^2 + (y - y0)^2 + (z - z0)^2)) - (alpha^3*(2*x - 2*x0)^2*(r0 - ((x - x0)^2 + (y - y0)^2 + (z - z0)^2)^(1/2)))/(2*(alpha^2*(r0 - ((x - x0)^2 + (y - y0)^2 + (z - z0)^2)^(1/2))^2 + 1)^2*((x - x0)^2 + (y - y0)^2 + (z - z0)^2)) - (alpha^3*(2*y - 2*y0)^2*(r0 - ((x - x0)^2 + (y - y0)^2 + (z - z0)^2)^(1/2)))/(2*(alpha^2*(r0 - ((x - x0)^2 + (y - y0)^2 + (z - z0)^2)^(1/2))^2 + 1)^2*((x - x0)^2 + (y - y0)^2 + (z - z0)^2))
+
+
+
+ x0=-.05; y0=-.05; z0=-.05; r=sqrt(pow(x-x0,2)+pow(y-y0,2)+pow(z-z0,2)); alpha=20; r0=0.7
+
+ atan(alpha*(r-r0))
+ -(alpha*(2*x - 2*x0))*pow(2*(alpha*alpha*pow(r - r0,2)+ 1)*r*r, -0.5) |
+ -(alpha*(2*y - 2*y0))*pow(2*(alpha*alpha*pow(r - r0,2)+ 1)*r*r, -0.5) |
+ -(alpha*(2*z - 2*z0))*pow(2*(alpha*alpha*pow(r - r0,2)+ 1)*r*r, -0.5)
+
+
+
+
+
+
+
+ 3
+ 100
+ 10000
+ 0.000001
+ 1
+ isotropic_function
+
+
+
diff --git a/Adaptive_benchmark/Fischera.g2 b/Adaptive_benchmark/Fischera.g2
new file mode 100644
index 0000000..b6d6013
--- /dev/null
+++ b/Adaptive_benchmark/Fischera.g2
@@ -0,0 +1,112 @@
+700 1 0 0
+3 0
+2 2
+0.000000 0.000000 1.000000 1.000000
+2 2
+0.000000 0.000000 1.000000 1.000000
+2 2
+0.000000 0.000000 1.000000 1.000000
+-1.000000 -1.000000 -1.000000
+0.000000 -1.000000 -1.000000
+-1.000000 0.000000 -1.000000
+0.000000 0.000000 -1.000000
+-1.000000 -1.000000 0.000000
+0.000000 -1.000000 0.000000
+-1.000000 0.000000 0.000000
+0.000000 0.000000 0.000000
+700 1 0 0
+3 0
+2 2
+0.000000 0.000000 1.000000 1.000000
+2 2
+0.000000 0.000000 1.000000 1.000000
+2 2
+0.000000 0.000000 1.000000 1.000000
+-1.000000 -1.000000 0.000000
+0.000000 -1.000000 0.000000
+-1.000000 0.000000 0.000000
+0.000000 0.000000 0.000000
+-1.000000 -1.000000 1.000000
+0.000000 -1.000000 1.000000
+-1.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+700 1 0 0
+3 0
+2 2
+0.000000 0.000000 1.000000 1.000000
+2 2
+0.000000 0.000000 1.000000 1.000000
+2 2
+0.000000 0.000000 1.000000 1.000000
+-1.000000 0.000000 -1.000000
+0.000000 0.000000 -1.000000
+-1.000000 1.000000 -1.000000
+0.000000 1.000000 -1.000000
+-1.000000 0.000000 0.000000
+0.000000 0.000000 0.000000
+-1.000000 1.000000 0.000000
+0.000000 1.000000 0.000000
+700 1 0 0
+3 0
+2 2
+0.000000 0.000000 1.000000 1.000000
+2 2
+0.000000 0.000000 1.000000 1.000000
+2 2
+0.000000 0.000000 1.000000 1.000000
+-1.000000 0.000000 0.000000
+0.000000 0.000000 0.000000
+-1.000000 1.000000 0.000000
+0.000000 1.000000 0.000000
+-1.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+-1.000000 1.000000 1.000000
+0.000000 1.000000 1.000000
+700 1 0 0
+3 0
+2 2
+0.000000 0.000000 1.000000 1.000000
+2 2
+0.000000 0.000000 1.000000 1.000000
+2 2
+0.000000 0.000000 1.000000 1.000000
+0.000000 -1.000000 -1.000000
+1.000000 -1.000000 -1.000000
+0.000000 0.000000 -1.000000
+1.000000 0.000000 -1.000000
+0.000000 -1.000000 0.000000
+1.000000 -1.000000 0.000000
+0.000000 0.000000 0.000000
+1.000000 0.000000 0.000000
+700 1 0 0
+3 0
+2 2
+0.000000 0.000000 1.000000 1.000000
+2 2
+0.000000 0.000000 1.000000 1.000000
+2 2
+0.000000 0.000000 1.000000 1.000000
+0.000000 -1.000000 0.000000
+1.000000 -1.000000 0.000000
+0.000000 0.000000 0.000000
+1.000000 0.000000 0.000000
+0.000000 -1.000000 1.000000
+1.000000 -1.000000 1.000000
+0.000000 0.000000 1.000000
+1.000000 0.000000 1.000000
+700 1 0 0
+3 0
+2 2
+0.000000 0.000000 1.000000 1.000000
+2 2
+0.000000 0.000000 1.000000 1.000000
+2 2
+0.000000 0.000000 1.000000 1.000000
+0.000000 0.000000 -1.000000
+1.000000 0.000000 -1.000000
+0.000000 1.000000 -1.000000
+1.000000 1.000000 -1.000000
+0.000000 0.000000 0.000000
+1.000000 0.000000 0.000000
+0.000000 1.000000 0.000000
+1.000000 1.000000 0.000000
diff --git a/Adaptive_benchmark/FischeraCorner.xinp b/Adaptive_benchmark/FischeraCorner.xinp
new file mode 100644
index 0000000..5e7f90d
--- /dev/null
+++ b/Adaptive_benchmark/FischeraCorner.xinp
@@ -0,0 +1,108 @@
+
+
+
+
+
+
+
+
+ Fischera.g2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - 6
+ - 5
+ - 4
+ - 2
+ - 6
+ - 4
+ - 3
+ - 2
+ - 5
+ - 4
+ - 3
+ - 2
+ - 6
+ - 4
+ - 2
+ - 1
+ - 5
+ - 4
+ - 1
+ - 6
+ - 3
+ - 1
+ - 5
+ - 3
+ - 2
+ - 1
+
+
+
+
+
+
+
+
+
+
+
+ BINARY
+
+
+
+
+ r2=(x*x+y*y+z*z); q=0.5; -q*(q+1)*pow(r2,q/2-1)
+
+ r =sqrt(x*x + y*y + z*z); q=0.5; pow(r,q)
+ r2= (x*x + y*y + z*z); q=0.5; -q*x*pow(r2,q/2 - 1) |
+ r2= (x*x + y*y + z*z); q=0.5; -q*y*pow(r2,q/2 - 1) |
+ r2= (x*x + y*y + z*z); q=0.5; -q*z*pow(r2,q/2 - 1)
+
+
+
+
+
+
+
+
+ 4
+ 100
+ 100000
+ 0.000001
+ 1
+ isotropic_function
+
+
+
diff --git a/Adaptive_benchmark/FischeraLine.xinp b/Adaptive_benchmark/FischeraLine.xinp
new file mode 100644
index 0000000..7426244
--- /dev/null
+++ b/Adaptive_benchmark/FischeraLine.xinp
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+ Fischera.g2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - 6
+ - 5
+ - 4
+ - 2
+ - 6
+ - 4
+ - 3
+ - 2
+ - 5
+ - 4
+ - 3
+ - 2
+ - 6
+ - 4
+ - 2
+ - 1
+ - 5
+ - 4
+ - 1
+ - 6
+ - 3
+ - 1
+ - 5
+ - 3
+ - 2
+ - 1
+
+
+
+
+
+
+
+
+
+
+
+ BINARY
+
+
+
+
+
+ r=sqrt(x*x+y*y+z*z); 1/r
+
+
+
+
+
+ 4
+ 100
+ 10000
+ 0.000001
+ 1
+ isotropic_function
+
+
+
+
diff --git a/Adaptive_benchmark/GenFischera.py b/Adaptive_benchmark/GenFischera.py
new file mode 100644
index 0000000..f61d951
--- /dev/null
+++ b/Adaptive_benchmark/GenFischera.py
@@ -0,0 +1,16 @@
+from splipy import *
+from splipy.IO import *
+import splipy.curve_factory as cf
+import splipy.surface_factory as sf
+import splipy.volume_factory as vf
+import numpy as np
+
+v = Volume() - [1,1,1];
+
+with G2("Fischera.g2") as f:
+ for i in range(2):
+ for j in range(2):
+ for k in range(2):
+ if i==j==k==1: # skip first octant
+ continue
+ f.write(v + [i,j,k])
diff --git a/Adaptive_benchmark/Peak3D.xinp b/Adaptive_benchmark/Peak3D.xinp
new file mode 100644
index 0000000..5a67649
--- /dev/null
+++ b/Adaptive_benchmark/Peak3D.xinp
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BINARY
+
+
+
+
+ x0=0.5; y0=0.5; z0=0.5; r2=pow(x-x0,2)+pow(y-y0,2)+pow(z-z0,2); alpha=1e3;
+6*alpha*exp(-alpha*r2) - alpha^2*exp(-alpha*r2)*(2*x - 2*x0)^2 - alpha^2*exp(-alpha*r2)*(2*y - 2*y0)^2 - alpha^2*exp(-alpha*r2)*(2*z - 2*z0)^2
+
+
+ x0=0.5; y0=0.5; z0=0.5; r2=pow(x-x0,2)+pow(y-y0,2)+pow(z-z0,2); alpha=1e3;
+
+ exp(-alpha*r2)
+ alpha*exp(-alpha*r2)*(2*x - 2*x0) |
+ alpha*exp(-alpha*r2)*(2*y - 2*y0) |
+ alpha*exp(-alpha*r2)*(2*z - 2*z0)
+
+
+
+
+
+
+
+ 3
+ 100
+ 10000
+ 0.000001
+ 1
+ isotropic_function
+
+
+
diff --git a/SIMPoisson.h b/SIMPoisson.h
index 37c554c..7b25a09 100644
--- a/SIMPoisson.h
+++ b/SIMPoisson.h
@@ -130,6 +130,8 @@ template class SIMPoisson : public SIMMultiPatchModelGen
// Project the FE stresses onto the splines basis
this->setMode(SIM::RECOVERY);
size_t i = 0;
+ if (projections == &myProj)
+ myProj.resize(this->opt.project.size());
for (auto pit = this->opt.project.begin();
pit != this->opt.project.end(); ++i, ++pit) {
Matrix ssol;