38 virtual void addRemote(MeshEntity* e,
int p, MeshEntity* r) = 0;
42 virtual void addGhost(MeshEntity* e,
int p, MeshEntity* r) = 0;
43 virtual void deleteGhost(MeshEntity* e) = 0;
51 virtual void increment(MeshIterator* it) = 0;
53 virtual bool isDone(MeshIterator* it) = 0;
57 virtual MeshEntity*
deref(MeshIterator* it) = 0;
74 virtual MeshEntity*
createVert_(ModelEntity* c) = 0;
84 MeshEntity** down) = 0;
91 MeshEntity*
createEntity(
int type, ModelEntity* c, MeshEntity** down)
97 virtual void destroy_(MeshEntity* e) = 0;
109 virtual void addMatch(MeshEntity* e,
int peer, MeshEntity* match) = 0;
113 virtual void clear_() = 0;
127 void migrate(Mesh2* m, Migration* plan);
129 void migrateSilent(Mesh2* m, Migration* plan);
145 void displaceMesh(Mesh2* m, Field* d,
double factor=1.0);
152 virtual void call(MeshEntity* e) = 0;
200 void packDataClone(
Mesh2* m,
int to);
201 void unpackDataClone(
Mesh2* m);
204 typedef std::vector<MeshEntity*> EntityVector;
205 void packParts(
int to,
Parts& parts);
206 void unpackParts(
Parts& parts);
209 EntityVector senders[4]);
212 EntityVector affected[4],
213 EntityVector senders[4]);
214 void deleteOldEntities(
216 EntityVector affected[4]);
217 void reduceMatchingToSenders(
219 EntityVector senders[4]);
220 void getSenders(
Mesh2* m,EntityVector affected[4],EntityVector senders[4]);
224 void packEntity(
Mesh2* m,
int to, MeshEntity* e, DynamicArray<MeshTag*>& tags,
bool ghosting=
false);
225 void unpackRemotes(
Mesh2* m, MeshEntity* e);
226 void unpackTags(
Mesh2* m, MeshEntity* e, DynamicArray<MeshTag*>& tags);
227 void unpackCommon(
Mesh2* m, MeshEntity*& sender, ModelEntity*& c,
Parts& residence);
228 MeshEntity* unpackVertex(
Mesh2* m, ModelEntity* c);
229 MeshEntity* unpackNonVertex(
Mesh2* m,
int type, ModelEntity* c);
void unfreezeFields(Mesh *m)
unfreeze all associated fields
std::map< int, MeshEntity * > Copies
Remote copy container.
virtual void addGhost(MeshEntity *e, int p, MeshEntity *r)=0
Add just one ghost copy to an entity.
virtual void destroy_(MeshEntity *e)=0
Underlying implementation of apf::Mesh2::destroy.
MeshEntity * buildElement(Mesh2 *m, ModelEntity *c, int type, MeshEntity **verts, BuildCallback *cb=0)
build an entity from its vertices
virtual void setModelEntity(MeshEntity *e, ModelEntity *c)=0
Change the geometric classification of an entity.
MeshEntity * createVertex(ModelEntity *c, Vector3 const &point, Vector3 const ¶m)
Create a fully-specified vertex.
User-defined entity creation callback.
bool hasFrozenFields
true if any associated fields use array storage
virtual MeshEntity * createVert_(ModelEntity *c)=0
Underlying implementation of apf::Mesh2::createVert.
void migrate(Mesh2 *m, Migration *plan)
APF's migration function, works on apf::Mesh2.
virtual MeshEntity * createEntity_(int type, ModelEntity *c, MeshEntity **down)=0
Underlying implementation of apf::Mesh2::createEntity.
MeshEntity * createEntity(int type, ModelEntity *c, MeshEntity **down)
Create a non-vertex mesh entity.
virtual void setParam(MeshEntity *e, Vector3 const &p)=0
Set the geometric parametric coordinates for a vertex.
virtual void clearMatches(MeshEntity *e)=0
Remove all matched copies of an entity.
MeshEntity * createVert(ModelEntity *c)
Just create a vertex.
virtual void increment(MeshIterator *it)=0
Just increment an iterator.
virtual void setResidence(MeshEntity *e, Parts &residence)=0
Set the resident part set of an entity.
MeshEntity * buildOneElement(Mesh2 *m, ModelEntity *c, int type, Vector3 const *points)
build a one-element mesh
virtual void addMatch(MeshEntity *e, int peer, MeshEntity *match)=0
Add a matched copy to an entity.
void clear(Mesh2 *m)
removes all entities and fields.
virtual void clear_()=0
Remove all entities.
void displaceMesh(Mesh2 *m, Field *d, double factor=1.0)
add a field (times a factor) to the mesh coordinates
Interface to a mesh part.
void stitchMesh(Mesh2 *m)
infer all remote copies from those of vertices
void initResidence(Mesh2 *m, int dim)
Set entity residence based on remote copies.
void setMigrationLimit(size_t maxElements)
set the maximum elements that apf::migrate moves at once
void setPoint(MeshEntity *e, int node, Vector3 const &p)
Set the spacial coordinates of a mesh node.
void destroy(MeshEntity *e)
Destroy a mesh entity.
convenience wrapper over apf::Vector<3>
virtual MeshEntity * deref(MeshIterator *it)=0
Just dereference an iterator without incrementing it.
virtual void setPoint_(MeshEntity *e, int node, Vector3 const &p)=0
Underlying implementation of apf::Mesh2::setPoint.
virtual void addRemote(MeshEntity *e, int p, MeshEntity *r)=0
Add just one remote copy to an entity.
std::set< int > Parts
Set of unique part ids.
Extended mesh interface for modification.
void requireUnfrozen()
require that no fields are stored in arrays
MeshEntity * makeOrFind(Mesh2 *m, ModelEntity *c, int type, MeshEntity **down, BuildCallback *cb=0, bool *p_made=0)
like apf::Mesh2::createEntity, but returns already existing entities
virtual void setRemotes(MeshEntity *e, Copies &remotes)=0
Set the remote copies of an entity.
virtual bool isDone(MeshIterator *it)=0
Return true iff the iterator points past the end.
virtual void call(MeshEntity *e)=0
will be called after an entity is created
virtual void acceptChanges()=0
Implementation-defined synchronization after modification.