Hi everyone,
I am working on adapting some abaqus jobs for deal.ii. In the abaqus
format, It is typical to specify boundary conditions in terms of (node
number, dof number, magnitude).
I have found a working approach for doing this, but I am looking to find a
more efficient way as I may end up with millions of nodes and thousands of
vertices. Here's an example of how I have been applying nodal displacement
BCs:
// define a "node" by the coordinates
const Point<dim> proot1(0., 0.0209, -0.0101);
// loop through all cells
for (const auto &cell : dof_handler.active_cell_iterators())
{
// loop through all of the vertices in a given cell
for (unsigned int v = 0; v<cell->n_vertices() ; v++)
{
// check if a vertex is near to the node.
if (cell->vertex(v).distance(proot1) < 0.001) //
{
// apply a constraint
constraints.add_line(cell->vertex_dof_index(v,0, cell->active_fe_index()
));
} } }
In an ideal world, I could compute the global dof number based on the node
number and local dof number. Something like:
global_dof = node_number * 3 + local_dof
constraints.add_line(global_dof)
However, I understand that this approach isn't implemented in deal.ii
because it would be useless after mesh refinement.
Is there a good way to find the global_dof numbers for a vertex/node?
If not, can I iterate through all of the vertices directly (rather than
going through the cell)? Something like:
for (const auto &vertex : dof_handler.vertex_iterators())
{
if (vertex.distance(proot1) < 0.001)
{
constraints.add_line(vertex->vertex_dof_index(0) );
}}
I'm interested on your thoughts on how to efficiently import nodal boundary
conditions from an external file. I couldn't find any other posts on this
specific topic, but I apologize if this is a duplicate.
Thanks,
Alex
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/7a0ff20d-7d25-4b2d-a094-5bccc1388a5fn%40googlegroups.com.