On Thu, Feb 6, 2014 at 11:28 AM, David Knezevic
<dkneze...@seas.harvard.edu>wrote:
>
>
> Ah, good catch! If I change use_coupled_neighbor_dofs to do "return
> libMesh::on_command_line ("--implicit_neighbor_dofs")", then it works fine,
> e.g. the bandwidth in my test code with FIRST MONOMIAL becomes 4.
>
Excellent.
So I'd like to be able to enforce --implicit_neighbor_dofs=false, even if
> all variables are DISCONTINUOUS.
>
Making it take a following argument instead of just being a boolean flag
sounds good...
Any preferences on how to change the API to allow that? Perhaps a second
> boolean argument to use_coupled_neighbor_dofs called
> "use_commandline_value"?
>
The following is untested, but seems to compile. The API stays the same
but we additionally look for a following argument to
--implicit_neighbor_dofs which, if false, immediately returns false
from DofMap::use_coupled_neighbor_dofs without checking if all the
variables are discontinuous.
diff --git a/src/base/dof_map.C b/src/base/dof_map.C
> index 7c50688..74b1a42 100644
> --- a/src/base/dof_map.C
> +++ b/src/base/dof_map.C
> @@ -1471,6 +1471,24 @@ bool DofMap::use_coupled_neighbor_dofs(const
> MeshBase& mesh) const
> bool implicit_neighbor_dofs =
> libMesh::on_command_line ("--implicit_neighbor_dofs");
>
> + // If the user specifies --implicit_neighbor_dofs=false, then
> + // presumably he knows what he is doing and we won't try to
> + // automatically turn it on even when all the variables are
> + // discontinuous.
> + if (implicit_neighbor_dofs)
> + {
> + // No flag provided defaults to 'true'
> + bool flag = true;
> + flag = libMesh::command_line_value ("--implicit_neighbor_dofs",
> flag);
> +
> + if (!flag)
> + {
> + // The user said --implicit_neighbor_dofs 0, so he knows
> + // what he is doing and really doesn't want it.
> + return false;
> + }
> + }
> +
--
John
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel