Correct number of Dof
******************* This email originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address. ******************* Hello community, how are you doing? I have a question about the FieldConvert module "dof". I suspect that the code counts the total number of modes, but not the real total number of degrees of freedom. For instance, it does not differentiate Ndof between DG and CG nor consider the effects of boundary conditions. Is there another way of computing the real Ndof or a workaround? The script that I checked it ProcessDOF.cpp: " ... void ProcessDOF::v_Process(po::variables_map &vm) { m_f->SetUpExp(vm); int nDOF = m_f->m_exp[0]->GetNcoeffs(); m_f->m_comm->GetSpaceComm()->AllReduce(nDOF, LibUtilities::ReduceSum); if (m_f->m_comm->GetSpaceComm()->GetRank() == 0) { cout << "Total number of DOF: " << nDOF << endl; } }" Thank you for your time, Daniel.
Hi Daniel, You are correct this code is giving the local degrees of freedom which would be correct for DG but not for CG. If you run the incompressible solver with the -v option it does give the global data in the output stream, i.e.: Assembly map statistics for field p: - Number of local/global dof : 196 169 - Number of local/global boundary dof : 96 69 - Number of local/global Dirichlet dof : 14 13 - dof valency (min/max/mean) : 1 4 1 So not sure which solver you are running but it can be obtained this way too. Cheers, Spencer. From: nektar-users-bounces@imperial.ac.uk <nektar-users-bounces@imperial.ac.uk> on behalf of Daniel Garcia <ribeiro.danielg@gmail.com> Date: Tuesday, 9 April 2024 at 20:14 To: nektar-users <nektar-users@imperial.ac.uk> Subject: [Nektar-users] Correct number of Dof This email from ribeiro.danielg@gmail.com originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list<https://spam.ic.ac.uk/SpamConsole/Senders.aspx> to disable email stamping for this address. Hello community, how are you doing? I have a question about the FieldConvert module "dof". I suspect that the code counts the total number of modes, but not the real total number of degrees of freedom. For instance, it does not differentiate Ndof between DG and CG nor consider the effects of boundary conditions. Is there another way of computing the real Ndof or a workaround? The script that I checked it ProcessDOF.cpp: " ... void ProcessDOF::v_Process(po::variables_map &vm) { m_f->SetUpExp(vm); int nDOF = m_f->m_exp[0]->GetNcoeffs(); m_f->m_comm->GetSpaceComm()->AllReduce(nDOF, LibUtilities::ReduceSum); if (m_f->m_comm->GetSpaceComm()->GetRank() == 0) { cout << "Total number of DOF: " << nDOF << endl; } }" Thank you for your time, Daniel.
Hi Spencer, Thank you very much for the information. Indeed I'm using the incompressible solver and that came to be very helpful. Sincerely, Daniel. Em sáb., 13 de abr. de 2024 às 14:45, Sherwin, Spencer J < s.sherwin@imperial.ac.uk> escreveu:
Hi Daniel,
You are correct this code is giving the local degrees of freedom which would be correct for DG but not for CG.
If you run the incompressible solver with the -v option it does give the global data in the output stream, i.e.:
Assembly map statistics for field p:
- Number of local/global dof : 196 169
- Number of local/global boundary dof : 96 69
- Number of local/global Dirichlet dof : 14 13
- dof valency (min/max/mean) : 1 4 1
So not sure which solver you are running but it can be obtained this way too.
Cheers,
Spencer.
*From: *nektar-users-bounces@imperial.ac.uk < nektar-users-bounces@imperial.ac.uk> on behalf of Daniel Garcia < ribeiro.danielg@gmail.com> *Date: *Tuesday, 9 April 2024 at 20:14 *To: *nektar-users <nektar-users@imperial.ac.uk> *Subject: *[Nektar-users] Correct number of Dof
This email from ribeiro.danielg@gmail.com originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list <https://spam.ic.ac.uk/SpamConsole/Senders.aspx> to disable email stamping for this address.
Hello community, how are you doing?
I have a question about the FieldConvert module "dof". I suspect that the code counts the total number of modes, but not the real total number of degrees of freedom. For instance, it does not differentiate Ndof between DG and CG nor consider the effects of boundary conditions.
Is there another way of computing the real Ndof or a workaround?
The script that I checked it ProcessDOF.cpp:
" ...
void ProcessDOF::v_Process(po::variables_map &vm) { m_f->SetUpExp(vm);
int nDOF = m_f->m_exp[0]->GetNcoeffs(); m_f->m_comm->GetSpaceComm()->AllReduce(nDOF, LibUtilities::ReduceSum);
if (m_f->m_comm->GetSpaceComm()->GetRank() == 0) { cout << "Total number of DOF: " << nDOF << endl; } }"
Thank you for your time,
Daniel.
participants (2)
- 
                
                Daniel Garcia
- 
                
                Sherwin, Spencer J