On Jun 8, 2022, at 9:36 AM, Wells, David <drw...@email.unc.edu> wrote:Hi Wanda,This requires a couple of steps since we need to pull stuff out of some internal IBAMR objects.The system name we use for the position is FEMechanicsBase::COORDS_SYSTEM_NAME, so you can doauto &X_system = equation_systems.get_system<libMesh::System>(FEMechanicsBase::COORDS_SYSTEM_NAME);NumericVector<double> &positions = *X_system.solution;to get the vector containing the present nodal coordinates (not displacements) out. You can then get the position of each node viaconst unsigned int X_sys_num = X_system.number();auto it = mesh.local_nodes_begin();const auto end_it = mesh.local_nodes_end();for (; it != end_it; ++it){libMesh::Node* n = *it;{libMesh::Point X;for (unsigned int d = 0; d < NDIM; ++d){X(d) = positions[n->dof_number(X_sys_num, d, 0)];}}}Let me know if this works!
Best,DavidFrom: ibamr...@googlegroups.com <ibamr...@googlegroups.com> on behalf of Wanda Strychalski <wi...@case.edu>
Sent: Tuesday, June 7, 2022 2:44 PM
To: IBAMR Users <ibamr...@googlegroups.com>
Subject: [ibamr-users] Accessing IBFE Mesh Points--Hello,
I would like to access the points on the boundary of an IBFE mesh (created using libmesh) at each time point. My goal is to compute the smallest distance from an IBFE mesh to an IBAMR structure. I wanted to create a curve file that stores this distance over time. I saw the nice document by Aaron on how to access IB points, but I don’t see anything for IBFE data.
Thank you,
Wanda
--
You received this message because you are subscribed to the Google Groups "IBAMR Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ibamr-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ibamr-users/DF01CB39-3146-49B4-81D4-C3E20EBB3732%40case.edu.
You received this message because you are subscribed to the Google Groups "IBAMR Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ibamr-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ibamr-users/MN2PR03MB4879CF6564A9D57AB3B130ECEDA49%40MN2PR03MB4879.namprd03.prod.outlook.com.
On Jun 16, 2022, at 11:15 AM, Wells, David <drw...@email.unc.edu> wrote:
Hi Wanda,
Best,David
From: ibamr...@googlegroups.com <ibamr...@googlegroups.com> on behalf of Wanda Strychalski <wi...@case.edu>
Sent: Tuesday, June 14, 2022 5:33 PM
To: IBAMR Users <ibamr...@googlegroups.com>
Subject: Re: [ibamr-users] Accessing IBFE Mesh Points
These are the error messages (file attached):
main.C: In function ‘int main(int, char**)’:
main.C:501:45: error: request for member ‘get_system’ in ‘mesh_equation_systems’, which is of pointer type ‘libMesh::EquationSystems*’ (maybe you meant to use ‘->’ ?)
auto &X_system = mesh_equation_systems.get_system<libMesh::System>(FEMechanicsBase::COORDS_SYSTEM_NAME);
^~~~~~~~~~
main.C:501:71: error: expected primary-expression before ‘>’ token
auto &X_system = mesh_equation_systems.get_system<libMesh::System>(FEMechanicsBase::COORDS_SYSTEM_NAME);
Thanks,
Wanda
On Jun 8, 2022, at 9:36 AM, Wells, David <drw...@email.unc.edu> wrote:
Hi Wanda,
This requires a couple of steps since we need to pull stuff out of some internal IBAMR objects.
The system name we use for the position is FEMechanicsBase::COORDS_SYSTEM_NAME, so you can do
auto &X_system = equation_systems.get_system<libMesh::System>(FEMechanicsBase::COORDS_SYSTEM_NAME);NumericVector<double> &positions = *X_system.solution;
to get the vector containing the present nodal coordinates (not displacements) out. You can then get the position of each node via
const unsigned int X_sys_num = X_system.number();
auto it = mesh.local_nodes_begin();const auto end_it = mesh.local_nodes_end();for (; it != end_it; ++it){libMesh::Node* n = *it;{
libMesh::Point X;for (unsigned int d = 0; d < NDIM; ++d){
X(d) = positions[n->dof_number(X_sys_num, d, 0)];
}
}}
--
You received this message because you are subscribed to a topic in the Google Groups "IBAMR Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ibamr-users/VoYc0dvrfAE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ibamr-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ibamr-users/MN2PR03MB4879D8762E991C84953BCA17EDAC9%40MN2PR03MB4879.namprd03.prod.outlook.com.
--
You received this message because you are subscribed to a topic in the Google Groups "IBAMR Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ibamr-users/VoYc0dvrfAE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ibamr-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ibamr-users/5871c124-7ee3-47ed-a831-a00bc4a7b44dn%40googlegroups.com.