154 : el(el_), lsfun(lsfun_) { }
158 T operator() (
const blitz::TinyVector<T,3>& x)
const
168 const Array<int>& dof_map=el->GetDofMap();
171 for (
int oo = 0, kk = 0; kk <= el_order; kk++)
172 for (
int jj = 0; jj <= el_order; jj++)
173 for (
int ii = 0; ii <= el_order; ii++)
175 res=res-u1[ii]*u2[jj]*u3[kk]*lsfun(dof_map[oo++]);
182 blitz::TinyVector<T,3> grad(
const blitz::TinyVector<T,3>& x)
const
196 blitz::TinyVector<T,3> res(T(0.0),T(0.0),T(0.0));
198 const Array<int>& dof_map=el->GetDofMap();
200 for (
int oo = 0, kk = 0; kk <= el_order; kk++)
201 for (
int jj = 0; jj <= el_order; jj++)
202 for (
int ii = 0; ii <= el_order; ii++)
204 res[0]=res[0]-d1[ii]*u2[jj]*u3[kk]*lsfun(dof_map[oo]);
205 res[1]=res[1]-u1[ii]*d2[jj]*u3[kk]*lsfun(dof_map[oo]);
206 res[2]=res[2]-u1[ii]*u2[jj]*d3[kk]*lsfun(dof_map[oo]);
214 PositiveTensorFiniteElement* el;
222 LevelSet2D(PositiveTensorFiniteElement* el_, Vector& lsfun_)
223 :el(el_), lsfun(lsfun_) { }
227 T operator() (
const blitz::TinyVector<T,2>& x)
const
235 const Array<int>& dof_map=el->GetDofMap();
239 for (
int oo = 0, jj = 0; jj <= el_order; jj++)
240 for (
int ii = 0; ii <= el_order; ii++)
242 res=res-u1[ii]*u2[jj]*lsfun(dof_map[oo++]);
249 blitz::TinyVector<T,2> grad(
const blitz::TinyVector<T,2>& x)
const
260 blitz::TinyVector<T,2> res(T(0.0),T(0.0));
262 const Array<int>& dof_map=el->GetDofMap();
264 for (
int oo = 0, jj = 0; jj <= el_order; jj++)
265 for (
int ii = 0; ii <= el_order; ii++)
267 res[0]=res[0]-(d1[ii]*u2[jj])*lsfun(dof_map[oo]);
268 res[1]=res[1]-(u1[ii]*d2[jj])*lsfun(dof_map[oo]);
277 PositiveTensorFiniteElement* el;
282 IntegrationRule* sir;
283 IntegrationRule* vir;
284 PositiveTensorFiniteElement *pe;