How to figure out each Face's Expansion Coefficients given ElementExpansion Coeffcients
Dear All, I am trying to do the following in my code. I am stuck with not being able to few steps. Can you please suggest if there are any api calls which I can use. Or areas of code which does the same. Take Multi-region element, Loop through each element in the multi region. Loop through each face of element of multi region. Get 2D element expansion of each face and its coefficients. End each face loop. End each element loop. Question(1) To get the 2D element expansion, I am able to use GetfaceExp() on Expansion3D. This only works for boundary elements when the field is Cont3DExp. When element is not in the boundary it gives a segmentation fault 11. - Is this supposed to work ? Question(2) I can overcome the above problem by initializing the field as DisCont3DExp, while loading from fld file. (This seems to work for now). - Is there a function to get each face's Expansion coefficients from element expansion coefficients ? - Or should I dynamically check if the element is Hex, Tet, prism and try to figure out from the mapping order? Thank you,
Hi Ashok, Not sure if anyone has responded yet. Dear All, I am trying to do the following in my code. I am stuck with not being able to few steps. Can you please suggest if there are any api calls which I can use. Or areas of code which does the same. Take Multi-region element, Loop through each element in the multi region. Loop through each face of element of multi region. Get 2D element expansion of each face and its coefficients. End each face loop. End each element loop. Question(1) To get the 2D element expansion, I am able to use GetfaceExp() on Expansion3D. This only works for boundary elements when the field is Cont3DExp. When element is not in the boundary it gives a segmentation fault 11. * Is this supposed to work ? We only define a face expansion as part of the trace when a face is on the boundary in Cont3DExp. For a DisCont3DExp the trace space include all the face expansions so what you are reporting here is consistent with our coding convention. I Question(2) I can overcome the above problem by initializing the field as DisCont3DExp, while loading from fld file. (This seems to work for now). * Is there a function to get each face's Expansion coefficients from element expansion coefficients ? * Or should I dynamically check if the element is Hex, Tet, prism and try to figure out from the mapping order? There is certainly a GetFacePhysVals() which returns pays values along a face since we use this a lot in the DG code. Looking in StdExpansion there does not seem to be a GetFaceCoeff type method. I believe GetBoundaryMap will return the map to the coefficients on the boundary of all faces within an element. However I am not sure whether this will help you. However it might allow you to see how to define a GetFaceCoeff method. Cheers, Spencer. Spencer Sherwin McLaren Racing/Royal Academy of Engineering Research Chair, Professor of Computational Fluid Mechanics, Department of Aeronautics, Imperial College London South Kensington Campus London SW7 2AZ s.sherwin@imperial.ac.uk<mailto:s.sherwin@imperial.ac.uk> +44 (0) 20 759 45052
Thank you Professor Spencer for the clarifications. (1) I am using DisCont expansion for time being to keep myself unblocked. *(It is doing what i want. Thank you)* (2) For getting coefficients. I am using GetFaceToElementMap Which gives me double indexed array to pick coefficients from element expansion coefficient list. void GetFaceToElementMap (const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int nummodesA=-1, int nummodesB) I am unable to figure out what signArray and faceOrient is for, Please let me know if there is, i should watch out for. *faceOrient*: I am getting it from EleExp->GetFOrient() and passing along to EleExp->GetFaceToElementMap(). Cheers, Ashok. On Mon, Feb 29, 2016 at 11:29 AM, Sherwin, Spencer J < s.sherwin@imperial.ac.uk> wrote:
Hi Ashok,
Not sure if anyone has responded yet.
Dear All, I am trying to do the following in my code. I am stuck with not being able to few steps. Can you please suggest if there are any api calls which I can use. Or areas of code which does the same.
Take Multi-region element, Loop through each element in the multi region. Loop through each face of element of multi region. Get 2D element expansion of each face and its coefficients.
End each face loop. End each element loop.
Question(1) To get the 2D element expansion, I am able to use GetfaceExp() on Expansion3D. This only works for boundary elements when the field is Cont3DExp. When element is not in the boundary it gives a segmentation fault 11.
- Is this supposed to work ?
We only define a face expansion as part of the trace when a face is on the boundary in Cont3DExp. For a DisCont3DExp the trace space include all the face expansions so what you are reporting here is consistent with our coding convention. I
Question(2) I can overcome the above problem by initializing the field as DisCont3DExp, while loading from fld file. (This seems to work for now).
- Is there a function to get each face's Expansion coefficients from element expansion coefficients ? - Or should I dynamically check if the element is Hex, Tet, prism and try to figure out from the mapping order?
There is certainly a GetFacePhysVals() which returns pays values along a face since we use this a lot in the DG code.
Looking in StdExpansion there does not seem to be a GetFaceCoeff type method. I believe GetBoundaryMap will return the map to the coefficients on the boundary of all faces within an element. However I am not sure whether this will help you. However it might allow you to see how to define a GetFaceCoeff method.
Cheers, Spencer.
Spencer Sherwin McLaren Racing/Royal Academy of Engineering Research Chair, Professor of Computational Fluid Mechanics, Department of Aeronautics, Imperial College London South Kensington Campus London SW7 2AZ
s.sherwin@imperial.ac.uk +44 (0) 20 759 45052
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
Hi ashok, (1) I am using DisCont expansion for time being to keep myself unblocked. (It is doing what i want. Thank you) (2) For getting coefficients. I am using GetFaceToElementMap Which gives me double indexed array to pick coefficients from element expansion coefficient list. void GetFaceToElementMap (const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int nummodesA=-1, int nummodesB) I am unable to figure out what signArray and faceOrient is for, Please let me know if there is, i should watch out for. faceOrient: I am getting it from EleExp->GetFOrient() and passing along to EleExp->GetFaceToElementMap(). I had forgotten about that method. When using a modal expansion if edges or faces are not geometrically aligned then odd order coefficients need to be negated. This is what the sign array does. Also two faces to not have to be aligned with the trace face and so forient tells you how a face is aligned to the trace and so how the coefficients may need to be reshuffled. Cheers Spencer Cheers, Ashok. On Mon, Feb 29, 2016 at 11:29 AM, Sherwin, Spencer J <s.sherwin@imperial.ac.uk<mailto:s.sherwin@imperial.ac.uk>> wrote: Hi Ashok, Not sure if anyone has responded yet. Dear All, I am trying to do the following in my code. I am stuck with not being able to few steps. Can you please suggest if there are any api calls which I can use. Or areas of code which does the same. Take Multi-region element, Loop through each element in the multi region. Loop through each face of element of multi region. Get 2D element expansion of each face and its coefficients. End each face loop. End each element loop. Question(1) To get the 2D element expansion, I am able to use GetfaceExp() on Expansion3D. This only works for boundary elements when the field is Cont3DExp. When element is not in the boundary it gives a segmentation fault 11. * Is this supposed to work ? We only define a face expansion as part of the trace when a face is on the boundary in Cont3DExp. For a DisCont3DExp the trace space include all the face expansions so what you are reporting here is consistent with our coding convention. I Question(2) I can overcome the above problem by initializing the field as DisCont3DExp, while loading from fld file. (This seems to work for now). * Is there a function to get each face's Expansion coefficients from element expansion coefficients ? * Or should I dynamically check if the element is Hex, Tet, prism and try to figure out from the mapping order? There is certainly a GetFacePhysVals() which returns pays values along a face since we use this a lot in the DG code. Looking in StdExpansion there does not seem to be a GetFaceCoeff type method. I believe GetBoundaryMap will return the map to the coefficients on the boundary of all faces within an element. However I am not sure whether this will help you. However it might allow you to see how to define a GetFaceCoeff method. Cheers, Spencer. Spencer Sherwin McLaren Racing/Royal Academy of Engineering Research Chair, Professor of Computational Fluid Mechanics, Department of Aeronautics, Imperial College London South Kensington Campus London SW7 2AZ s.sherwin@imperial.ac.uk<mailto:s.sherwin@imperial.ac.uk> +44 (0) 20 759 45052 _______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk<mailto:Nektar-users@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
Thanks for quick reply, I am using (Modified A and B) expansions. So can I ignore the sign array for now. I do not completely understand fOrient part. I will refer your text book. Since i am only trying to locate a point on the face, where the face expansion evaluates to zero. (I will ignore the orientation for now.) Then Map the 2D point to 3D point on element StdExpansion. cheers, Ashok On Mon, Feb 29, 2016 at 4:26 PM, Sherwin, Spencer J < s.sherwin@imperial.ac.uk> wrote:
Hi ashok,
(1) I am using DisCont expansion for time being to keep myself unblocked. * (It is doing what i want. Thank you)* (2) For getting coefficients. I am using GetFaceToElementMap Which gives me double indexed array to pick coefficients from element expansion coefficient list.
void GetFaceToElementMap (const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int nummodesA=-1, int nummodesB)
I am unable to figure out what signArray and faceOrient is for, Please let me know if there is, i should watch out for. *faceOrient*: I am getting it from EleExp->GetFOrient() and passing along to EleExp->GetFaceToElementMap().
I had forgotten about that method.
When using a modal expansion if edges or faces are not geometrically aligned then odd order coefficients need to be negated. This is what the sign array does.
I am using nodal expansion.i.e.(Modified A and B). So can I ignore the sign array for now.
Also two faces to not have to be aligned with the trace face and so forient tells you how a face is aligned to the trace and so how the coefficients may need to be reshuffled.
I do not completely understand this part. I will refer your text book. Since i am only trying to locate a point on the face, where the face expansion evaluates to zero. (I will ignore the orientation for now.) Then Map the 2D point to 3D point on element StdExpansion.
Cheers Spencer
Cheers, Ashok.
On Mon, Feb 29, 2016 at 11:29 AM, Sherwin, Spencer J < s.sherwin@imperial.ac.uk> wrote:
Hi Ashok,
Not sure if anyone has responded yet.
Dear All, I am trying to do the following in my code. I am stuck with not being able to few steps. Can you please suggest if there are any api calls which I can use. Or areas of code which does the same.
Take Multi-region element, Loop through each element in the multi region. Loop through each face of element of multi region. Get 2D element expansion of each face and its coefficients. End each face loop. End each element loop.
Question(1) To get the 2D element expansion, I am able to use GetfaceExp() on Expansion3D. This only works for boundary elements when the field is Cont3DExp. When element is not in the boundary it gives a segmentation fault 11.
- Is this supposed to work ?
We only define a face expansion as part of the trace when a face is on the boundary in Cont3DExp. For a DisCont3DExp the trace space include all the face expansions so what you are reporting here is consistent with our coding convention. I
Question(2) I can overcome the above problem by initializing the field as DisCont3DExp, while loading from fld file. (This seems to work for now).
- Is there a function to get each face's Expansion coefficients from element expansion coefficients ? - Or should I dynamically check if the element is Hex, Tet, prism and try to figure out from the mapping order?
There is certainly a GetFacePhysVals() which returns pays values along a face since we use this a lot in the DG code.
Looking in StdExpansion there does not seem to be a GetFaceCoeff type method. I believe GetBoundaryMap will return the map to the coefficients on the boundary of all faces within an element. However I am not sure whether this will help you. However it might allow you to see how to define a GetFaceCoeff method.
Cheers, Spencer.
Spencer Sherwin McLaren Racing/Royal Academy of Engineering Research Chair, Professor of Computational Fluid Mechanics, Department of Aeronautics, Imperial College London South Kensington Campus London SW7 2AZ
s.sherwin@imperial.ac.uk +44 (0) 20 759 45052
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
Hi Ashok, No you cannot ignore the sign in a global sense for a Modified A and B expansion since when two triangular faces meet the bottom edge may face in a different direction requiring the negation of these modes. Certainly have a look at my text book and also discuss this with Mike since i thin he will be abel to help. Cheers, Spencer. On 29 Feb 2016, at 23:45, ashok jallepalli <ash.nani@gmail.com<mailto:ash.nani@gmail.com>> wrote: Thanks for quick reply, I am using (Modified A and B) expansions. So can I ignore the sign array for now. I do not completely understand fOrient part. I will refer your text book. Since i am only trying to locate a point on the face, where the face expansion evaluates to zero. (I will ignore the orientation for now.) Then Map the 2D point to 3D point on element StdExpansion. cheers, Ashok On Mon, Feb 29, 2016 at 4:26 PM, Sherwin, Spencer J <s.sherwin@imperial.ac.uk<mailto:s.sherwin@imperial.ac.uk>> wrote: Hi ashok, (1) I am using DisCont expansion for time being to keep myself unblocked. (It is doing what i want. Thank you) (2) For getting coefficients. I am using GetFaceToElementMap Which gives me double indexed array to pick coefficients from element expansion coefficient list. void GetFaceToElementMap (const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int nummodesA=-1, int nummodesB) I am unable to figure out what signArray and faceOrient is for, Please let me know if there is, i should watch out for. faceOrient: I am getting it from EleExp->GetFOrient() and passing along to EleExp->GetFaceToElementMap(). I had forgotten about that method. When using a modal expansion if edges or faces are not geometrically aligned then odd order coefficients need to be negated. This is what the sign array does. I am using nodal expansion.i.e.(Modified A and B). So can I ignore the sign array for now. Also two faces to not have to be aligned with the trace face and so forient tells you how a face is aligned to the trace and so how the coefficients may need to be reshuffled. I do not completely understand this part. I will refer your text book. Since i am only trying to locate a point on the face, where the face expansion evaluates to zero. (I will ignore the orientation for now.) Then Map the 2D point to 3D point on element StdExpansion. Cheers Spencer Cheers, Ashok. On Mon, Feb 29, 2016 at 11:29 AM, Sherwin, Spencer J <s.sherwin@imperial.ac.uk<mailto:s.sherwin@imperial.ac.uk>>wrote: Hi Ashok, Not sure if anyone has responded yet. Dear All, I am trying to do the following in my code. I am stuck with not being able to few steps. Can you please suggest if there are any api calls which I can use. Or areas of code which does the same. Take Multi-region element, Loop through each element in the multi region. Loop through each face of element of multi region. Get 2D element expansion of each face and its coefficients. End each face loop. End each element loop. Question(1) To get the 2D element expansion, I am able to use GetfaceExp() on Expansion3D. This only works for boundary elements when the field is Cont3DExp. When element is not in the boundary it gives a segmentation fault 11. * Is this supposed to work ? We only define a face expansion as part of the trace when a face is on the boundary in Cont3DExp. For a DisCont3DExp the trace space include all the face expansions so what you are reporting here is consistent with our coding convention. I Question(2) I can overcome the above problem by initializing the field as DisCont3DExp, while loading from fld file. (This seems to work for now). * Is there a function to get each face's Expansion coefficients from element expansion coefficients ? * Or should I dynamically check if the element is Hex, Tet, prism and try to figure out from the mapping order? There is certainly a GetFacePhysVals() which returns pays values along a face since we use this a lot in the DG code. Looking in StdExpansion there does not seem to be a GetFaceCoeff type method. I believe GetBoundaryMap will return the map to the coefficients on the boundary of all faces within an element. However I am not sure whether this will help you. However it might allow you to see how to define a GetFaceCoeff method. Cheers, Spencer. Spencer Sherwin McLaren Racing/Royal Academy of Engineering Research Chair, Professor of Computational Fluid Mechanics, Department of Aeronautics, Imperial College London South Kensington Campus London SW7 2AZ s.sherwin@imperial.ac.uk<mailto:s.sherwin@imperial.ac.uk> +44 (0) 20 759 45052 _______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk<mailto:Nektar-users@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/nektar-users Spencer Sherwin McLaren Racing/Royal Academy of Engineering Research Chair, Professor of Computational Fluid Mechanics, Department of Aeronautics, Imperial College London South Kensington Campus London SW7 2AZ s.sherwin@imperial.ac.uk<mailto:s.sherwin@imperial.ac.uk> +44 (0) 20 759 45052
participants (2)
- 
                
                ashok jallepalli
- 
                
                Sherwin, Spencer J