Facetnormal compile error
Dear all, I've been trying a shallow water dam break problem, but currently have a compile error Discontinuous type FacetNormal must be restricted. Would this be because of how I've defined my roe averages or is there something further wrong in my definition of the residual? Regards, Will
On 23/02/16 11:11, William Booker wrote:
Dear all,
I've been trying a shallow water dam break problem, but currently have a compile error
Discontinuous type FacetNormal must be restricted.
You need to choose which side of the facet the symbolic FacetNormal in your form you want to use (for the dS integals). i.e. n cannot appear in a dS integral without choosing either the + or - side (or in a jump or avg). Cheers, Lawrence
Dear all, I now get the following error when attempting to do 1 application of the nonlinear solver. Regards, Will File "shallow_water.py", line 92, in <module> usolver.solve() File "<decorator-gen-277>", line 2, in solve File "/home/cserv1_a/apps/install/firedrake/0.12.0/lib64/python2.7/site-packages/PyOP2-0.11.0_397_g9860f8d-py2.7-linux-x86_64.egg/pyop2/profiling.py", line 203, in wrapper return f(*args, **kwargs) File "/home/cserv1_a/apps/install/firedrake/0.12.0/lib64/python2.7/site-packages/firedrake/variational_solver.py", line 166, in solve bc.apply(self._problem.u) File "<decorator-gen-278>", line 2, in apply File "/home/cserv1_a/apps/install/firedrake/0.12.0/lib64/python2.7/site-packages/PyOP2-0.11.0_397_g9860f8d-py2.7-linux-x86_64.egg/pyop2/profiling.py", line 203, in wrapper return f(*args, **kwargs) File "/home/cserv1_a/apps/install/firedrake/0.12.0/lib64/python2.7/site-packages/firedrake/bcs.py", line 230, in apply r.assign(self.function_arg, subset=self.node_set) File "/home/cserv1_a/apps/install/firedrake/0.12.0/lib64/python2.7/site-packages/PyOP2-0.11.0_397_g9860f8d-py2.7-linux-x86_64.egg/pyop2/utils.py", line 64, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/cserv1_a/apps/install/firedrake/0.12.0/lib64/python2.7/site-packages/firedrake/bcs.py", line 161, in node_set return op2.Subset(self._function_space.node_set, self.nodes) File "/home/cserv1_a/apps/install/firedrake/0.12.0/lib64/python2.7/site-packages/PyOP2-0.11.0_397_g9860f8d-py2.7-linux-x86_64.egg/pyop2/utils.py", line 64, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/cserv1_a/apps/install/firedrake/0.12.0/lib64/python2.7/site-packages/firedrake/bcs.py", line 152, in nodes self.method).values_with_halo.take( File "<decorator-gen-276>", line 2, in exterior_facet_boundary_node_map File "/home/cserv1_a/apps/install/firedrake/0.12.0/lib64/python2.7/site-packages/firedrake/utils.py", line 21, in _memoize cache[key] = result = func(obj, *args, **kw) File "/home/cserv1_a/apps/install/firedrake/0.12.0/lib64/python2.7/site-packages/firedrake/functionspace.py", line 438, in exterior_facet_boundary_node_map boundary_dofs = facet_support_dofs(el) File "build/bdist.linux-x86_64/egg/FIAT/finite_element.py", line 199, in facet_support_dofs File "build/bdist.linux-x86_64/egg/FIAT/reference_element.py", line 396, in get_facet_element NotImplementedError ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> Sent: 23 February 2016 11:28 To: firedrake@imperial.ac.uk Subject: Re: [firedrake] Facetnormal compile error On 23/02/16 11:11, William Booker wrote:
Dear all,
I've been trying a shallow water dam break problem, but currently have a compile error
Discontinuous type FacetNormal must be restricted.
You need to choose which side of the facet the symbolic FacetNormal in your form you want to use (for the dS integals). i.e. n cannot appear in a dS integral without choosing either the + or - side (or in a jump or avg). Cheers, Lawrence
On 23/02/16 12:23, William Booker wrote:
Dear all,
I now get the following error when attempting to do 1 application of the nonlinear solver.
We had not anticipated the use of geometric boundary conditions on interval meshes, hence your error. If you raise an issue on github we can endeavour to fix this. However, once again, I recommend that if you have a discontinuous discretisation like this, to apply your boundary conditions weakly: when you integrated by parts you must have obtained some ds integrals which you have eliminated from your form by strongly imposing boundary conditions on the ds(1) and ds(2) integrals. You could instead enforce those conditions weakly. Cheers, Lawrence
So if I'm understanding this correctly, for the flux F , testfunction phi and a boundary \Omega_h, I'll have \int phi F .n ds(\Omega_h) on the boundary to impose the boundary conditions weakly. So if i include known information as the numbers and unknown information as the variables, then this would fulfil my Dirichlet bcs. In the case of non linear shallow water, then it would be +(hu*phi)*ds(1) + (hu*phi)*ds(2) # boundary flux for height +(0.5*g*1+ hu*hu/1)*xi*ds(1)+(0.5*0.12*0.12 + hu*hu/0.12)*xi*ds(2) #boundary flux for momentum hl = 1, hr = 0.12 As the height and not the momentum are known on the boundary. Will ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> Sent: 23 February 2016 12:45 To: firedrake@imperial.ac.uk Subject: Re: [firedrake] Facetnormal compile error On 23/02/16 12:23, William Booker wrote:
Dear all,
I now get the following error when attempting to do 1 application of the nonlinear solver.
We had not anticipated the use of geometric boundary conditions on interval meshes, hence your error. If you raise an issue on github we can endeavour to fix this. However, once again, I recommend that if you have a discontinuous discretisation like this, to apply your boundary conditions weakly: when you integrated by parts you must have obtained some ds integrals which you have eliminated from your form by strongly imposing boundary conditions on the ds(1) and ds(2) integrals. You could instead enforce those conditions weakly. Cheers, Lawrence
On 23/02/16 14:37, William Booker wrote:
So if I'm understanding this correctly, for the flux F , testfunction phi and a boundary \Omega_h,
I'll have \int phi F .n ds(\Omega_h) on the boundary to impose the boundary conditions weakly.
So if i include known information as the numbers and unknown information as the variables, then this would fulfil my Dirichlet bcs. In the case of non linear shallow water, then it would be
+(hu*phi)*ds(1) + (hu*phi)*ds(2) # boundary flux for height +(0.5*g*1+ hu*hu/1)*xi*ds(1)+(0.5*0.12*0.12 + hu*hu/0.12)*xi*ds(2) #boundary flux for momentum hl = 1, hr = 0.12
As the height and not the momentum are known on the boundary.
Yes, that logic looks correct. Lawrence
participants (2)
- 
                
                Lawrence Mitchell
- 
                
                William Booker