43 UpdateMesh( MeshBase
const* m )
47 template<
typename ElementType>
48 void operator()( ElementType& element )
const
50 element.setMesh( M_mesh );
53 MeshBase
const* M_mesh;
59 OnBoundary(
bool is_on_bdy =
false )
63 template<
typename ElementType>
64 void operator()( ElementType& element )
const
66 element.setOnBoundary( M_bdy );
73 struct ApplyDisplacement
75 ApplyDisplacement( uint16_type l, ublas::vector<double>
const& displ )
80 template<
typename ElementType>
81 void operator()( ElementType& elt )
83 elt.applyDisplacement( M_l, M_displ );
86 ublas::vector<double>
const& M_displ;
90 template<
typename FaceType>
93 UpdateFace( FaceType
const& face )
97 template<
typename ElementType>
98 void operator()( ElementType& element )
const
100 if ( M_face.ad_first() == element.id() )
102 element.setFace( M_face.pos_first(), M_face );
104 if ( M_face.isConnectedTo1() )
105 element.setNeighbor( M_face.pos_first(), M_face.ad_second(), M_face.proc_second() );
107 FEELPP_ASSERT( element.facePtr( M_face.pos_first() ) )
108 ( M_face.pos_first() )
109 ( M_face.ad_first() ).error(
"invalid face" );
112 else if ( M_face.ad_second() == element.id() )
114 element.setFace( M_face.pos_second(), M_face );
115 element.setNeighbor( M_face.pos_second(), M_face.ad_first(), M_face.proc_first() );
116 FEELPP_ASSERT( element.facePtr( M_face.pos_second() ) )
117 ( M_face.pos_second() )
118 ( M_face.ad_second() ).error(
"invalid face" );
124 ( M_face.ad_first() )( M_face.pos_first() )
125 ( M_face.ad_second() )( M_face.pos_second() )
126 ( element.id() ).error(
"invalid face " );
130 FaceType
const& M_face;
134 template<
typename PermutationType>
135 struct UpdateFacePermutation
137 UpdateFacePermutation( uint16_type j, PermutationType
const& perm )
142 template<
typename ElementType>
143 void operator()( ElementType& element )
const
145 element.setFacePermutation( M_localfaceid, M_perm );
148 uint16_type M_localfaceid;
149 PermutationType
const& M_perm;
153 template<
typename ConnectionType>
154 struct UpdateFaceConnection0
156 UpdateFaceConnection0( ConnectionType
const& conn )
160 template<
typename FaceType>
161 void operator()( FaceType& element )
const
163 element.setConnection0( M_conn );
166 ConnectionType
const& M_conn;
169 template<
typename ConnectionType>
170 struct UpdateFaceConnection1
172 UpdateFaceConnection1( ConnectionType
const& conn )
176 template<
typename FaceType>
177 void operator()( FaceType& element )
const
180 element.setConnection1( M_conn );
182 if ( ( element.element0().marker() == element.element1().marker() ) &&
183 element.marker().value() == 0 )
184 element.setMarker( element.element0().marker().value() );
187 ConnectionType
const& M_conn;
191 struct UpdateFaceOnBoundary
193 UpdateFaceOnBoundary(
bool onbdy )
197 template<
typename FaceType>
198 void operator()( FaceType& element )
const
200 element.setOnBoundary( M_onbdy );
207 template<
typename EdgeType>
210 UpdateEdge( uint16_type j, EdgeType
const& edge )
215 template<
typename ElementType>
216 void operator()( ElementType& element )
const
218 element.setEdge( M_localedgeid, M_edge );
221 uint16_type M_localedgeid;
222 EdgeType
const& M_edge;
226 template<
typename PermutationType>
227 struct UpdateEdgePermutation
229 UpdateEdgePermutation( uint16_type j, PermutationType
const& perm )
234 template<
typename ElementType>
235 void operator()( ElementType& element )
const
237 element.setEdgePermutation( M_localedgeid, M_perm );
240 uint16_type M_localedgeid;
241 PermutationType
const& M_perm;
245 struct updateIdInOthersPartitions
247 updateIdInOthersPartitions( uint16_type pid,
size_type id )
252 template<
typename ElementType>
253 void operator()( ElementType& element )
255 element.setIdInOthersPartitions( M_pid, M_id );
262 struct UpdateProcessId
264 UpdateProcessId(
int pid )
268 template<
typename ElementType>
269 void operator()( ElementType& element )
271 element.setProcessId( M_pid );
279 UpdateMarker( flag_type v )
284 template<
typename ElementType>
285 void operator()( ElementType& element )
287 element.setMarker( M_v );
size_t size_type
Indices (starting from 0)
Definition: feelcore/feel.hpp:319