20 elem_marker = SBElementType::INSIDE;
36 if (vals(j) <= 0.) { count++; }
41 elem_marker[i] = SBElementType::OUTSIDE;
45 elem_marker[i] = SBElementType::CUT;
66 for (
int j = 0; j < nip; j++)
70 if (vals[j] <= 0.) { count++; }
75 elem_marker[i] = SBElementType::OUTSIDE;
79 elem_marker[i] = SBElementType::CUT;
103 int te1 = elem_marker[tr->
Elem1No], te2 = elem_marker[tr->
Elem2No];
108 sface_dof_list.
Append(dofs);
114 sface_dof_list.
Append(dofs);
117 te1 == SBElementType::CUT && te2 == SBElementType::OUTSIDE)
120 sface_dof_list.
Append(dofs);
123 te1 == SBElementType::OUTSIDE && te2 == SBElementType::CUT)
126 sface_dof_list.
Append(dofs);
139 if (elem_marker[tr->
Elem1No] == SBElementType::CUT)
142 sface_dof_list.
Append(dofs);
155 int te1 = elem_marker[ne1];
164 sface_dof_list.
Append(dofs);
167 te2 == SBElementType::OUTSIDE && te1 == SBElementType::CUT)
170 sface_dof_list.
Append(dofs);
187 int pmesh_bdr_attr_max = 0;
193 bool sbm_at_true_boundary =
false;
201 if (elem_marker[tr->
Elem1No] == SBElementType::CUT)
204 sbm_at_true_boundary =
true;
209 bool sbm_at_true_boundary_global =
false;
210 MPI_Allreduce(&sbm_at_true_boundary, &sbm_at_true_boundary_global, 1,
211 MPI_C_BOOL, MPI_LOR, MPI_COMM_WORLD);
212 if (sbm_at_true_boundary_global)
219 ess_shift_bdr.
SetSize(ess_bdr.Size());
222 for (
int i = 0; i < ess_bdr.Size(); i++)
224 ess_shift_bdr[i] = 1 - ess_bdr[i];
237 (elem_marker[e] == SBElementType::OUTSIDE ||
238 elem_marker[e] == SBElementType::CUT))
241 for (
int i = 0; i < dofs.Size(); i++)
243 ess_vdofs[dofs[i]] = -1;
247 elem_marker[e] == SBElementType::OUTSIDE)
250 for (
int i = 0; i < dofs.Size(); i++)
252 ess_vdofs[dofs[i]] = -1;
258 for (
int i = 0; i < ess_vdofs.
Size(); i++)
260 if (ess_vdofs_bdr[i] == -1) { ess_vdofs[i] = -1; }
264 for (
int i = 0; i < sface_dof_list.
Size(); i++)
266 if (ess_vdofs_bdr[sface_dof_list[i]] != -1)
268 ess_vdofs[sface_dof_list[i]] = 0;
273 for (
int i = 0; i < ess_vdofs.
Size() ; i++) { ess_vdofs[i] += 1; }
275 for (
int i = 0; i < ess_vdofs.
Size() ; i++) { ess_vdofs[i] -= 1; }
296 if (elem_marker[i] == SBElementType::OUTSIDE)
305 for (
int j = 0; j < marker_gf.
Size(); j++)
307 if (marker_gf(j) > 0.1 && marker_gf(j) < 0.9)
322 if (elem_marker[tr->
Elem1No] == SBElementType::CUT)
325 sface_dof_list.
Append(dofs);
int GetNPoints() const
Returns the number of the points in the integration rule.
int Size() const
Return the logical size of the array.
Class for an integration rule - an Array of IntegrationPoint.
const IntegrationRule & Get(int GeomType, int Order)
Returns an integration rule for given GeomType and Order.
IntegrationRules IntRulesLo(0, Quadrature1D::GaussLobatto)
virtual void GetEssentialVDofs(const Array< int > &bdr_attr_is_ess, Array< int > &ess_dofs, int component=-1) const
Determine the boundary degrees of freedom.
void SetSize(int s)
Resize the vector to size s.
int GetNBE() const
Returns number of boundary elements.
void GetElementVDofs(int i, Array< int > &vdofs) const
Returns indexes of degrees of freedom in array dofs for i'th element.
void BooleanMult(const Array< int > &x, Array< int > &y) const
y = A * x, treating all entries as booleans (zero=false, nonzero=true).
ParFiniteElementSpace & pfes_sltn
int GetNSharedFaces() const
Return the number of shared faces (3D), edges (2D), vertices (1D)
Coefficient defined by a GridFunction. This coefficient is mesh dependent.
Container class for integration rules.
int Size() const
Returns the size of the vector.
int GetNE() const
Returns number of elements.
virtual double GetValue(int i, const IntegrationPoint &ip, int vdim=1) const
virtual void ProjectDiscCoefficient(VectorCoefficient &coeff)
Project a discontinuous vector coefficient as a grid function on a continuous finite element space...
void MarkElements(Array< int > &elem_marker) const
Mark all the elements in the mesh using the SBElementType.
Abstract parallel finite element space.
void Synchronize(Array< int > &ldof_marker) const
Given an integer array on the local degrees of freedom, perform a bitwise OR between the shared dofs...
virtual void SetAttributes()
FaceElementTransformations * GetInteriorFaceTransformations(int FaceNo)
Geometry::Type GetElementBaseGeometry(int i) const
void DeleteAll()
Delete the whole array.
static void MarkerToList(const Array< int > &marker, Array< int > &list)
Convert a Boolean marker array to a list containing all marked indices.
int GetNumFaces() const
Return the number of faces (3D), edges (2D) or vertices (1D).
IntegrationPoint & IntPoint(int i)
Returns a reference to the i-th integration point.
double f(const Vector &xvec)
int Append(const T &el)
Append element 'el' to array, resize if necessary.
int GetSharedFace(int sface) const
Return the local face index for the given shared face.
void ListShiftedFaceDofs(const Array< int > &elem_marker, Array< int > &sface_dof_list) const
FaceElementTransformations * GetSharedFaceTransformations(int sf, bool fill2=true)
void ListEssentialTDofs(const Array< int > &elem_marker, const Array< int > &sface_dof_list, Array< int > &ess_tdof_list, Array< int > &ess_shift_bdr) const
T Max() const
Find the maximal element in the array, using the comparison operator < for class T.
void GetValues(int i, const IntegrationRule &ir, Vector &vals, int vdim=1) const
FaceElementTransformations * GetBdrFaceTransformations(int BdrElemNo)
void ListShiftedFaceDofs2(const Array< int > &elem_marker, Array< int > &sface_dof_list) const
Array< int > bdr_attributes
A list of all unique boundary attributes used by the Mesh.
void SetSize(int nsize)
Change the logical size of the array, keep existing entries.
void SetBdrAttribute(int i, int attr)
Set the attribute of boundary element i.
void GetFaceNbrElementTransformation(int i, IsoparametricTransformation *ElTr)
Class for integration point with weight.
void GetElementTransformation(int i, IsoparametricTransformation *ElTr)
virtual const SparseMatrix * GetRestrictionMatrix() const
Get the R matrix which restricts a local dof vector to true dof vector.
virtual int GetFaceDofs(int i, Array< int > &dofs, int variant=0) const
const bool func_dof_marking
int GetBdrFace(int BdrElemNo) const
Return the local face index for the given boundary face.
ParGridFunction & ls_func
Class for parallel grid function.
Arbitrary order "L2-conforming" discontinuous finite elements.