Hi everyone,
I am currently trying to find the average value of my solution Temp
across the surface of my 2D mesh. But I am unsure how I can accomplish this.
Here is the example I have so far:
from __future__ import print_function
from fenics import *
import numpy as np
import matplotlib.pyplot as plt
from dolfin import *
from ufl import as_tensor
from ufl import Index
import math
from scipy.optimize import curve_fit
from mpi4py import MPI
mesh = UnitCubeMesh(16,16,16)
Space = FunctionSpace(mesh, āPā, 1)
Temp = project(Expression(ā10*x[0]+100*x[1]+ x[2]ā, degree=3), Space)
class marker(SubDomain):
def inside(self, x, on_boundary):
return near(x[2], 1) and on_boundary
Is there an inbuilt function that I can use this to find the average of Temp
across the face of my mesh at the given boundary?