From: Andrea H. <and...@gm...> - 2010-05-27 22:04:22
|
Hello- I'm attempting to implement some periodic boundary conditions. I'm just wanting to work with a square QUAD mesh. In looking at past posts it looks like the following should work (when placed before the equation_systems:init()): PeriodicBoundary pbc; pbc.myboundary = inflow_ID; pbc.pairedboundary = outflow_ID; RealVectorValue boundary_translation(channel_length,0.,0.); pbc.translation_vector = boundary_translation; dof_map.add_periodic_boundary(pbc); I'm wondering though, does the inflow_ID and ouflow_ID correspond to the same numbers as the edges of an element are numbered? i.e. 0 for the bottom, 1 for the right side, 2 for the top, and 3 for the left side? So, should something like: PeriodicBoundary pbc1; pbc1.myboundary = 0; pbc1.pairedboundary = 2; RealVectorValue boundary_translation1(0.,ymax-ymin,0.); pbc1.translation_vector = boundary_translation1; PeriodicBoundary pbc2; pbc2.myboundary = 1; pbc2.pairedboundary = 3; RealVectorValue boundary_translation2(xmax-xmin,0.,0.); pbc1.translation_vector = boundary_translation2; system.get_dof_map().add_periodic_boundary(pbc1); system.get_dof_map().add_periodic_boundary(pbc2); work for setting periodic boundary conditions for the top and bottom and then the sides? Or are these id's corresponding to something that would be inherent to the mesh? I've tried the code above and get the following error: Assertion `!_b' failed. [0] /h1/ahawkins/LIBRARIES/LIBMESH/libmesh-r3801/include/parallel/threads.h, line 64, compiled Apr 29 2010 at 12:08:34 terminate called after throwing an instance of 'libMesh::LogicError' what(): Error in libMesh internal logic where the traceback is: Stack frames: 10 0: print_trace(std::ostream&) 1: _ZN7Threads11BoolAcquireC9ERb 2: Threads::BoolAcquire::BoolAcquire(bool&) 3: void Threads::parallel_reduce<StoredRange<MeshBase::const_node_iterator, Node const*>, (anonymous namespace)::FindBBox>(StoredRange<MeshBase::const_node_iterator, Node const*> const&, (anonymous namespace)::FindBBox&) 4: MeshTools::bounding_box(MeshBase const&) 5: PointLocatorTree::init(Trees::BuildType) 6: _ZN16PointLocatorTreeC9ERK8MeshBasePK16PointLocatorBase 7: PointLocatorTree::PointLocatorTree(MeshBase const&, PointLocatorBase const*) 8: PointLocatorBase::build(MeshEnums::PointLocatorType, MeshBase const&, PointLocatorBase const*) 9: MeshBase::point_locator() const Thanks in advance! Andrea |