32 if (SubMeshUtils::GetRootParent<SubMesh, Mesh>(*src_sm) !=
33 SubMeshUtils::GetRootParent<SubMesh, Mesh>(*dst_sm))
35 MFEM_ABORT(
"Can't find a relation between the two GridFunctions");
41 const_cast<Mesh *
>(SubMeshUtils::GetRootParent<SubMesh, Mesh>
86 MFEM_ABORT(
"Trying to do a transfer between GridFunctions but none of them is defined on a SubMesh");
96 for (
int i = 0; i < sub1_to_parent_map_.
Size(); i++)
98 dst(i) = src(sub1_to_parent_map_[i]);
108 for (
int i = 0; i < sub1_to_parent_map_.
Size(); i++)
110 dst(sub1_to_parent_map_[i]) = src(i);
121 for (
int i = 0; i < sub2_to_parent_map_.
Size(); i++)
123 z_(sub2_to_parent_map_[i]) = dst(i);
126 for (
int i = 0; i < sub1_to_parent_map_.
Size(); i++)
128 z_(sub1_to_parent_map_[i]) = src(i);
131 for (
int i = 0; i < sub2_to_parent_map_.
Size(); i++)
133 dst(i) = z_(sub2_to_parent_map_[i]);
138 MFEM_ABORT(
"unknown TransferCategory: " << category_);
int Size() const
Return the logical size of the array.
int GetVSize() const
Return the number of vector dofs, i.e. GetNDofs() x GetVDim().
void BuildVdofToVdofMap(const FiniteElementSpace &subfes, const FiniteElementSpace &parentfes, const SubMesh::From &from, const Array< int > &parent_element_ids, Array< int > &vdof_to_vdof_map)
Build the vdof to vdof mapping between two FiniteElementSpace objects.
Class for grid function - Vector with associated FE space.
const Array< int > & GetParentElementIDMap() const
Get the parent element id map.
void SetSize(int s)
Resize the vector to size s.
void Transfer(const GridFunction &src, GridFunction &dst) const
Transfer the source GridFunction to the destination GridFunction.
Mesh * GetMesh() const
Returns the mesh.
static bool IsSubMesh(const Mesh *m)
Check if Mesh m is a SubMesh.
FiniteElementSpace * FESpace()
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
From GetFrom() const
Get the From indicator.
Subdomain representation of a topological parent in another Mesh.
TransferMap(const GridFunction &src, const GridFunction &dst)
Construct a new TransferMap object which transfers degrees of freedom from the source GridFunction to...