Carbon and carbon-silicon carbide nanocomposites with inverse opal structure