Skip to content
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

Boundary condition contribution to gradient system #198

Open
trevilo opened this issue Feb 21, 2023 · 0 comments
Open

Boundary condition contribution to gradient system #198

trevilo opened this issue Feb 21, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@trevilo
Copy link
Contributor

trevilo commented Feb 21, 2023

There is a significant bug in the face integration term on the right-hand-side of the gradient system for the BR1 implementation. Specifically, it neglects the contribution of the boundary faces, which implicitly assumes that the interior state satisfies the boundary conditions.

@trevilo trevilo added the bug Something isn't working label Feb 21, 2023
@trevilo trevilo self-assigned this Feb 21, 2023
trevilo added a commit that referenced this issue Feb 22, 2023
Specifically, parts of GradNonLinearForm and GradFaceIntegrator had
_GPU_ specific code that was superseded by device-specific code in the
Gradients class and thus was never called.  This code has been
eliminated to improve hygiene in preparation for changes to address #198.
trevilo added a commit that referenced this issue Feb 22, 2023
In preparation for further refactoring as part of addressing #198
trevilo added a commit that referenced this issue Feb 22, 2023
The idea here is to take advantage of all the data that has already
been set up in class BCIntegrator by making class GradFaceIntegrator
its friend.  Then we can use the internal std::unordered_map objects
in BCIntegrator, which map the boundary attribute to the appropriate
BoundaryCondition class, to get access to any required boundary
condition information.  In principle that is all that is necessary,
but the data we need it is not in a convenient form.  To address this,
the method computeBdrPrimitiveStateForGradient has been added to the
BoundaryCondition class.  In the base class, this method just sets the
boundary state to the internal state, which results in the same
(incorrect) behavior we have now.  In future commits, this method will
be implemented in the children of BoundaryCondition in order to
provide the right boundary state.
trevilo added a commit that referenced this issue Feb 22, 2023
)

Eventually useBCinGrad = true will be the default (and only) option.
But, during development, it is useful to be able to turn it off so we
can ensure we don't introduce any unintended effects by running the
regression tests (which will have to have their 'truth' solutions
regenerated once this change is ready.
trevilo added a commit that referenced this issue Feb 27, 2023
Specifically, parts of GradNonLinearForm and GradFaceIntegrator had
_GPU_ specific code that was superseded by device-specific code in the
Gradients class and thus was never called.  This code has been
eliminated to improve hygiene in preparation for changes to address #198.
trevilo added a commit that referenced this issue Feb 27, 2023
In preparation for further refactoring as part of addressing #198
trevilo added a commit that referenced this issue Feb 27, 2023
The idea here is to take advantage of all the data that has already
been set up in class BCIntegrator by making class GradFaceIntegrator
its friend.  Then we can use the internal std::unordered_map objects
in BCIntegrator, which map the boundary attribute to the appropriate
BoundaryCondition class, to get access to any required boundary
condition information.  In principle that is all that is necessary,
but the data we need it is not in a convenient form.  To address this,
the method computeBdrPrimitiveStateForGradient has been added to the
BoundaryCondition class.  In the base class, this method just sets the
boundary state to the internal state, which results in the same
(incorrect) behavior we have now.  In future commits, this method will
be implemented in the children of BoundaryCondition in order to
provide the right boundary state.
trevilo added a commit that referenced this issue Feb 27, 2023
)

