17 #ifdef MFEM_HAVE_GCC_PRAGMA_DIAGNOSTIC
18 #pragma GCC diagnostic push
19 #pragma GCC diagnostic ignored "-Wunused-function"
24 #ifdef MFEM_HAVE_GCC_PRAGMA_DIAGNOSTIC
25 #pragma GCC diagnostic pop
32 : mesh(NULL), gsl_mesh(), fdata2D(NULL), fdata3D(NULL),
dim(-1)
37 MPI_Comm comm = MPI_COMM_WORLD;;
51 : mesh(NULL), gsl_mesh(), fdata2D(NULL), fdata3D(NULL),
dim(-1)
60 MFEM_VERIFY(m.
GetNodes() != NULL,
"Mesh nodes are required.");
66 dim = mesh->Dimension();
67 const int NE = mesh->GetNE(),
69 pts_cnt = NE * dof_cnt;
81 for (
int i = 0; i < NE; i++)
85 for (
int j = 0; j < dof_cnt; j++)
87 for (
int d = 0; d <
dim; d++)
89 gsl_mesh(pts_cnt * d + pt_id) = pos(dof_map[j], d);
98 unsigned nr[2] = {dof1D, dof1D};
99 unsigned mr[2] = {2*dof1D, 2*dof1D};
102 pts_cnt, pts_cnt, npt_max, newt_tol);
106 unsigned nr[3] = {dof1D, dof1D, dof1D};
107 unsigned mr[3] = {2*dof1D, 2*dof1D, 2*dof1D};
108 double *
const elx[3] =
111 pts_cnt, pts_cnt, npt_max, newt_tol);
120 const int points_cnt = point_pos.
Size() /
dim;
123 const double *xv_base[2];
124 xv_base[0] = point_pos.
GetData();
125 xv_base[1] = point_pos.
GetData() + points_cnt;
126 unsigned xv_stride[2];
127 xv_stride[0] =
sizeof(double);
128 xv_stride[1] =
sizeof(double);
129 findpts_2(codes.
GetData(),
sizeof(
unsigned int),
130 proc_ids.
GetData(),
sizeof(
unsigned int),
131 elem_ids.
GetData(),
sizeof(
unsigned int),
133 dist.
GetData(),
sizeof(double),
134 xv_base, xv_stride, points_cnt,
fdata2D);
138 const double *xv_base[3];
139 xv_base[0] = point_pos.
GetData();
140 xv_base[1] = point_pos.
GetData() + points_cnt;
141 xv_base[2] = point_pos.
GetData() + 2*points_cnt;
142 unsigned xv_stride[3];
143 xv_stride[0] =
sizeof(double);
144 xv_stride[1] =
sizeof(double);
145 xv_stride[2] =
sizeof(double);
146 findpts_3(codes.
GetData(),
sizeof(
unsigned int),
147 proc_ids.
GetData(),
sizeof(
unsigned int),
148 elem_ids.
GetData(),
sizeof(
unsigned int),
150 dist.
GetData(),
sizeof(double),
151 xv_base, xv_stride, points_cnt,
fdata3D);
164 const int points_cnt = ref_pos.
Size() /
dim;
167 findpts_eval_2(field_out.
GetData(),
sizeof(double),
168 codes.
GetData(),
sizeof(
unsigned int),
169 proc_ids.
GetData(),
sizeof(
unsigned int),
170 elem_ids.
GetData(),
sizeof(
unsigned int),
176 findpts_eval_3(field_out.
GetData(),
sizeof(double),
177 codes.
GetData(),
sizeof(
unsigned int),
178 proc_ids.
GetData(),
sizeof(
unsigned int),
179 elem_ids.
GetData(),
sizeof(
unsigned int),
193 MFEM_ASSERT(gf_in.
FESpace()->
GetVDim() == 1,
"Scalar function expected.");
200 node_vals.
SetSize(NE * dof_cnt);
208 for (
int i = 0; i < NE; i++)
211 for (
int j = 0; j < dof_cnt; j++)
213 node_vals(pt_id++) = vals_el(dof_map[j]);
220 #endif // MFEM_USE_GSLIB
int GetNPoints() const
Returns the number of the points in the integration rule.
void FindPoints(Vector &point_pos, Array< unsigned int > &codes, Array< unsigned int > &proc_ids, Array< unsigned int > &elem_ids, Vector &ref_pos, Vector &dist)
Class for an integration rule - an Array of IntegrationPoint.
Class for grid function - Vector with associated FE space.
struct findpts_data_3 * fdata3D
void SetSize(int s)
Resize the vector to size s.
void GetElementVDofs(int i, Array< int > &vdofs) const
Returns indexes of degrees of freedom in array dofs for i'th element.
void Setup(Mesh &m, double bb_t, double newt_tol, int npt_max)
void GetSubVector(const Array< int > &dofs, Vector &elemvect) const
T * GetData()
Returns the data.
int GetOrder() const
Returns the order of the finite element. In the case of anisotropic orders, returns the maximum order...
Data type dense matrix using column-major storage.
int Size() const
Returns the size of the vector.
int GetNE() const
Returns number of elements.
double * GetData() const
Return a pointer to the beginning of the Vector data.
void GetNodeValues(const GridFunction &gf_in, Vector &node_vals)
void Interpolate(Array< unsigned int > &codes, Array< unsigned int > &proc_ids, Array< unsigned int > &elem_ids, Vector &ref_pos, const GridFunction &field_in, Vector &field_out)
const IntegrationRule & GetNodes() const
void GetValues(int i, const IntegrationRule &ir, Vector &vals, int vdim=1) const
int GetVDim() const
Returns vector dimension.
FiniteElementSpace * FESpace()
double * Data() const
Returns the matrix data array.
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
int GetDof() const
Returns the number of degrees of freedom in the finite element.
const Array< int > & GetDofMap() const
Get an Array<int> that maps lexicographically ordered indices to the indices of the respective nodes/...
const FiniteElement * GetFE(int i) const
Returns pointer to the FiniteElement associated with i'th element.
void GetNodes(Vector &node_coord) const
struct findpts_data_2 * fdata2D