111 {
return (xi*
knot(ni+1) + (1. - xi)*
knot(ni)); }
183 void Print(std::ostream &os)
const;
279 const real_t* control_points);
290 const real_t* control_points);
305 void Print(std::ostream &os)
const;
440class ParNURBSExtension;
545 inline int KnotInd(
int edge)
const;
729 void Print(std::ostream &os,
const std::string &comments =
"")
const;
930 Table *GetGlobalElementDofTable();
931 Table *Get1DGlobalElementDofTable();
932 Table *Get2DGlobalElementDofTable();
933 Table *Get3DGlobalElementDofTable();
937 void SetActive(
const int *partitioning_,
const Array<bool> &active_bel);
940 void BuildGroups(
const int *partitioning_,
const Table &elem_dof);
956 const int *partitioning_,
986 inline static int F(
const int n,
const int N)
987 {
return (n < 0) ? 0 : ((n >= N) ? 2 : 1); }
989 inline static int Or1D(
const int n,
const int N,
const int Or)
990 {
return (Or > 0) ? n : (N - 1 - n); }
992 inline static int Or2D(
const int n1,
const int n2,
993 const int N1,
const int N2,
const int Or);
998 void GetPatchKnotVectors (
int p,
const KnotVector *kv[]);
1001 void GetBdrPatchKnotVectors(
int bp,
const KnotVector *kv[],
int *okv);
1008 inline int nx()
const {
return I + 1; }
1010 inline int ny()
const {
return J + 1; }
1012 inline int nz()
const {
return K + 1; }
1029 inline int operator()(
const int i,
const int j)
const;
1032 inline int operator()(
const int i,
const int j,
const int k)
const;
1041 if (
data == 0 || i < 0 || i >=
nd || j < 0 || j >
ls)
1052 if (
data == 0 || i < 0 || i >=
nd || j < 0 || j >
ls)
1064 if (
data == 0 || i < 0 || i >=
ni ||
nj > 0 ||
nk > 0 ||
1077 if (
data == 0 || i < 0 || i >=
ni ||
nj > 0 ||
nk > 0 ||
1080 mfem_error(
"NURBSPatch::operator() const 1D");
1090 if (
data == 0 || i < 0 || i >=
ni || j < 0 || j >=
nj ||
nk > 0 ||
1103 if (
data == 0 || i < 0 || i >=
ni || j < 0 || j >=
nj ||
nk > 0 ||
1106 mfem_error(
"NURBSPatch::operator() const 2D");
1116 if (
data == 0 || i < 0 || i >=
ni || j < 0 || j >=
nj || k < 0 ||
1117 k >=
nk || l < 0 || l >=
Dim)
1129 if (
data == 0 || i < 0 || i >=
ni || j < 0 || j >=
nj || k < 0 ||
1130 k >=
nk || l < 0 || l >=
Dim)
1132 mfem_error(
"NURBSPatch::operator() const 3D");
1142 return (kv >= 0) ? kv : (-1-kv);
1173inline int NURBSPatchMap::Or2D(
const int n1,
const int n2,
1174 const int N1,
const int N2,
const int Or)
1179 case 0:
return n1 + n2*N1;
1180 case 1:
return n2 + n1*N2;
1181 case 2:
return n2 + (N1 - 1 - n1)*N2;
1182 case 3:
return (N1 - 1 - n1) + n2*N1;
1183 case 4:
return (N1 - 1 - n1) + (N2 - 1 - n2)*N1;
1184 case 5:
return (N2 - 1 - n2) + (N1 - 1 - n1)*N2;
1185 case 6:
return (N2 - 1 - n2) + n1*N2;
1186 case 7:
return n1 + (N2 - 1 - n2)*N1;
1196 const int i1 = i - 1;
1199 case 0:
return verts[0];
1200 case 1:
return pOffset + Or1D(i1, I, opatch);
1201 case 2:
return verts[1];
1204 mfem_error(
"NURBSPatchMap::operator() const 1D");
1211 const int i1 = i - 1, j1 = j - 1;
1212 switch (3*F(j1, J) + F(i1, I))
1214 case 0:
return verts[0];
1215 case 1:
return edges[0] + Or1D(i1, I, oedge[0]);
1216 case 2:
return verts[1];
1217 case 3:
return edges[3] + Or1D(j1, J, -oedge[3]);
1218 case 4:
return pOffset + Or2D(i1, j1, I, J, opatch);
1219 case 5:
return edges[1] + Or1D(j1, J, oedge[1]);
1220 case 6:
return verts[3];
1221 case 7:
return edges[2] + Or1D(i1, I, -oedge[2]);
1222 case 8:
return verts[2];
1225 mfem_error(
"NURBSPatchMap::operator() const 2D");
1234 const int i1 = i - 1, j1 = j - 1, k1 = k - 1;
1235 switch (3*(3*F(k1, K) + F(j1, J)) + F(i1, I))
1237 case 0:
return verts[0];
1238 case 1:
return edges[0] + Or1D(i1, I, oedge[0]);
1239 case 2:
return verts[1];
1240 case 3:
return edges[3] + Or1D(j1, J, oedge[3]);
1241 case 4:
return faces[0] + Or2D(i1, J - 1 - j1, I, J, oface[0]);
1242 case 5:
return edges[1] + Or1D(j1, J, oedge[1]);
1243 case 6:
return verts[3];
1244 case 7:
return edges[2] + Or1D(i1, I, oedge[2]);
1245 case 8:
return verts[2];
1246 case 9:
return edges[8] + Or1D(k1, K, oedge[8]);
1247 case 10:
return faces[1] + Or2D(i1, k1, I, K, oface[1]);
1248 case 11:
return edges[9] + Or1D(k1, K, oedge[9]);
1249 case 12:
return faces[4] + Or2D(J - 1 - j1, k1, J, K, oface[4]);
1250 case 13:
return pOffset + I*(J*k1 + j1) + i1;
1251 case 14:
return faces[2] + Or2D(j1, k1, J, K, oface[2]);
1252 case 15:
return edges[11] + Or1D(k1, K, oedge[11]);
1253 case 16:
return faces[3] + Or2D(I - 1 - i1, k1, I, K, oface[3]);
1254 case 17:
return edges[10] + Or1D(k1, K, oedge[10]);
1255 case 18:
return verts[4];
1256 case 19:
return edges[4] + Or1D(i1, I, oedge[4]);
1257 case 20:
return verts[5];
1258 case 21:
return edges[7] + Or1D(j1, J, oedge[7]);
1259 case 22:
return faces[5] + Or2D(i1, j1, I, J, oface[5]);
1260 case 23:
return edges[5] + Or1D(j1, J, oedge[5]);
1261 case 24:
return verts[7];
1262 case 25:
return edges[6] + Or1D(i1, I, oedge[6]);
1263 case 26:
return verts[6];
1266 mfem_error(
"NURBSPatchMap::operator() const 3D");
Dynamic 2D array using row-major layout.
int Size() const
Return the logical size of the array.
Data type dense matrix using column-major storage.
Abstract class for all finite elements.
Class for grid function - Vector with associated FE space.
A vector of knots in one dimension, with B-spline basis functions of a prescribed order.
~KnotVector()
Destroys KnotVector.
std::shared_ptr< SpacingFunction > spacing
Function to define the distribution of knots for any number of knot spans.
void FindMaxima(Array< int > &ks, Vector &xi, Vector &u) const
Gives the locations of the maxima of the KnotVector in reference space. The function gives the knot s...
int findKnotSpan(real_t u) const
Return the index of the knot span containing parameter u.
void PrintFunctions(std::ostream &os, int samples=11) const
Prints the non-zero shape functions and their first and second derivatives associated with the KnotVe...
int NumOfElements
Number of elements, defined by distinct knots.
void CalcDnShape(Vector &gradn, int n, int i, real_t xi) const
Calculate n-th derivatives (order n) of the nonvanishing shape function values in grad for the elemen...
int Order
Order of the B-spline basis functions.
KnotVector & operator=(const KnotVector &kv)
void UniformRefinement(Vector &newknots, int rf) const
Uniformly refine by factor rf, by inserting knots in each span.
bool isElement(int i) const
Return whether the knot index Order plus i is the beginning of an element.
void CalcShape(Vector &shape, int i, real_t xi) const
Calculate the nonvanishing shape function values in shape for the element corresponding to knot index...
void FindInterpolant(Array< Vector * > &x)
Global curve interpolation through the points x (overwritten). x is an array with the length of the s...
const real_t & operator[](int i) const
Const access function to knot i.
real_t getKnotLocation(real_t xi, int ni) const
Return the parameter for element reference coordinate xi in [0,1], for the element beginning at knot ...
Vector knot
Stores the values of all knots.
int GetNKS() const
Return the number of control points minus the order. This is not the number of knot spans,...
void GetElements()
Count the number of elements.
KnotVector * DegreeElevate(int t) const
Return a new KnotVector with elevated degree by repeating the endpoints of the KnotVector.
void Refinement(Vector &newknots, int rf) const
Refine with refinement factor rf.
KnotVector()
Create an empty KnotVector.
static const int MaxOrder
void CalcD2Shape(Vector &grad2, int i, real_t xi) const
Calculate second-order shape function derivatives, using CalcDnShape.
int GetOrder() const
Return the order.
int GetNCP() const
Return the number of control points.
int NumOfControlPoints
Number of control points.
void CalcDShape(Vector &grad, int i, real_t xi) const
Calculate derivatives of the nonvanishing shape function values in grad for the element corresponding...
int Size() const
Return the number of knots, including multiplicities.
void Flip()
Reverse the knots.
void Difference(const KnotVector &kv, Vector &diff) const
int GetCoarseningFactor() const
Vector GetFineKnots(const int cf) const
real_t & operator[](int i)
Access function to knot i.
int GetNE() const
Return the number of elements, defined by distinct knots.
KnotVector(const KnotVector &kv)
Copy constructor.
void Print(std::ostream &os) const
Print the order, number of control points, and knots.
int GetAttribute(int i) const
Return the attribute of element i.
int GetBdrAttribute(int i) const
Return the attribute of boundary element i.
void SetAttribute(int i, int attr)
Set the attribute of element i.
int GetNE() const
Returns number of elements.
int Dimension() const
Dimension of the reference space used within the elements.
int GetNBE() const
Returns number of boundary elements.
void SetBdrAttribute(int i, int attr)
Set the attribute of boundary element i.
NURBSExtension generally contains multiple NURBSPatch objects spanning an entire Mesh....
void Get2DPatchNets(const Vector &coords, int vdim)
void SetSolutionVector(Vector &coords, int vdim)
Return in coords the coordinates from each patch. Side effects: delete the patches and update the wei...
int GetNP() const
Return the number of patches.
int GetNBE() const
Return the number of active boundary elements.
Mode
Flag for indicating what type of NURBS fespace this extension is used for.
@ H_CURL
Extension for a divergence conforming vector-valued space
@ H_DIV
Extension for a standard scalar-valued space
void InitDofMap()
Set DOF map sizes to 0.
Mesh * patchTopo
Patch topology mesh.
void GetCoarseningFactors(Array< int > &f) const
void Generate3DElementDofTable()
void SetPatchAttribute(int i, int attr)
Set the attribute for patch i, which is set to all elements in the patch.
const Array< int > & GetPatchElements(int patch)
Return the array of indices of all elements in patch patch.
std::vector< Array< int > > patch_to_bel
For each patch p, patch_to_bel[p] lists all boundary elements in the patch.
void UniformRefinement(int rf=2)
Refine with optional refinement factor rf. Uniform means refinement is done everywhere by the same fa...
Array< int > p_meshOffsets
int GetGNE() const
Return the global number of elements.
Array< int > mOrders
Orders of all KnotVectors.
void Print(std::ostream &os, const std::string &comments="") const
Writes all patch data to the stream os.
Table * el_dof
Table of DOFs for each element (el_dof) or boundary element (bel_dof).
void SetPatchBdrAttribute(int i, int attr)
Set the attribute for patch boundary element i to attr, which is set to all boundary elements in the ...
void PrintSolution(const GridFunction &sol, std::ostream &os) const
Write a GridFunction sol patch-by-patch to stream os.
friend class ParNURBSExtension
void GenerateOffsets()
Set the mesh and space offsets, and also count the global NumOfVertices and the global NumOfDofs.
int DofMap(int dof) const
Return the dof index whilst accounting for periodic boundaries.
Array< bool > activeBdrElem
int GetNBP() const
Return the number of boundary patches.
bool own_topo
Whether this object owns patchTopo.
void SetCoordsFromPatches(Vector &Nodes)
Set FE coordinates in Nodes, using data from patches, and erase patches.
void SetOrderFromOrders()
Set overall order mOrder based on KnotVector orders.
void GetElementIJK(int elem, Array< int > &ijk)
Return Cartesian indices (i,j) in 2D or (i,j,k) in 3D of element elem, in the knot-span tensor produc...
void MergeGridFunctions(GridFunction *gf_array[], int num_pieces, GridFunction &merged)
Set the DOFs of merged to values from active elements in num_pieces of Gridfunctions gf_array.
const Vector & GetWeights() const
Access function to the vector of weights weights.
void Set2DSolutionVector(Vector &coords, int vdim)
void Set3DSolutionVector(Vector &coords, int vdim)
void GenerateActiveVertices()
Determine activeVert, NumOfActiveVertices from the activeElem array.
Array< int > el_to_patch
Map from element indices to patch indices.
void Coarsen(int cf=2, real_t tol=1.0e-12)
int GetPatchAttribute(int i) const
Get the attribute for patch i, which is set to all elements in the patch.
const Array< int > & GetSlave() const
void Get2DBdrElementTopo(Array< Element * > &boundary) const
void GetElementTopo(Array< Element * > &elements) const
Generate the active mesh elements and return them in elements.
const Array< int > & GetPatchBdrElements(int patch)
Return the array of indices of all boundary elements in patch patch.
void Get1DElementTopo(Array< Element * > &elements) const
Generate the active mesh elements and return them in elements.
int KnotInd(int edge) const
Return the unsigned index of the KnotVector for edge edge.
int GetNKV() const
Return the number of KnotVectors.
void GetVertexLocalToGlobal(Array< int > &lvert_vert)
Get the local to global vertex index map lvert_vert.
void CountBdrElements()
Count the global NumOfBdrElements.
void LoadBE(int i, const FiniteElement *BE) const
Load boundary element i into BE.
void Get2DElementTopo(Array< Element * > &elements) const
Table * GetElementDofTable()
void GenerateElementDofTable()
Based on activeElem, count NumOfActiveDofs and generate el_dof, el_to_patch, el_to_IJK,...
void Generate3DBdrElementDofTable()
int GetGNV() const
Return the global number of vertices.
KnotVector * KnotVec(int edge)
bool HavePatches() const
Return true if at least 1 patch is defined, false otherwise.
std::vector< Array< int > > patch_to_el
For each patch p, patch_to_el[p] lists all elements in the patch.
Array< int > v_meshOffsets
Global mesh offsets, meshOffsets == meshVertexOffsets.
NURBSExtension & operator=(const NURBSExtension &)=delete
Copy assignment not supported.
int NumOfActiveVertices
Local entity counts.
void CheckKVDirection(int p, Array< int > &kvdir)
Return the directions in kvdir of the KnotVectors in patch p based on the patch edge orientations....
void GetBdrElementTopo(Array< Element * > &boundary) const
Generate the active mesh boundary elements and return them in boundary.
void SetOrdersFromKnotVectors()
Set orders from KnotVector orders.
Array< KnotVector * > knotVectorsCompr
Comprehensive set of all KnotVectors, one for every edge.
Array2D< int > el_to_IJK
Map from element indices to IJK knot span indices.
void Get1DPatchNets(const Vector &coords, int vdim)
void GenerateBdrElementDofTable()
Call after GenerateElementDofTable to set boundary element DOF table.
Array< int > & GetMaster()
Array< int > f_spaceOffsets
void CheckPatches()
Throw an error if any patch has an inconsistent edge-to-knot mapping.
void MergeWeights(Mesh *mesh_array[], int num_pieces)
Set the weights in this object to values from active elements in num_pieces meshes in mesh_array.
int NumOfVertices
Global entity counts.
void Generate2DBdrElementDofTable()
void GetBdrPatchKnotVectors(int bp, Array< KnotVector * > &kv)
Return KnotVectors in kv in each dimension for boundary patch bp.
void ConnectBoundaries2D(int bnd0, int bnd1)
Array2D< int > bel_to_IJK
Array< NURBSPatch * > patches
Array of all patches in the mesh.
int GetNTotalDof() const
Return the total number of DOFs.
void SetPatchToElements()
Set patch_to_el.
int GetElementPatch(int elem) const
Returns the index of the patch containing element elem.
Array< int > & GetSlave()
void GetPatchNets(const Vector &coords, int vdim)
Set the B-NET on each patch using values from coords.
void ConnectBoundaries3D(int bnd0, int bnd1)
Array< int > edge_to_knot
Map from edge indices to KnotVector indices.
const Array< int > & GetMaster() const
void CountElements()
Count the global NumOfElements.
bool ConsistentKVSets()
Check if the comprehensive array of KnotVectors agrees with the unique set of KnotVectors,...
void KnotRemove(Array< Vector * > &kv, real_t tol=1.0e-12)
void LoadFE(int i, const FiniteElement *FE) const
Load element i into FE.
void GetElementLocalToGlobal(Array< int > &lelem_elem)
Get the local to global element index map lelem_elem.
void GenerateActiveBdrElems()
Determine activeBdrElem, NumOfActiveBdrElems.
Array< int > d_to_d
Periodic BC info:
int NumOfKnotVectors
Number of KnotVectors.
Vector weights
Weights for each control point or DOF.
void CreateComprehensiveKV()
Create the comprehensive set of KnotVectors. In 1D, this set is identical to the unique set of KnotVe...
void GetPatchDofs(const int patch, Array< int > &dofs)
Return the degrees of freedom in dofs on patch patch, in Cartesian order.
Array< int > bel_to_patch
Map from boundary element indices to patch indices.
void GetPatchKnotVectors(int p, Array< KnotVector * > &kv)
Return KnotVectors in kv in each dimension for patch p.
Table * GetBdrElementDofTable()
void PrintFunctions(const char *basename, int samples=11) const
Call KnotVector::PrintFunctions for all KnotVectors, using a separate, newly created ofstream with fi...
void Generate2DElementDofTable()
void Set1DSolutionVector(Vector &coords, int vdim)
void PrintCharacteristics(std::ostream &os) const
Print various mesh characteristics to the stream os.
int GetNDof() const
Return the number of active DOFs.
void KnotInsert(Array< KnotVector * > &kv)
Insert knots from kv into all KnotVectors in all patches. The size of kv should be the same as knotVe...
int GetOrder() const
If all KnotVector orders are identical, return that number. Otherwise, return NURBSFECollection::Vari...
NURBSExtension * GetCurlExtension(int component)
Array< int > e_meshOffsets
const Array< int > & GetOrders() const
Read-only access to the orders of all KnotVectors.
int GetActiveDof(int glob) const
Return the local DOF number for a given global DOF number glob.
int GetGNBE() const
Return the global number of boundary elements.
void ConnectBoundaries1D(int bnd0, int bnd1)
int GetNV() const
Return the local number of active vertices.
void ConvertToPatches(const Vector &Nodes)
Define patches in IKJ (B-net) format, using FE coordinates in Nodes.
void Generate1DBdrElementDofTable()
Generate the table of global DOFs for active boundary elements, and define bel_to_patch,...
void Get3DPatchNets(const Vector &coords, int vdim)
int Dimension() const
Return the dimension of the reference space (not physical space).
Array< int > f_meshOffsets
NURBSExtension * GetDivExtension(int component)
void Get3DBdrElementTopo(Array< Element * > &boundary) const
int mOrder
Order of KnotVectors, see GetOrder() for description.
void SetKnotsFromPatches()
Set KnotVectors from patches and construct mesh and space data.
Array< KnotVector * > knotVectors
Set of unique KnotVectors.
Array< int > p_spaceOffsets
void Generate1DElementDofTable()
Generate elem_to_global-dof table for the active elements, and define el_to_patch,...
void SetPatchToBdrElements()
Set patch_to_bel.
Array< int > v_spaceOffsets
Global space offsets, spaceOffsets == dofOffsets.
int GetNE() const
Return the number of active elements.
int GetPatchBdrAttribute(int i) const
Get the attribute for boundary patch element i, which is set to all boundary elements in the patch.
void DegreeElevate(int rel_degree, int degree=16)
Call DegreeElevate for all KnotVectors of all patches. For each KnotVector, the new degree is max(old...
const KnotVector * GetKnotVector(int i) const
KnotVector read-only access function.
void LoadSolution(std::istream &input, GridFunction &sol) const
Read a GridFunction sol from stream input, written patch-by-patch, e.g. with PrintSolution().
void ConnectBoundaries()
Set DOF maps for periodic BC.
void CheckBdrPatches()
Throw an error if any boundary patch has invalid KnotVector orientation.
NURBSExtension()
To be used by ParNURBSExtension constructor(s)
void Get1DBdrElementTopo(Array< Element * > &boundary) const
Generate the active mesh boundary elements and return them in boundary.
virtual ~NURBSExtension()
Destroy a NURBSExtension.
Array< int > e_spaceOffsets
void Get3DElementTopo(Array< Element * > &elements) const
Mapping for mesh vertices and NURBS space DOFs.
NURBSPatchMap(const NURBSExtension *ext)
Constructor for an object associated with NURBSExtension ext.
int nx() const
Return the number of elements in the first direction.
void SetPatchDofMap(int p, const KnotVector *kv[])
Set NURBS space DOF map for patch p with KnotVectors kv.
int nz() const
Return the number of elements in the third direction (3D).
int operator[](const int i) const
void SetBdrPatchDofMap(int bp, const KnotVector *kv[], int *okv)
Set NURBS space DOF map for boundary patch bp with KnotVectors kv.
void SetBdrPatchVertexMap(int bp, const KnotVector *kv[], int *okv)
Set mesh vertex map for boundary patch bp with KnotVectors kv.
int ny() const
Return the number of elements in the second direction (2D or 3D).
void SetPatchVertexMap(int p, const KnotVector *kv[])
Set mesh vertex map for patch p with KnotVectors kv.
int operator()(const int i) const
For 1D, return the vertex or DOF at index i.
A NURBS patch can be 1D, 2D, or 3D, and is defined as a tensor product of KnotVectors.
void UniformRefinement(int rf=2)
Refine with optional refinement factor rf. Uniform means refinement is done everywhere by the same fa...
int MakeUniformDegree(int degree=-1)
int GetNKV() const
Return the number of KnotVectors, which is the patch dimension.
friend NURBSPatch * Revolve3D(NURBSPatch &patch, real_t n[], real_t ang, int times)
real_t & operator()(int i, int l)
1D access function. i is a B-NET index, and l is a variable index.
void GetCoarseningFactors(Array< int > &f) const
Calls KnotVector::GetCoarseningFactor for each direction.
void Coarsen(int cf=2, real_t tol=1.0e-12)
Coarsen with optional coarsening factor cf which divides the number of elements in each dimension....
int KnotRemove(int dir, real_t knot, int ntimes=1, real_t tol=1.0e-12)
Remove knot with value knot from direction dir.
void Rotate2D(real_t angle)
Rotate the NURBSPatch, 2D case.
NURBSPatch & operator=(const NURBSPatch &)=delete
Copy assignment not supported.
int Dim
Physical dimension plus 1.
void Rotate3D(real_t normal[], real_t angle)
Rotate the NURBSPatch, 3D case.
void KnotInsert(int dir, const KnotVector &knot)
Insert any new knots from knot in direction dir. If the order of knot is higher than the current orde...
real_t & slice(int i, int j)
Access function for the effectively 1D flattened net, where i is a knot index, and j is an index of a...
static void Get3DRotationMatrix(real_t n[], real_t angle, real_t r, DenseMatrix &T)
Compute the 3D rotation matrix T for angle angle around axis n (a 3D vector, not necessarily normaliz...
void SwapDirections(int dir1, int dir2)
Swap data and KnotVectors in directions dir1 and dir2.
static void Get2DRotationMatrix(real_t angle, DenseMatrix &T)
Compute the 2D rotation matrix T for angle angle.
~NURBSPatch()
Deletes data and KnotVectors.
int SetLoopDirection(int dir)
Flattens the B-NET in direction dir, producing a 1D net. Returns the number of variables per knot in ...
KnotVector * GetKV(int dir)
int GetNC() const
Return the number of components stored in the NURBSPatch.
void Print(std::ostream &os) const
Writes KnotVectors and data to the stream os.
friend NURBSPatch * Interpolate(NURBSPatch &p1, NURBSPatch &p2)
Given two patches p1 and p2 of the same dimensions, create and return a new patch by merging their kn...
Array< KnotVector * > kv
KnotVectors in each direction.
void FlipDirection(int dir)
Reverse data and knots in direction dir.
void swap(NURBSPatch *np)
Deletes own data, takes data from np, and deletes np.
NURBSPatch(NURBSPatch *parent, int dir, int Order, int NCP)
Copy constructor.
void SetKnotVectorsCoarse(bool c)
Marks the KnotVector in each dimension as coarse.
void Rotate(real_t angle, real_t normal[]=NULL)
Rotate the NURBSPatch in 2D or 3D..
void DegreeElevate(int dir, int t)
Increase the order in direction dir by t >= 0.
real_t * data
Data with the layout (Dim x ni x nj x nk)
Parallel version of NURBSExtension.
int Size() const
Returns the size of the vector.
real_t u(const Vector &xvec)
void mfem_error(const char *msg)
std::function< real_t(const Vector &)> f(real_t mass_coeff)
real_t p(const Vector &x, real_t t)