Eventually useBCinGrad = true will be the default (and only) option.
But, during development, it is useful to be able to turn it off so we
can ensure we don't introduce any unintended effects by running the
regression tests (which will have to have their 'truth' solutions
regenerated once this change is ready.
trevilo added a commit that referenced this issue May 11, 2023
Specifically, parts of GradNonLinearForm and GradFaceIntegrator had
_GPU_ specific code that was superseded by device-specific code in the
Gradients class and thus was never called.  This code has been
eliminated to improve hygiene in preparation for changes to address #198.
trevilo added a commit that referenced this issue May 11, 2023
In preparation for further refactoring as part of addressing #198
trevilo added a commit that referenced this issue May 11, 2023
The idea here is to take advantage of all the data that has already
been set up in class BCIntegrator by making class GradFaceIntegrator
its friend.  Then we can use the internal std::unordered_map objects
in BCIntegrator, which map the boundary attribute to the appropriate
BoundaryCondition class, to get access to any required boundary
condition information.  In principle that is all that is necessary,
but the data we need it is not in a convenient form.  To address this,
the method computeBdrPrimitiveStateForGradient has been added to the
BoundaryCondition class.  In the base class, this method just sets the
boundary state to the internal state, which results in the same
(incorrect) behavior we have now.  In future commits, this method will
be implemented in the children of BoundaryCondition in order to
provide the right boundary state.
trevilo added a commit that referenced this issue May 11, 2023
)

Eventually useBCinGrad = true will be the default (and only) option.
But, during development, it is useful to be able to turn it off so we
can ensure we don't introduce any unintended effects by running the
regression tests (which will have to have their 'truth' solutions
regenerated once this change is ready.
trevilo added a commit that referenced this issue May 15, 2023
Specifically, parts of GradNonLinearForm and GradFaceIntegrator had
_GPU_ specific code that was superseded by device-specific code in the
Gradients class and thus was never called.  This code has been
eliminated to improve hygiene in preparation for changes to address #198.
trevilo added a commit that referenced this issue May 15, 2023
In preparation for further refactoring as part of addressing #198
trevilo added a commit that referenced this issue May 15, 2023
The idea here is to take advantage of all the data that has already
been set up in class BCIntegrator by making class GradFaceIntegrator
its friend.  Then we can use the internal std::unordered_map objects
in BCIntegrator, which map the boundary attribute to the appropriate
BoundaryCondition class, to get access to any required boundary
condition information.  In principle that is all that is necessary,
but the data we need it is not in a convenient form.  To address this,
the method computeBdrPrimitiveStateForGradient has been added to the
BoundaryCondition class.  In the base class, this method just sets the
boundary state to the internal state, which results in the same
(incorrect) behavior we have now.  In future commits, this method will
be implemented in the children of BoundaryCondition in order to
provide the right boundary state.
trevilo added a commit that referenced this issue May 15, 2023
)

Eventually useBCinGrad = true will be the default (and only) option.
But, during development, it is useful to be able to turn it off so we
can ensure we don't introduce any unintended effects by running the
regression tests (which will have to have their 'truth' solutions
regenerated once this change is ready.
trevilo added a commit that referenced this issue Jul 19, 2023
Specifically, parts of GradNonLinearForm and GradFaceIntegrator had
_GPU_ specific code that was superseded by device-specific code in the
Gradients class and thus was never called.  This code has been
eliminated to improve hygiene in preparation for changes to address #198.
trevilo added a commit that referenced this issue Jul 19, 2023
In preparation for further refactoring as part of addressing #198
trevilo added a commit that referenced this issue Jul 19, 2023
The idea here is to take advantage of all the data that has already
been set up in class BCIntegrator by making class GradFaceIntegrator
its friend.  Then we can use the internal std::unordered_map objects
in BCIntegrator, which map the boundary attribute to the appropriate
BoundaryCondition class, to get access to any required boundary
condition information.  In principle that is all that is necessary,
but the data we need it is not in a convenient form.  To address this,
the method computeBdrPrimitiveStateForGradient has been added to the
BoundaryCondition class.  In the base class, this method just sets the
boundary state to the internal state, which results in the same
(incorrect) behavior we have now.  In future commits, this method will
be implemented in the children of BoundaryCondition in order to
provide the right boundary state.
trevilo added a commit that referenced this issue Jul 19, 2023
)

Eventually useBCinGrad = true will be the default (and only) option.
But, during development, it is useful to be able to turn it off so we
can ensure we don't introduce any unintended effects by running the
regression tests (which will have to have their 'truth' solutions
regenerated once this change is ready.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant