Error in Openfoam/ eg:motorbike/ snappyHexMesh - linux

Error
--> FOAM FATAL ERROR:
hanging pointer at index 5 (size 6), cannot dereference
From function const T& Foam::UPtrList<T>::operator[](Foam::label) const [with T = Foam::fvPatchField<double>; Foam::label = int]
in file /home/ubuntu/OpenFOAM/OpenFOAM-8/src/OpenFOAM/lnInclude/UPtrListI.H at line 100.
FOAM aborting
............................................................................................
Command executed: reconstructPar
Please note
This particular file path is invalid
"/home/ubuntu/OpenFOAM/OpenFOAM-8/src/OpenFOAM/lnInclude/UPtrListI.H"
the file UPtrListI.H is at
"/opt/openfoam8/src/OpenFOAM/lnInclude/UPtrListI.H"
Another error: no P and U results wherein parafoam
{under solid color only vktcompisteindex and vktblockcolor, in field option u and p are marked -please see the image attached "para.png"}
Please note: Simulation completed without any errors
Why does this happen?
enter image description here
enter image description here

Related

Octave boxwidth does not recognise core figure properties

I am trying to use the boxplot command in the statistics package, and it seems like most of the plot options are not recognised by Octave, by which I mean calling options like "BoxWidth" results in the following error:
error: set: unknown line property BoxWidth
error: __go_line__: unable to create graphics handle
error: called from
__plt__>__plt2vv__ at line 495 column 10
__plt__>__plt2__ at line 242 column 14
__plt__ at line 107 column 18
The code snippet producing this is as follows with the note that I have tried lower, upper,, camel, and sentence case for "BoxWidth" (documentation specifies camel case) and that I have tried both quotation marks and apostrophes to mark out the properties and the property options, with the same error produced in each case.
groups = [g_1, g_2, g_3, g_4, g_5, g_6, g_7, g_8, g_9, g_10, g_11];
data = [day_1_seat, day_2_seat, day_3_seat, day_4_seat, day_5_seat, ...
day_6_seat, day_7_seat, day_8_seat, day_9_seat, day_10_seat, ...
day_11_seat];
labels = {"29/07", "04/08", "05/08", "06/08", "07/08", "09/08", "11/08",...
"12/08", "13/08", "28/08", "01/09"};
s = boxplot(data,groups, "Notch", 0, "Symbol",".", "BoxWidth", "fixed");
The nature of the data in "groups" and "data" is unimportant, as I can create the boxplot without specifying properties without any issue. I have also tried specifying plot options after the initial call to boxplot with no luck.
This issue also occurs with other properties, such as Labels, OutlierTags etc, but not with "Notch" or "Symbol". I'm not a novice user, but I cannot figure out what the issue is here, any advice would be greatly appreciated!

Create a connection coming from a `spike_source_cell` in Arbor?

The docs specify that in order to create a connection a source and dest are required (of type cell_global_label and cell_local_label respectively). For connections between cable cells this works fine because you can place labels on their decor and then use those labels in the cell_global_label, but how do I connect from a spike_source_cell?
Here's what I do for cable cells:
arbor.connection(
arbor.cell_global_label(gid, "soma_spike_detector"),
arbor.cell_local_label("soma_synapse"),
1,
0.1
)
But since I can't create labels on a spike_source_cell it throws the following error:
RuntimeError: Model building error on cell 26: connection endpoint label "soma_spike_detector": label does not exist.
The docs on spike source cells mention:
has one built-in source, which needs to be given a label to be used when forming connections from the cell;
So you can use the label that you gave when constructing spike_source_cells as the label when constructing the cell_global_label:
# When constructing the source cell
arbor.spike_source_cell(
"spike_source",
arbor.explicit_schedule([5, 10, 12])
)
# In the recipe's `connections_on`:
arbor.connection(
arbor.cell_global_label(gid, "spike_source"),
arbor.cell_local_label("soma_synapse"),
1,
0.1
)

cv2.error: OpenCV(4.2.0)demosaicing.cpp:1721 error: (-215:Assertion failed) scn == 1 && (dcn == 3 || dcn == 4) in function 'demosaicing'

I'm getting the following OpenCV-Python error while running a face recognition module in Python 3.8.2:
cv2.error: OpenCV(4.2.0) /io/opencv/modules/imgproc/src/demosaicing.cpp:1721: error: (-215:Assertion failed) scn == 1 && (dcn == 3 || dcn == 4) in function 'demosaicing'
Could someone explain the cause of this error and the solution to it?
Here is the code:
known_faces=[]
known_names=[]
for name in os.listdir(KNOWN_FACES_DIR):
for filename in os.listdir(f"{KNOWN_FACES_DIR}/{name}"):
image=face_recognition.load_image_file(f"{KNOWN_FACES_DIR}/{name}/{filename}")
encoding=face_recognition.face_encodings(image)[0]
known_faces.append(encoding)
known_names.append(name)
print("processing unknown faces!")
for filename in os.listdir(UNKNOWN_FACES_DIR):
print(filename)
image=face_recognition.load_image_file(f"{UNKNOWN_FACES_DIR}/{filename}")
locations= face_recognition.face_locations(image,model=MODEL)
encodings=face_recognition.face_encodings(image,locations)
image=cv2.cvtColor(image,cv2.COLOR_BAYER_BG2BGR)
I did a bit of testing and searching. I think the error is due to incorrect format of the pictures that I uploaded.
I found this definition from wikipedia
A demosaicing (also de-mosaicing, demosaicking or debayering) algorithm is a digital image process used to reconstruct a full color image from the incomplete color samples output from an image sensor overlaid with a color filter array (CFA). It is also known as CFA interpolation or color reconstruction.
I tried changing the code but to no avail. Then after seeing the definition thought it might be incorrect input from the picture. I think it's the type of format of of picture that I found incorrect.

linearK error in seq. default() cannot be NA, NaN

I am trying to learn linearK estimates on a small linnet object from the CRC spatstat book (chapter 17) and when I use the linearK function, spatstat throws an error. I have documented the process in the comments in the r code below. The error is as below.
Error in seq.default(from = 0, to = right, length.out = npos + 1L) : 'to' cannot be NA, NaN or infinite
I do not understand how to resolve this. I am following this process:
# I have data of points for each data of the week
# d1 is district 1 of the city.
# I did the step below otherwise it was giving me tbl class
d1_data=lapply(split(d1, d1$openDatefactor),as.data.frame)
# I previously create a linnet and divided it into districts of the city
d1_linnet = districts_linnet[["d1"]]
# I create point pattern for each day
d1_ppp = lapply(d1_data, function(x) as.ppp(x, W=Window(d1_linnet)))
plot(d1_ppp[[1]], which.marks="type")
# I am then converting the point pattern to a point pattern on linear network
d1_lpp <- as.lpp(d1_ppp[[1]], L=d1_linnet, W=Window(d1_linnet))
d1_lpp
Point pattern on linear network
3 points
15 columns of marks: ‘status’, ‘number_of_’, ‘zip’, ‘ward’,
‘police_dis’, ‘community_’, ‘type’, ‘days’, ‘NAME’,
‘DISTRICT’, ‘openDatefactor’, ‘OpenDate’, ‘coseDatefactor’,
‘closeDate’ and ‘instance’
Linear network with 4286 vertices and 6183 lines
Enclosing window: polygonal boundary
enclosing rectangle: [441140.9, 448217.7] x [4640080, 4652557] units
# the errors start from plotting this lpp object
plot(d1_lpp)
"show.all" is not a graphical parameter
Show Traceback
Error in plot.window(...) : need finite 'xlim' values
coords(d1_lpp)
x y seg tp
441649.2 4649853 5426 0.5774863
445716.9 4648692 5250 0.5435492
444724.6 4646320 677 0.9189631
3 rows
And then consequently, I also get error on linearK(d1_lpp)
Error in seq.default(from = 0, to = right, length.out = npos + 1L) : 'to' cannot be NA, NaN or infinite
I feel lpp object has the problem, but I find it hard to interpret the errors and how to resolve them. Could someone please guide me?
Thanks
I can confirm there is a bug in plot.lpp when trying to plot the marked point pattern on the linear network. That will hopefully be fixed soon. You can plot the unmarked point pattern using
plot(unmark(d1_lpp))
I cannot reproduce the problem with linearK. Which version of spatstat are you running? In the development version on my laptop spatstat_1.51-0.073 everything works. There has been changes to this code recently, so it is likely that this will be solved by updating to development version (see https://github.com/spatstat/spatstat).

running Discrete wavelet transform in R Language

Please can someone help with a solution for running Discrete wavelet transform in R.
I have tried with the following data format; Year, Rain.
Year is in form of 1970,1972,1973.... and Rain in form of 200, 85, 34, 56 23, 0.5... etc. I don't know if my data frame is correct. or if i need to do something to the data before I run it.
Haven't saved the data.frame as wave, I ran as:
rain.dwt.01 <- wavDWT(wave)
Here is my code:
getwd()
setwd("C:\\Users\\dell\\Desktop\\ANN")
wave<-read.csv(file.choose(),header = T)
library(wmtsa)
library(wavelets)
library(waveslim)
library(MASS)
library(wavethresh) ### loaded auxillary functions from Internet
con <- url("faculty.washington.edu/dbp/R-CODE/workshop.Rdata")
print(load(con))
close(con)
lplot(wave)
abline(h=mean(wave),lty="dotted",col="red")
rain.dwt.01 <- wavDWT(wave)
I got this error:
Error in itCall("RS_wavelets_transform_discrete_wavelet_convolution", :
(list) object cannot be coerced to type 'double
Please help with example so I can understand why this error appears

Resources