| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Note that blending is used internally in Bezier Shapes. More specifically when a BezierCurver object is set with a non-zero third argument, Bezier shapes for tets and triangles might behave differently. Therefore, we needed to make sure the blending orders are set to zero at the beginning of the convertInterpolationgFieldsToBezier routine and then reverted back to the original values at the end. There still seems to be necessary to construct a new BezierCurver object with last argument 0 for the bezier fields to work properly.
…ier_fields Conflicts: crv/crvBezierFields.cc
|
Would you please rebase this branch on develop? |
Sorry, something went wrong.
| crvTables.cc | ||
| crvQuality.cc | ||
| crvVtk.cc | ||
| crvBezierFields.cc |
There was a problem hiding this comment.
crvBezierFields.cc seems to have been added twice!
Sorry, something went wrong.
| int countNumberInvalidElements(apf::Mesh2* m); | ||
|
|
||
| /** \ brief converts field f to Bezier entity wise */ | ||
| void convertInterpolationFieldPoints(apf::MeshEntity* e, |
There was a problem hiding this comment.
@avinmoharana
Is this used by outside users or only internally?
Sorry, something went wrong.
There was a problem hiding this comment.
@mortezah
The converInterpolationFieldPoints is not currently used outside, but it would be nice to have an entity-specific convert routine.
Sorry, something went wrong.
There was a problem hiding this comment.
What do you mean by entity-specific?
Sorry, something went wrong.
There was a problem hiding this comment.
@mortezah
I meant while testing an operator we construct a toy example where this routine can get the control points/ interpolation points for a specific edge or a face.
The routine convertInterpolationFieldPoints is defined in crvBezierFields.cc and is used in crvBezierSolutionTransfer.cc and we don't have a header file defined for crvBezierFields.
Sorry, something went wrong.
| apf::Field* f, int n, int ne, apf::NewArray<double> &c); | ||
|
|
||
| /** \brief converts field f, which is interpolating to Bezier */ | ||
| void convertInterpolatingFieldToBezier(apf::Mesh2* m_mesh, apf::Field* f); |
There was a problem hiding this comment.
@avinmoharana
Is this used by outside users or only internally?
Sorry, something went wrong.
There was a problem hiding this comment.
@mortezah
This can be used outside as well. If we have an interpolating field defined outside then we can convert to Bezier from outside.
Sorry, something went wrong.
There was a problem hiding this comment.
@avinmoharana if it is not used outside, it should not be here. If they are design issues that prevent this we should discuss and resolve those appropriately.
Sorry, something went wrong.
There was a problem hiding this comment.
@mortezah
We want this to be accessible from outside. Can we not keep the current design?
Sorry, something went wrong.
| int getTetNodeIndex(int P, int i, int j, int k); | ||
|
|
||
| /** \brief adds bezier solution transfers */ | ||
| ma::SolutionTransfer* setBezierSolutionTransfers( |
There was a problem hiding this comment.
Is this used by outside users or only internally?
Sorry, something went wrong.
There was a problem hiding this comment.
@mortezah
No this not used outside.
Sorry, something went wrong.
There was a problem hiding this comment.
then it should be made static. It also seems that this file is not a correct location for this. In that case, it has to be moved to the file it is defined. Where is the implementation (the actual code)? Can you just remove this declaration make the implementation static in the file it is defined?
Sorry, something went wrong.
There was a problem hiding this comment.
@mortezah
The setBezierSolutionTransfers() is defined in crvBezierSolutionTransfer.cc and is called inside the adapt routine of crvAdapt.cc.
The current implementation uses the createBezierSolutionTransfer() (defined static in crvBezierSolutionTransfer.cc) to access the bezier fields and the setBezierSolutionTransfers adds those to solutionTransfer.
I can make the createBezierSolutionTransfer() accessible and define the setBezierSolutionTransfers routine in crvAdapt.cc, or define both only in crvAdapt.
Sorry, something went wrong.
| } | ||
| } | ||
|
|
||
| void getAllBezierFields(ma::Mesh* m, std::vector<apf::Field*>& fields) |
There was a problem hiding this comment.
if this is used only in this file, it should be made static.
Sorry, something went wrong.
| ma.h | ||
| maInput.h | ||
| maMesh.h | ||
| maMap.h |
There was a problem hiding this comment.
Are these two need to be here, or is this done for debugging? If this is done for debugging, please revert this back.
Sorry, something went wrong.
| int countNumberInvalidElements(apf::Mesh2* m); | ||
|
|
||
| /** \ brief converts field f to Bezier entity wise */ | ||
| void convertInterpolationFieldPoints(apf::MeshEntity* e, |
There was a problem hiding this comment.
@mortezah
The converInterpolationFieldPoints is not currently used outside, but it would be nice to have an entity-specific convert routine.
Sorry, something went wrong.
| apf::Field* f, int n, int ne, apf::NewArray<double> &c); | ||
|
|
||
| /** \brief converts field f, which is interpolating to Bezier */ | ||
| void convertInterpolatingFieldToBezier(apf::Mesh2* m_mesh, apf::Field* f); |
There was a problem hiding this comment.
@mortezah
This can be used outside as well. If we have an interpolating field defined outside then we can convert to Bezier from outside.
Sorry, something went wrong.
| int getTetNodeIndex(int P, int i, int j, int k); | ||
|
|
||
| /** \brief adds bezier solution transfers */ | ||
| ma::SolutionTransfer* setBezierSolutionTransfers( |
There was a problem hiding this comment.
@mortezah
No this not used outside.
Sorry, something went wrong.
|
|
||
| void convertInterpolatingFieldToBezier(apf::Mesh2* m_mesh, apf::Field* f) | ||
| { | ||
| // TODO: to be completed |
There was a problem hiding this comment.
@mortezah
There is no assumption that the blending order of the entities is 0, i.e. the convert to Bezier Field should work with a non-zero blending order, as is implemented for the coordinate field. Should I remove the TODO from here?
Sorry, something went wrong.
| apf::NewArray<double> value; | ||
| }; | ||
| return 0; | ||
| } |
There was a problem hiding this comment.
we added this routine to print the field name that undergoes solution transfer onto the output console.
Sorry, something went wrong.
There was a problem hiding this comment.
things that are added for debugging should be reverted back to their original state.
Sorry, something went wrong.
There was a problem hiding this comment.
@mortezah
Removed getTransferFieldName().
Sorry, something went wrong.
| int minDim; | ||
| }; | ||
| } | ||
| } |
There was a problem hiding this comment.
From line 216 to 245, it was a fix to account for piecewise constant energy field, where we conserve the total energy of the cavity on mesh adapt. This was a specific fix to the problem and should not be generalized. Should I remove this part?
Sorry, something went wrong.
| EntityArray& newEntities); | ||
| private: | ||
| int minDim; | ||
| }; |
There was a problem hiding this comment.
@mortezah
We modified the structure of the code to make the routines usable outside maSolutionTransfer.
Sorry, something went wrong.
| val[k] = 0.; | ||
| apf::setComponents(f, newEntities[i], j, &(val[0])); | ||
| } | ||
| repositionInteriorFieldWithBlended(mesh,f,newEntities[i]); |
There was a problem hiding this comment.
@avinmoharana
why are we getting involved with blending here?
Sorry, something went wrong.
| for (int j = 0; j < ni; ++j){ | ||
| apf::Vector3 point(0,0,0); | ||
| for (int k = 0; k < np; ++k) | ||
| for (int k = 0; k < np; ++k) { |
There was a problem hiding this comment.
can you remove the extra bracket for this for loop?
Sorry, something went wrong.
There was a problem hiding this comment.
@mortezah
Removed the extra bracket.
Sorry, something went wrong.
| EntityArray& oldElements, | ||
| EntityArray& newEntities); | ||
| private: | ||
| //private |
There was a problem hiding this comment.
Why is the private commented here?
Sorry, something went wrong.
There was a problem hiding this comment.
@mortezah
We accessed the field names for solution transfer from transfers which was earlier defined private. Reverted it back to private.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This pull request adds the transfer of bezier solution fields.