38 virtual void addRemote(MeshEntity* e,
int p, MeshEntity* r) = 0;
44 virtual void addGhost(MeshEntity* e,
int p, MeshEntity* r) = 0;
45 virtual void deleteGhost(MeshEntity* e) = 0;
55 virtual bool isDone(MeshIterator* it) = 0;
59 virtual MeshEntity*
deref(MeshIterator* it) = 0;
86 MeshEntity** down) = 0;
93 MeshEntity*
createEntity(
int type, ModelEntity* c, MeshEntity** down)
111 virtual void addMatch(MeshEntity* e,
int peer, MeshEntity* match) = 0;
154 virtual void call(MeshEntity* e) = 0;
203 void unpackDataClone(
Mesh2* m);
206 typedef std::vector<MeshEntity*> EntityVector;
211 EntityVector senders[4]);
214 EntityVector affected[4],
215 EntityVector senders[4]);
216 void deleteOldEntities(
218 EntityVector affected[4]);
219 void reduceMatchingToSenders(
221 EntityVector senders[4]);
222 void getSenders(
Mesh2* m,EntityVector affected[4],EntityVector senders[4]);
226 void packEntity(
Mesh2* m,
int to, MeshEntity* e, DynamicArray<MeshTag*>& tags,
bool ghosting=
false);
227 void unpackRemotes(
Mesh2* m, MeshEntity* e);
228 void unpackTags(
Mesh2* m, MeshEntity* e, DynamicArray<MeshTag*>& tags);
229 void unpackCommon(
Mesh2* m, MeshEntity*& sender, ModelEntity*& c,
Parts& residence);
230 MeshEntity* unpackVertex(
Mesh2* m, ModelEntity* c);
231 MeshEntity* unpackNonVertex(
Mesh2* m,
int type, ModelEntity* c);
User-defined entity creation callback.
virtual void call(MeshEntity *e)=0
will be called after an entity is created
Extended mesh interface for modification.
virtual MeshEntity * deref(MeshIterator *it)=0
Just dereference an iterator without incrementing it.
void destroy(MeshEntity *e)
Destroy a mesh entity.
virtual MeshEntity * createVert_(ModelEntity *c)=0
Underlying implementation of apf::Mesh2::createVert.
virtual void clearRemotes(MeshEntity *e)=0
Remove remote copies.
virtual void clearMatches(MeshEntity *e)=0
Remove all matched copies of an entity.
virtual void setModelEntity(MeshEntity *e, ModelEntity *c)=0
Change the geometric classification of an entity.
void setPoint(MeshEntity *e, int node, Vector3 const &p)
Set the spacial coordinates of a mesh node.
virtual void setRemotes(MeshEntity *e, Copies &remotes)=0
Set the remote copies of an entity.
virtual void clear_()=0
Remove all entities.
virtual bool isDone(MeshIterator *it)=0
Return true iff the iterator points past the end.
virtual void acceptChanges()=0
Implementation-defined synchronization after modification.
void requireUnfrozen()
require that no fields are stored in arrays
virtual void destroy_(MeshEntity *e)=0
Underlying implementation of apf::Mesh2::destroy.
virtual void addMatch(MeshEntity *e, int peer, MeshEntity *match)=0
Add a matched copy to an entity.
virtual void increment(MeshIterator *it)=0
Just increment an iterator.
virtual void setParam(MeshEntity *e, Vector3 const &p)=0
Set the geometric parametric coordinates for a vertex.
virtual void setResidence(MeshEntity *e, Parts &residence)=0
Set the resident part set of an entity.
virtual void addRemote(MeshEntity *e, int p, MeshEntity *r)=0
Add just one remote copy to an entity.
virtual void addGhost(MeshEntity *e, int p, MeshEntity *r)=0
Add just one ghost copy to an entity.
MeshEntity * createVertex(ModelEntity *c, Vector3 const &point, Vector3 const ¶m)
Create a fully-specified vertex.
MeshEntity * createEntity(int type, ModelEntity *c, MeshEntity **down)
Create a non-vertex mesh entity.
virtual void setPoint_(MeshEntity *e, int node, Vector3 const &p)=0
Underlying implementation of apf::Mesh2::setPoint.
MeshEntity * createVert(ModelEntity *c)
Just create a vertex.
virtual MeshEntity * createEntity_(int type, ModelEntity *c, MeshEntity **down)=0
Underlying implementation of apf::Mesh2::createEntity.
Interface to a mesh part.
bool hasFrozenFields
true if any associated fields use array storage
Migration plan object: local elements to destinations.
convenience wrapper over apf::Vector<3>
The Parallel Contrul Unit class encapsulates parallel communication.
All APF symbols are contained in this namespace.
void setMigrationLimit(size_t maxElements, pcu::PCU *PCUObj)
set the maximum elements that apf::migrate moves at once
std::set< int > Parts
Set of unique part ids.
std::map< int, MeshEntity * > Copies
Remote copy container.
void unfreezeFields(Mesh *m)
unfreeze all associated fields
void stitchMesh(Mesh2 *m)
infer all remote copies from those of vertices
void displaceMesh(Mesh2 *m, Field *d, double factor=1.0)
add a field (times a factor) to the mesh coordinates
MeshEntity * buildOneElement(Mesh2 *m, ModelEntity *c, int type, Vector3 const *points)
build a one-element mesh
void migrate(Mesh2 *m, Migration *plan)
APF's migration function, works on apf::Mesh2.
void clear(Mesh2 *m)
removes all entities and fields.
MeshEntity * buildElement(Mesh2 *m, ModelEntity *c, int type, MeshEntity **verts, BuildCallback *cb=0)
build an entity from its vertices
void initResidence(Mesh2 *m, int dim)
Set entity residence based on remote copies.
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