Skip to content
Snippets Groups Projects
Commit 84b37e95 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Implement poisson_neumann_symdiff!

and split mini files to avoid reuse of old vtu files!
parent 5b0942d4
No related branches found
No related tags found
No related merge requests found
......@@ -213,7 +213,8 @@ class AssemblyMethod(ClassMember):
from cgen import LiteralLines, Block
content = signature
content.append('{')
content.extend(' ' + l for l in generate_code(kernel)[0].split('\n'))
if kernel is not None:
content.extend(' ' + l for l in generate_code(kernel)[0].split('\n'))
content.append('}')
ClassMember.__init__(self, content)
......@@ -314,6 +315,14 @@ def generate_localoperator_kernels(formdata, namedata):
kernel = generate_kernel(integral)
operator_kernels[(integral.integral_type(), 'jacobian')] = kernel
# Generate dummy functions for those kernels, that vanished in the differentiation process
# We *could* solve this problem by using lambda_* terms but we do not really want that, so
# we use empty jacobian assembly methods instead
alpha_measures = set(i.integral_type() for i in form.integrals())
jacobian_measures = set(i.integral_type() for i in jacform.integrals())
for it in alpha_measures - jacobian_measures:
operator_kernels[(it, 'jacobian')] = None
# TODO: JacobianApply for matrix-free computations.
# Return the set of generated kernels
......
......@@ -5,7 +5,7 @@ add_generated_executable(UFLFILE poisson.ufl
)
dune_add_system_test(TARGET poisson_numdiff
INIFILE poisson.mini
INIFILE poisson_numdiff.mini
SCRIPT dune_vtkcompare.py
)
......@@ -19,7 +19,7 @@ add_generated_executable(UFLFILE poisson.ufl
)
dune_add_system_test(TARGET poisson_symdiff
INIFILE poisson.mini
INIFILE poisson_symdiff.mini
SCRIPT dune_vtkcompare.py
)
......@@ -30,6 +30,15 @@ add_generated_executable(UFLFILE poisson_neumann.ufl
)
dune_add_system_test(TARGET poisson_neumann_numdiff
INIFILE poisson.mini
INIFILE poisson_neumann_numdiff.mini
SCRIPT dune_vtkcompare.py
)
# 4. Poisson Test Case: source f, mixed neumann/dirichlet boundary + symbolic differentiation
add_generated_executable(UFLFILE poisson_neumann.ufl
TARGET poisson_neumann_symdiff
)
dune_add_system_test(TARGET poisson_neumann_symdiff
INIFILE poisson_neumann_symdiff.mini
)
__name = poisson_neumann_numdiff
lowerleft = 0.0 0.0
upperright = 1.0 1.0
elements = 32 32
elementType = simplical
[wrapper.vtkcompare]
name = {__name}
reference = poisson_ref
extension = vtu
__name = poisson_neumann_symdiff
lowerleft = 0.0 0.0
upperright = 1.0 1.0
elements = 32 32
elementType = simplical
[wrapper.vtkcompare]
name = {__name}
reference = poisson_ref
extension = vtu
__name = laplace
__name = poisson_numdiff
lowerleft = 0.0 0.0
upperright = 1.0 1.0
......@@ -6,6 +6,6 @@ elements = 32 32
elementType = simplical
[wrapper.vtkcompare]
name = poisson
name = {__name}
reference = poisson_ref
extension = vtu
__name = poisson_symdiff
lowerleft = 0.0 0.0
upperright = 1.0 1.0
elements = 32 32
elementType = simplical
[wrapper.vtkcompare]
name = {__name}
reference = poisson_ref
extension = vtu
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment