-
Notifications
You must be signed in to change notification settings - Fork 471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Surface fitting updates #4116
Surface fitting updates #4116
Conversation
This PR is now under review (see the table in the PR description). To help with the review process, please do not force push to the branch. |
fem/gslib.hpp
Outdated
@@ -290,6 +291,56 @@ class OversetFindPointsGSLIB : public FindPointsGSLIB | |||
using FindPointsGSLIB::Interpolate; | |||
}; | |||
|
|||
/// Class for gather-scatter (gs) operations on Vectors based on corresponding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have the same doxygen style as in the rest of the file?
fem/gslib.hpp
Outdated
/// GSOPGSLIB gs = GSOPGSLIB(MPI_COMM_WORLD); | ||
/// gs.Setup(a); | ||
/// gs.GOP(v, GSOpType::Min); | ||
/// would return: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return into v
?
fem/gslib.hpp
Outdated
virtual ~GSOPGSLIB(); | ||
|
||
// Same ids get grouped together. id == 0 does not participate. | ||
virtual void Setup(Array<long long> &ids); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs better doxygen (can include see class description
).
fem/gslib.hpp
Outdated
|
||
// supported operation types | ||
enum GSOpType {ADD, MUL, MIN, MAX}; | ||
virtual void GSOP(Vector &senddata, GSOpType op); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs better doxygen (can include see class description
).
fem/gslib.hpp
Outdated
enum GSOpType {ADD, MUL, MIN, MAX}; | ||
virtual void GSOP(Vector &senddata, GSOpType op); | ||
|
||
virtual void FreeData(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What data, when should this be called?
fem/tmop.cpp
Outdated
delete surf_fit_gf; | ||
surf_fit_gf = new GridFunction(s0); | ||
ParGridFunction *surf_fit_gf_dummy = new ParGridFunction(s0); | ||
surf_fit_gf = surf_fit_gf_dummy; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this change?
@@ -3004,33 +3012,180 @@ void TMOP_Integrator::EnableSurfaceFitting(const ParGridFunction &s0, | |||
surf_fit_eval->SetInitialField | |||
(*surf_fit_gf->FESpace()->GetMesh()->GetNodes(), *surf_fit_gf); | |||
surf_fit_gf_bg = false; | |||
|
|||
// Unify marker array across processor boundaries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would they be different?
Shouldn't this be done by the caller?
fem/tmop.cpp
Outdated
fec->GetBasisType()); | ||
ParFiniteElementSpace *fes_grad = new ParFiniteElementSpace | ||
(pmesh, | ||
fec_grad, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this some editor malfunction?
fem/tmop.cpp
Outdated
surf_fit_gf_energy += sigma_e(s) * sigma_e(s); | ||
const IntegrationPoint &ip_s = ir_s.IntPoint(s); | ||
Tpr->SetIntPoint(&ip_s); | ||
surf_fit_gf_energy += surf_fit_coeff->Eval(*Tpr, ip_s) * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought user-provided Coefficients
were not part of the normalization. They would get cancelled out and have no effect.
@@ -224,14 +226,26 @@ class TMOPNewtonSolver : public LBFGSSolver | |||
/// (ii) surface fitting weight. | |||
virtual void ProcessNewState(const Vector &x) const; | |||
|
|||
/** @name Methods for adaptive surface fitting weight. (Experimental) */ | |||
/** @name Methods for adaptive surface fitting. These control the behavior of | |||
the weight and the termination of the solver. (Experimental) */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you need ///@{ ... ///@}
to actually group the functions in the doxygen.
After discussion with @vladotomov, I will be breaking this into smaller PRs. |
Misc updates related to surface fitting capability.
PR Checklist
make style
.CHANGELOG
:CHANGELOG
to group with other related features?INSTALL
:make
orcmake
have a new target?.github
.appveyor.yml
.gitignore
:make distclean; git status
shows any files that were generated from the source by the project (not an IDE) but we don't want to track in the repository.examples/makefile
:SEQ_EXAMPLES
andPAR_EXAMPLES
variables.clean
target..gitignore
file.examples/CMakeLists.txt
:ALL_EXE_SRCS
variable.THIS_TEST_OPTIONS
is set correctly for the new example.doc/CodeDocumentation.dox
.examples/pumi
), list it indoc/CodeDocumentation.conf.in
src/examples.md
.src/examples.md
andsrc/img
.examples.md
, list the example under the appropriate categories, add new categories if necessary.features.md
.makefile
andmakefile
in corresponding miniapp directory..gitignore
file.CMakeLists.txt
file in theminiapps
directory, if the new miniapp is in a new directory.CMakeLists.txt
file in the new miniapp directory.doc/CodeDocumentation.dox
miniapps/nurbs
), add it toMINIAPP_SUBDIRS
in themakefile
.miniapps/nurbs
), list it indoc/CodeDocumentation.conf.in
src/meshing.md
andsrc/electromagnetics.md
files.src/examples.md
andsrc/img
.features.md
.mfem/web
repo.README
(rare).doc/CodeDocumentation.dox
(rare).make unittest
to make sure all unit tests pass.tests/scripts
.