47 if (outfile) doc=
true;
61 vector_of_boundary_element_pt.resize(nbound);
71 for (
unsigned e=0;
e<nel;
e++)
76 if (doc) outfile <<
"Element: " <<
e <<
" " << fe_pt << std::endl;
86 for (
unsigned i0=0;i0<nnode_1d;i0++)
88 for (
unsigned i1=0;i1<nnode_1d;i1++)
91 unsigned j=i0+i1*nnode_1d;
95 std::set<unsigned>* boundaries_pt=0;
103 for (std::set<unsigned>::iterator it=boundaries_pt->begin();
104 it != boundaries_pt->end();++it)
111 std::find(vector_of_boundary_element_pt[*it].begin(),
112 vector_of_boundary_element_pt[*it].end(),
115 if(b_el_it == vector_of_boundary_element_pt[*it].end())
117 vector_of_boundary_element_pt[*it].push_back(fe_pt);
129 if (boundary_identifier(*it,fe_pt)==0)
135 if (((i0==0)||(i0==nnode_1d-1))&&((i1==0)||(i1==nnode_1d-1)))
138 (*boundary_identifier(*it,fe_pt)).
139 push_back(1*(2*i0/(nnode_1d-1)-1));
142 (*boundary_identifier(*it,fe_pt)).
143 push_back(2*(2*i1/(nnode_1d-1)-1));
174 for (
unsigned i=0;
i<nbound;
i++)
187 for (IT it=vector_of_boundary_element_pt[
i].begin();
188 it!=vector_of_boundary_element_pt[
i].end();
195 std::map<int,unsigned> count;
198 for (
unsigned ii=0;ii<2;ii++)
201 for (
int sign=-1;sign<3;sign+=2)
203 count[(ii+1)*sign]=0;
208 unsigned n_indicators=(*boundary_identifier(
i,fe_pt)).size();
209 for (
unsigned j=0;j<n_indicators;j++)
211 count[(*boundary_identifier(
i,fe_pt))[j] ]++;
213 delete boundary_identifier(
i,fe_pt);
224 for (
unsigned ii=0;ii<2;ii++)
227 for (
int sign=-1;sign<3;sign+=2)
232 if (count[(ii+1)*sign]==2)
250 indicator=(ii+1)*sign;
318 for (
unsigned i=0;
i<nbound;
i++)
321 outfile <<
"Boundary: " <<
i 322 <<
" is adjacent to " << nel
323 <<
" elements" << std::endl;
326 for (
unsigned e=0;
e<nel;
e++)
329 outfile <<
"Boundary element:" << fe_pt
330 <<
" Face index on boundary is "
A general Finite Element class.
bool Lookup_for_elements_next_boundary_is_setup
unsigned long nelement() const
Return number of elements in the mesh.
virtual void get_boundaries_pt(std::set< unsigned > *&boundaries_pt)
Return a pointer to set of mesh boundaries that this node occupies; this will be overloaded by Bounda...
Vector< Vector< int > > Face_index_at_boundary
For the e-th finite element on boundary b, this is the index of the face that lies along that boundar...
unsigned nboundary() const
Return number of boundaries.
void setup_boundary_element_info()
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Vector< Vector< FiniteElement * > > Boundary_element_pt
Vector of Vector of pointers to elements on the boundaries: Boundary_element_pt(b,e)
FiniteElement * finite_element_pt(const unsigned &e) const
Upcast (downcast?) to FiniteElement (needed to access FiniteElement member functions).
unsigned dim() const
Return the spatial dimension of the element, i.e. the number of local coordinates required to paramet...
virtual unsigned nnode_1d() const
Return the number of nodes along one edge of the element Default is to return zero — must be overloa...